Equations

Pools

A pool's USD value is calculated by taking the sum of position values for each position the pool has. The position can be either an ERC20 token or an LP token.

A pool manager's available performance fee is calculated as follows:

Note that the performance fee is a percentage of the pool's profits, not the pool value.

NFT Pool Token Distribution

An NFT pool's supply cap is determined by the pool manager when the pool is created, and can't be changed.

Asset Prices

ERC20 asset price is calculated by getting the pre-determined optimal path for the asset and calling getAmountsOut() in Ubeswap's router.

The LP token price for a pair(token0, token1) is calculated as follows:

The reserves for an LP pair are retrieved from the Ubeswap Factory contract.

Last updated