Overview
The Rainbow Bridge is the official bridge for transferring tokens between Ethereum, NEAR, and the Aurora networks. The bridge is the product of Aurora, the Ethereum-compatible scaling solution built on NEAR.
You can use the bridge to move tokens between any of the three networks. Depending on the selected direction, bridging can involve one or two transactions.
We will describe in this case how we examined the security of smart contracts for the Rainbow Bridge protocol. Our task was to find and describe any security issues in the smart contracts of the platform.
Task
Blaize’s task was to find and describe security issues in the smart contracts of the platform.
We needed to check the Rainbow Bridge protocol with the following parameters:
- Whether contracts are secure on both sides of the bridge;
- Whether the implemented functionality corresponds to the documentation;
- Whether contracts meet best practices in efficient use of gas and code readability.
- Whether the bridge flow is safe for users.
We have scanned both sets of smart contracts for commonly known and more specific vulnerabilities:
- Unsafe types conversion and unsafe math;
- Timestamp Dependence;
- Reentrancy (for Solidity part);
- Correct roles distribution and access control flow;
- Gas Limit and Loops;
- Transaction-Ordering Dependence;
- DoS attacks with (Gas Limit, unexpected reverts, storage abuse, etc.);
- Byte array vulnerabilities;
- Style guide violation;
- ERC20 standard correspondence and correct tokens usage;
- Uninitialized state/storage/ local variables;
In addition, the Rainbow Bridge protocol was checked against less common vulnerabilities from the internal Blaize.Security knowledge base.