Functions like repay would fail if the fees calculated using _calculateInterest within these functions return a 0 value.
Note that the protocol does not limit what type of tokens will be used. As anyone can create a pool with any ERC20 token.
Some tokens like LEND revert on zero-value fee transfers. So, if fees generated within _calculateInterest is 0, then the following would revert for tokens like LEND:
where protocolInterest is the following:
It is generated from the _calculateInterest. Since the transfer is done within the repay function, the repay function would revert.
The following POC was tested using Fuzz-testing.
The assertion always failed. The console logs:
If the fee returned is 0, then a function like repay would fail when they try to send a 0 value token transfer, for tokens like LEND.
Fuzz-testing, manual review
Ensure the following:
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.