Hunt prep
Before you test Inverse Finance contest
What 18 disclosed reports say about Inverse Finance contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 8 | 0 | – | – | $0 |
| DoS lesson | 3 | 0 | – | – | $0 |
| Smart contracts lesson | 3 | 0 | – | – | $0 |
| Misconfiguration lesson | 1 | 0 | – | – | $0 |
| Race condition lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Users can avoid paying fees if they manage to update their accrued fees periodically
The lastUpdated timestamp should not be updated when the accrued amount is zero.
Disclosed
-
Protocol withdrawals of collateral can be unexpectedly locked if governance sets the collateralFactorBps to 0
The text recommends adding a minimum value for the collateral factor, implementing an explicit withdrawal lock with separate access controls, or providing an escape hatch for users.
Disclosed
-
User can free from liquidation fee if its escrow balance is less than the calculated liquidation fee
The code was fixed to pay the remaining escrow balance to the governance address when the calculated fee exceeds the balance.
Disclosed
-
ERC777 reentrancy when withdrawing can be used to withdraw all collateral
The withdraw functions should be marked as nonReentrant to prevent reentrancy.
Disclosed
-
Two day low oracle used in Market.liquidate() makes the system highly at risk in an oracle attack
The team should use the current oracle price for liquidation while keeping the two-day period for other interactions.
Disclosed
-
viewPrice doesn’t always report dampened price
The issue was fixed by updating the daily low in viewPrice before calculating the dampened price.
Disclosed
-
Unhandled return values of transfer and transferFrom
The contract should check the return value and revert on false, or use OpenZeppelin’s SafeERC20 wrapper functions.
Disclosed
-
Liquidation should make a borrower healthier
The protocol was fixed by reverting when the combination of collateral factor, liquidation incentive and liquidation fee would allow profitable self-liquidations or unhealthier debt after liquidation.
Disclosed
-
Protocol’s usability becomes very limited when access to Chainlink oracle data feed is blocked
The Oracle contract's viewPrice and getPrice functions should use try/catch around the Chainlink call and include fallback logic (such as a fixed price or fallback oracle) in the catch block.
Disclosed
-
Chainlink oracle data feed is not sufficiently validated and can return stale price
The contract was fixed by using latestRoundData and checking that answeredInRound is at least roundId, updatedAt is greater than zero, and answer is positive.
Disclosed
-
Oracle assumes token and feed decimals will be limited to 18 decimals
The code was fixed to divide the price when the sum of decimals exceeds 36, as confirmed by the project.
Disclosed
-
Users could get some DOLA even if they are on liquidation position
The check should use getCreditLimitInternal() instead of getCollateralValueInternal(), and the project added a variant of this solution.
Disclosed
-
Avoidable misconfiguration could lead to INVEscrow contract not minting xINV tokens
The issue was fixed by making the callback behaviour configurable or always calling the onDeposit callback, as indicated by the acknowledged fix commit.
Disclosed
-
Oracle’s two-day feature can be gamed
The issue should be fixed by increasing the interval to three days, so the oracle must be manipulated for at least 24 hours.
Disclosed
-
repay function can be DOSed
The sponsor mitigated it in a follow-up pull request, though the text does not describe the change itself.
Disclosed