L1ERC20Bridge.sol uses the standard ERC20 "approve" interface which returns a bool to handle token approvals in _approveFundsToAssetRouter
but this will not work with certain tokens like USDT which do not return a bool on approval.
The deposit
function allows bridging to L2 and uses the _approveFundsToAssetRouter
function to handle approvals to the router.
The _approveFundsToAssetRouter
uses standard ".approve" method to approve the router to spend the amount to be bridged, expecting a bool in return.
But this will not work for tokens like USDT, BNB, OMG etc which are very popular in DeFi. Their implementation looks like this:
And as a result, due to the interface mismatch will always revert.
Bridging such tokens like USDT will be impossible.
Manual Review.
Use the safeApprove
or forceApprove
functions instead.
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.