code-423n4 / 2021-08-gravitybridge-findings

1 stars 0 forks source link

Possible miner incentive for chain reorgs if ETHBlockDelay is too small #12

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

tensors

Vulnerability details

Impact

If ETHBlockDelay is too small and the incentive for miners is large enough, it would profitable for miners to attempt to double spend by depositing assets, waiting for confirmation on the cosmos-SDK and then reorging the blockchain.

Although an attack like this has never been done, it could potentially cost hundreds of millions of dollars in damages. With MEV at all time highs and miners regularly using custom geth implementations its not totally out of the question to see an attack similar to this happening soon.

Recommended Mitigation Steps

The best way to avoid something like this is to make sure to wait for a large number of blocks until a transaction is confirmed by the cosmos system.

jkilpatr commented 2 years ago

We currently wait 6 blocks, as noted here I've done some math on the subject. A 7 block deep reorg would actually halt the bridge so they could only pull this off once.

I do agree it's a moderate risk, but computing how probable (and therefore risky) this sort of attack is requires info that's pretty hard to get.

albertchon commented 2 years ago

We did some investigation into this and concluded that 6 blocks was safe enough

loudoguno commented 2 years ago

reopening as per judges assessment as "primary issue" on findings sheet