Unchecked token transfers #197
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
invalid
This doesn't seem right
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2022-09-y2k-finance/blob/2175c044af98509261e4147edeb48e1036773771/src/Vault.sol#L167
https://github.com/code-423n4/2022-09-y2k-finance/blob/2175c044af98509261e4147edeb48e1036773771/src/Vault.sol#L228
https://github.com/code-423n4/2022-09-y2k-finance/blob/2175c044af98509261e4147edeb48e1036773771/src/Vault.sol#L231
https://github.com/code-423n4/2022-09-y2k-finance/blob/2175c044af98509261e4147edeb48e1036773771/src/Vault.sol#L365
Vulnerability details
Impact
Unchecked token transfers are discouraged since some tokens return false instead of reverting on failure. IWETH on Arbitrum doesn't have this issue but if the protocol is expanded to accept more tokens, or deployed on other chains, this might cause problems.
Proof of Concept
Evident from linked lines of code.
Tools Used
Slither
Recommended Mitigation Steps
Ensure that the transfer/transferFrom return value is checked
The text was updated successfully, but these errors were encountered: