You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 12, 2025. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
In the documentation, it is mentioned that Any type of ERC20 token. Pools are permissionless. So users can open pools even with weird tokens. Some tokens (e.g. LEND) revert when transferring a zero value amount. example: RevertZero.sol. This introduces a risk related to revert on 0 amount
Vulnerability Detail
Impact
Revert on Zero Amount: When balance is zero, the safeTransfer and safeTransferFrom method from most ERC20 token contracts will revert. This behavior is intended to prevent unintentional transfers of zero tokens, which could be seen as an error in many token implementations.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
NoOne
Medium
Missing check for zero amount
Summary
In the documentation, it is mentioned that
Any type of ERC20 token. Pools are permissionless. So users can open pools even with weird tokens.
Some tokens (e.g. LEND) revert when transferring a zero value amount. example: RevertZero.sol. This introduces a risk related to revert on 0 amountVulnerability Detail
Impact
Revert on Zero Amount: When balance is zero, the
safeTransfer
andsafeTransferFrom
method from most ERC20 token contracts will revert. This behavior is intended to prevent unintentional transfers of zero tokens, which could be seen as an error in many token implementations.Code Snippet
emergencyWithdraw
emergencyWithdraw
fundAndBribe
Tool used
Manual Review
Recommendation
To handle revert on zero amount , modify the functions to check the actual amount before
safeTransfer
andsafeTransferFrom
Duplicate of #545
The text was updated successfully, but these errors were encountered: