Skip to main content
In openLend, the only oracle dependency is a price oracle for liquidations. We will walk through a simple example with an underwater USDC loan against ETH collateral.

Borrower initiates loan

Assume the market value of 1 ETH is 2000 USDC. In openLend, a borrower initiates a 15000 USDC loan against 10 ETH collateral with an 83% liquidation threshold. If 1 ETH drops below roughly 1800 USDC, the borrower can lose their 10 ETH.

Price drops, liquidation starts

Next, assume the price of ETH drops to 1700 USDC. The lender attempts liquidation by making a report in openOracle through the openLend contract. While the oracle game is in progress, the borrower cannot repay debt or top up collateral. The borrower includes the starting oracle game size in their terms. Assume they chose 10% of their collateral amount. The liquidator reports by depositing 1 ETH (10% of 10 ETH collateral) and their choice of USDC.

openOracle mechanics

In openOracle, anyone can swap 1 ETH for the reported amount of USDC, or vice versa. For example, if the liquidator deposited 1 ETH and 1500 USDC in the oracle game, it would be profitable to swap 1500 of your own USDC for 1 of the liquidator’s ETH, since ETH is currently trading for 1700 USDC. If nobody swaps against either one of the liquidator’s oracle game deposits in a configurable amount of time (the “settlement time”), the ratio of reported token amounts is considered the final price and can be used by openLend. If someone does swap against one of the deposited tokens, they must at the same time become the next price reporter. They put up a larger amount of ETH (for example, 50% more than the previous round) and their choice of USDC. The timer restarts, and the rest of the game’s rules are the same. The oracle game can be configured with per-round proportional fees split between borrower, lender, and liquidator. It can also have an escalation halt, which is the point at which the game continues but each subsequent round is the same size. On request, the borrower chooses the oracle game parameters, which factor into the lender’s minimum acceptable interest rate.

Successful liquidation

If the oracle game finalizes at a price implying the borrower is underwater, liquidation is successful and the borrower loses the full 10 ETH.