Position valuation (technical)
Last updated
Last updated
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:
is a normalized token price returned from Chainlink
is an amount of token in Uniswap position, derived from the amount of Uniswap liquidaty and price ration
is an amount of accumulated LP fees within position
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:
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.
- is a borrow threshold set by governance for collateral
- is a liquidation threshold set by governance for collateral