addMigratedUnderlying function can process unneccessary 0 value. This in itself is not a big risk but it can be leveraged in
a sequence of function calls to trigger unwanted behaviour.
The missing check lies in the logic of the addMigratedUnderlying function. The function lacks specific handling for a zero amount scenario.
function is called with an amount of 0.
function attempts to transfer 0 tokens from the sender to the contract using safeTransferFrom. This typically succeeds in most ERC20 implementations.
incrementUnderlying function is called with amount as 0.
Inside incrementUnderlying, adding 0 to the existing balanceOfUnderlying doesn't modify the balance.
Despite no balance change, a ChangeUnderlying event is emitted with int256(amount), which will be 0.
Although benign in its impact, missing 0 check allow attackers to log transfers onchain, leading to various phishing attack vectors. Where large holders are target with on-chain spam transactions.
Using address that are similiare in prefix-suffix.
Manual Review
Modify the addMigratedUnderlying function to check for amount equal to 0
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.