- The attacker lost 2.5 ETH in a failed attempt to attack the NEAR Protocol Rainbow Bridge.
- Bridge architecture was designed to resist such attacks, and additional measures to be taken to ensure the cost of an attack attempt is increased.
Below is a quick overview of this project.
The ETH <> NEAR Rainbow Bridge allows users to migrate assets to NEAR’s developer-friendly and low-cost platform seamlessly.
Here is the address of the attacker:
The attacker got some ETH from Tornado Cash to start the attack. Here is the link to the transaction:
With these funds, he deployed a contract to deposit some funds to become a valid Rainbow Bridge relayer and send the fabricated light client blocks. Here is the contract address:
He tried to hit the moment to front-run the relayer but failed to do it. Here is the link to the attacker’s failed transaction:
After that, he decided to send a similar transaction with the block timestamp in the future (+5h). This transaction successfully substituted the previously submitted block. Here is the link to that transaction:
In a short period, one of the bridge watchdogs figured out that the block submitted was not in the NEAR blockchain, and they created a challenge transaction and sent it to Ethereum. Here is the link to that transaction:
Immediately, MEV bots detected this transaction and figured out that front-running it would result in 2.5 ETH, so they did exactly this. Here is the link to that transaction:
As a result, the watchdog transaction failed, MEV bot transaction succeeded and rolled back the fabricated block of the attacker. Some minutes after this, the relayer submitted a new block. Here is the link to that transaction:
Later, the team investigated the strange behavior and paused all the connectors. And once figured out the details, unpaused them back.
The attack was mitigated fully automatically. Rainbow Bridge users didn’t see anything happening, continuing transacting in both directions. However, the combination of the high Ethereum fees, a delay of the block relaying, and a desire to check whether watchdogs are operational or not were stimulating an attacker to break the bridge at that exact moment.
For at least six months team knew that watchdog transactions would be front-run by the MEV bots. The main reason to keep these mechanics is the additional protection, as MEV bots know how to get transactions executed. The attacker lost 2.5 ETH, which was paid to the MEV bot because of the successful challenge.
As crypto hacks are increasing nowadays, our readers should stay alert.