Skip to content

Code4rena

Inverse Finance contest

Every publicly disclosed report for Inverse Finance contest and what kind of bugs they were.

disclosed reports
18
most reported class
Business logic
bug classes found
5
first disclosure
2022
Find Inverse Finance contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Inverse Finance contest chose to make public.

Business logic

Users can avoid paying fees if they manage to update their accrued fees periodically

The DBR contract's interest accrual function updates the last-updated timestamp even when the calculated interest rounds down to zero, allowing a borrower to avoid paying interest by calling the function frequently with small loan amounts. An attacker could split a large loan into many small loans and update them often to pay no interest, though the gas cost likely makes this economically infeasible at present.

Inverse Finance contest

Medium
Race condition

ERC777 reentrancy when withdrawing can be used to withdraw all collateral

The withdraw function in a lending market lacked reentrancy protection, allowing an attacker to reenter during an ERC777 token transfer hook and withdraw more collateral than permitted while keeping the loan. This could let the attacker drain all collateral from the escrow.

Inverse Finance contest

Medium
Business logic

Calling repay function sends less DOLA to Market contract when forceReplenish function is not called while it could be called

The report describes that a user with a DBR deficit can repay their debt and withdraw all collateral without the forceReplenish function being called, resulting in the Market contract receiving less DOLA than if forceReplenish had been invoked. An attacker could exploit this by simply repaying and withdrawing when no one calls forceReplenish, avoiding the additional debt that forceReplenish would impose.

Inverse Finance contest

Medium
Business logic

viewPrice doesn’t always report dampened price

The Oracle contract's viewPrice function does not apply the dampened price mechanism until getPrice is called, so read-only functions that rely on viewPrice return incorrect values. This could lead to users withdrawing wrong amounts or liquidating incorrect debt, or cause reverts.

Inverse Finance contest

Medium
Smart contracts

Unhandled return values of transfer and transferFrom

The smart contract calls ERC20 transfer and transferFrom functions without checking their return values. If a token returns false on failure instead of reverting, the contract may continue as if the transfer succeeded, potentially causing loss of funds or incorrect state.

Inverse Finance contest

Medium
Business logic

Liquidation should make a borrower healthier

The liquidation function could leave a borrower with a worse health factor (collateral value divided by debt) because the liquidation incentive and fee reduce collateral faster than debt. An attacker could repeatedly liquidate or force replenishment to make the debt unhealthier and potentially extract DOLA from the market.

Inverse Finance contest

Medium
DoS

Protocol’s usability becomes very limited when access to Chainlink oracle data feed is blocked

The protocol's Oracle contract calls Chainlink's latestAnswer() without a fallback, so if Chainlink multisigs block access to the price feed, the call reverts and core functions like borrowing, withdrawing, force-replenishing, and liquidating become unavailable. An attacker cannot directly trigger this, but the protocol's usability is severely limited during such a block.

Inverse Finance contest

Medium
Audit finding

Chainlink oracle data feed is not sufficiently validated and can return stale price

The Oracle contract used Chainlink's deprecated latestAnswer and only checked that the price was positive, so it could accept a stale price. This could cause inaccurate credit and withdrawal limit calculations, potentially allowing a user's debt to be wrongly liquidated.

Inverse Finance contest

Medium
Business logic

Users could get some DOLA even if they are on liquidation position

The forceReplenish function checked a user's collateral value against their debt without applying the collateral factor, so a user already in liquidation could still call it to cover their accrued DBR fees and receive more DOLA. This could also push a healthy debt into liquidation.

Inverse Finance contest

Medium
Misconfiguration

Avoidable misconfiguration could lead to INVEscrow contract not minting xINV tokens

A market deployed with the INVEscrow implementation but with the deposit callback disabled would not mint xINV tokens when users deposit collateral. This misconfiguration would make the market fail to provide the expected xINV tokens, and because the setting is immutable, the market would need to be redeployed or funds migrated.

Inverse Finance contest

Medium
Audit finding

Oracle’s two-day feature can be gamed

The oracle's two-day price averaging feature can be bypassed by manipulating the oracle only around the boundary between two days, because the day is computed by integer division of the timestamp. An attacker could manipulate the price for just two blocks instead of the intended two days.

Inverse Finance contest

Medium
DoS

repay function can be DOSed

The repay function reverts when the supplied amount exceeds the user's current debt, so an attacker who repays a tiny amount on the victim's behalf just before their transaction causes the victim's larger repayment to fail. By repeating this, the attacker could keep blocking the victim from repaying.

Inverse Finance contest

Medium
DoS

Market::forceReplenish can be DoSed

The forceReplenish function in Market.sol can be front-run with a dust amount to prevent a full replenishment, causing the transaction to revert. An attacker could repeatedly front-run to deny the replenishment service.

Inverse Finance contest

Medium