Open code423n4 opened 2 years ago
Dravee
Transferring tokens to the zero address is usually prohibited to accidentally avoid "burning" tokens by sending them to an unrecoverable zero address.
Places where I couldn't find a zero address check (or where the destination isn't a zero-checked address):
arbitrum-lpt-bridge\contracts\L1\gateway\L1LPTGateway.sol:100: TokenLike(_l1Token).transferFrom(from, l1LPTEscrow, _amount); arbitrum-lpt-bridge\contracts\L1\gateway\L1LPTGateway.sol:150: TokenLike(l1Token).transferFrom(l1LPTEscrow, to, amount); arbitrum-lpt-bridge\contracts\L1\gateway\L1LPTGateway.sol:153: TokenLike(l1Token).transferFrom(l1LPTEscrow, to, escrowBalance); protocol\contracts\token\BridgeMinter.sol:109: token.transfer(l1MigratorAddr, balance);
VS Code
Add a check to prevent accidentally burning tokens
Planning on having the caller be responsible for passing the right args.
I think this could be made non-critical. Users' funds are at their own risk.
non-critical
Handle
Dravee
Vulnerability details
Impact
Transferring tokens to the zero address is usually prohibited to accidentally avoid "burning" tokens by sending them to an unrecoverable zero address.
Proof of Concept
Places where I couldn't find a zero address check (or where the destination isn't a zero-checked address):
Tools Used
VS Code
Recommended Mitigation Steps
Add a check to prevent accidentally burning tokens