SingleTokenJoin#joinTokenSingle()
Change inputAmount
to maxInputAmount
can avoid dust INTERMEDIATE_TOKEN and save gas
#215
Labels
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/singleJoinExit/SingleTokenJoin.sol#L47-L71
SingleTokenJoin#joinTokenSingle()
can be changed to:outputAmount
;inputToken
needed based on the amount of INTERMEDIATE_TOKEN (the output of above);inputToken
required frommsg.sender
;This way we can avoid unnecessary dust INTERMEDIATE_TOKEN.
The text was updated successfully, but these errors were encountered: