BOB
Search
K

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.
C=ciC = \sum{c_i}
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:
C=ci=px(ax+fx)+py(ay+fy)C = \sum{c_i} = \sum{p_x(a_x + f_x) + p_y(a_y + f_y)}
Where:
  • pxp_x
    is a normalized token price returned from Chainlink
  • axa_x
    is an amount of token
    xx
    in Uniswap position, derived from the amount of Uniswap liquidaty and price ration
    py/pxp_y/p_x
  • fxf_x
    is an amount of accumulated LP fees within position
Borrower max debt limit is calculated using collateral-specific borrow thresholds:
Cb=tb,ici=tb,i(px(ax+fx)+py(ay+fy))C_b = \sum{t_{b,i}c_i} = \sum t_{b,i}({p_x(a_x + f_x) + p_y(a_y + f_y))}
Where:
  • tb,it_{b,i}
    - is a borrow threshold set by governance for collateral
    ii
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.
CbCl=tl,ici=tl,i(px(ax+fx)+py(ay+fy))C_b \leq C_l = \sum{t_{l,i}c_i} = \sum t_{l,i}({p_x(a_x + f_x) + p_y(a_y + f_y))}
Where:
  • tb,itl,it_{b,i} \leq t_{l,i}
    - is a liquidation threshold set by governance for collateral
    ii

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.