The TokenDivider
contract uses insecure ERC20 operations (transfer
and transferFrom
) without checking their return value. Some ERC20 tokens may return false
instead of revert in case of failure, which can lead to state inconsistencies.
Code Location:
Severity: Medium
If a non-compliant ERC20 token is used (returning false
instead of revert), transfer operations can silently fail, leading to:
Fund losses
State inconsistencies
Partially executed transactions
A test was created to demonstrate the potential issue:
Manual code analysis
Foundry tests
Aderyn (static analysis tool)
Use the SafeERC20 library from OpenZeppelin:
Or manually check returns and revert in case of failure:
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.