Position valuation (technical)

All Uniswap V3 NFTs deposited as collateral are evaluated independently. The total collateral value is equal to the sum of all NFTs collateral values.

Each Uniswap V3 position contains 2 ERC20 tokens, whose ratio changes during market volatility. Protocol relies on the Chainlink oracle for obtaining prices of individual tokens, with a possibility of manually setting fallback prices in the event Chainlink outage.

The collateral value is calculated using the following approach:

Where:

Borrower max debt limit is calculated using collateral-specific borrow thresholds:

Where:

Borrower is not immediately liquidated once max debt limit is exceeded, instead higher liquidation limit is used for determining if position is subject to liquidation.

Where:

Price manipulation safety

It’s important to note that evaluated collateral value of Uniswap V3 positions does not depend on the current spot price in the Uniswap V3 pool, and instead is purily based on Chainlink oracle responses. This makes it impossible to manipulate price valuations using sandwiching or other attacks, however it introduces small differences between valuations in BOB CDP and in Uniswap UI.

In practice, this means that BOB CDP valuations can be up to ~0.1% (based on conducted backtesting) smaller than numbers shown in Uniswap UI, making such differences barely noticable.

Last updated