Closed code423n4 closed 3 years ago
Pools are be design to allow other protocols to wrap with their own routers. Our router handles WBNB for its pool
Have tested '0' as the input (this is a ROUTER function btw; not POOL) which causes the txn to fail as expected thereby deeming this a non-issue unless the warden can explain how to reproduce?
The return type for PoolFactory.getPool() is an address of which '0' or 0 is not; so it fails as intended.
Per sponsor comment, invalid.
Handle
cmichel
Vulnerability details
Vulnerability Details
The
Pool.removeLiquidityExact
function redeems liquidity tokens for underlying to the router contract in case of thetoken
being the zero address. This works if the underlying token is actuallyWBNB
but if the pool token is different and the user accidentally inserted0
as thetoken
address, the redeemedtoken
will stay in the router.Recommended Mitigation Steps
If
token == 0
add a check forpool.token == WBNB
such that it is ensured that the pool's token is actuallyWBNB
.