ERC20 implementations are not always consistent. Some implementations of transfer and transferFrom could return ‘false’ on failure instead of reverting. It is safer to wrap such calls into require() statements to these failures. Otherwise this vulnerability can be maliciously used in multiple ways inside the contracts. For example by taking out a loan without providing collateral or creating pools without providing liquidity into the contract. This gives direct attack paths to steal funds.
Unhandled transfer / transferFrom function calls occur multiple times inside the contracts and allow different attack paths.
The following POC code shows one of these possible attack paths, it can be implemented inside the current test folder of the repo.
There are a lot of different ways to use this vulnerability, for example:
If anyone deposited a token which returns booleans instead of reverting, there is a direct attack path to drain them all
Lenders can create pools without providing the necessary liquidity for it
Borrowers can take a loan without providing the necessary collateral for it (and therefore steal it)
Users can increase their staking balances without depositing funds
Manual Review, Foundry, VSCode
Use OpenZeppelins SafeERC20, or a similar security technique in all contracts, which call transfer or transferFrom on any token.
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.