Take a look at LiquidationPool.sol#L164-L180
And see distributeAssets()
too, the main idea of how this bug case works is that the transfer of tokens are being done in a push and not pull method, i.e the receivers have been hardcoded to be the msg.sender
in these instances, now in the case where this receiver's address has been blacklisted, for example by Circle
in regards to USDC
then the user would not be able to claim rewards, and even worse no other user would be able to receive tokens from distributeAssets()
if user is among them.
Protocol owner on discord said they'd like to know about issues that would occur with other EERC20s... assuming popular tokens, we can consider the most popular stablecoins out there to be a bet, i.e USDC & USDT which employ this blacklisting mechanism.
Borderline medium/low, medium cause:
This leads to a DOS from users claiming their rewards , i.e stuck funds note that this also affects other tokens in the pool even the ones that do not employ the blacklisting mechanism cause the withdrawal is looped for all teh different tokens in the "i < _tokens.length;
" in claimReward()
,
This also causes protocol to be unable to distribute fees to other holders if one user is blacklisted
Low cause this is a futuristic flaw in code, depending on which assets get added.
Implement a pull and not push method, i.e in the case of claimRewards()
allow msg.sender
to provide a fresh address and in the case of distributeAssets()
use a try-catch method to transfer these tokens and any user that couldn't receive their tokens should be stored on-chain and allowed to come pull their tokens later on.
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.