This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
Bauchibred - Users could have their price stuck in the PrizeDistributor contract #52
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
Bauchibred
medium
Users could have their price stuck in the PrizeDistributor contract
Summary
Users could have their price stuck in the Distributor contract.
Vulnerability Detail
Take a look at FootiumPrizeDistributor.sol#L109-L145
As seen, this function is used by
to
to claim their prize tokens from the distributor contract.Now from contest's readMe we can see that protocol is expected to work with "ANY" token, which would be a problem in regards to claiming the price in some cases.
To explain a bit further, it's no news that some ERC20 tokens exist with multiple entry points (also known as double entry tokens or two address tokens), now due to a reported bug case for one of the popular token that implements this feature, namely TUSD, the protocol curbed access from one of it's addresses. In addition, it is not unrealistic to expect that an upgradeable collateral token like USDT could become a double-entrypoint token in the future, so this must also be considered.
How this now affects Footium is that, if the integrated asset blocks the access of its logic from one of it's addresses (in this case the token address that's been used to create these merkle proofs on
Footium
), then even if verifying the proofs would work, attempting to then claim these prices would not work cause, the right address that was whitelisted is not supported by the underlying token itself and an attempt to withdraw would revert.Impact
Core functionality is broken as no user would be able to claim proofs which is a DOS for all users who have prices in this token, also this DOS could as well last over 1 year, as taking into account the real life TUSD case it's been over 22 months since the patch was applied which blocked off support for one of it's addresses.
A subtle loss of US$ value could also be attached to this case as users might want to sell off their tokens but they can't access them and the price drops.
Now quoting Sherlock docs this should be a valid H/M as DOS is indefinite and there is a potential loss in
US$
value.Code Snippet
FootiumPrizeDistributor.sol#L109-L145
Tool used
Manual Review
Recommendation
Since all ERC20s are going to be supported then do not rely on the token address in the accounting, alternatively have a whitelist of accepted tokens and these sets of tokens shouldn't be supported.
The text was updated successfully, but these errors were encountered: