In normal operation, the contract allows the owner to add new ERC20 tokens that sellers can list via the setAllowedSellToken()
function. It also provides an emergencyWithdrawERC20()
function that allows the owner to withdraw arbitrary ERC20 tokens from the contract — with the exception of a hardcoded list of "core" tokens.
The issue is that the contract does not protect against owner abuse of dynamically added tokens. This allows a malicious owner to:
List a malicious or deceptive token.
Wait for users to deposit it into the system.
Withdraw all user deposits via emergencyWithdrawERC20
.
Likelihood:
The admin can call setAllowedSellToken()
at any time and approve a new token that users can start using.
The admin can call emergencyWithdrawERC20()
at any time and withdraw user-deposited tokens unless the token is hardcoded as protected.
Impact:
Admin can rug user deposits from newly added tokens.
Users may be misled into trusting tokens listed via setAllowedSellToken()
with no real protection.
This change prevents the admin from using emergencyWithdrawERC20() to rug tokens that were previously approved for user deposits via setAllowedSellToken.
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.