The deposit function in L1ERC20Bridge.sol
expects a boolean return value from the approve
function of ERC-20 tokens. However, many widely-used tokens (e.g., USDT) do not comply with this expectation, resulting in a revert when attempting to bridge such tokens. This issue makes the bridge contract incompatible with a significant portion of ERC-20 tokens, disrupting user operations.
In the L1ERC20Bridge::deposit
function, an internal call is made to _approveFundsToAssetRouter
, where the token approval is handled as follows:
The issue arises because not all ERC-20 tokens strictly follow the standard specification. Here is a snippet of USDT
approve function deployed on L1.
The above function has no return statement, and will casuse a revert if the void returned from the call is assigned to a value just like it is done here;
Users cannot bridge tokens like USDT
and BNB
The protocol may lose transaction fees and volume due to incompatibility with popular tokens
Manual Review
Handle the approval success through a low level call, or use the openzeppelin safeApprove
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.