šŸ“ŠAsset management

This page describes the base principle of asset management inside of multipools

Arcanum protocol's asset management system is represented by a smart contract that manages ERC20 tokens. The main problem of asset management is that whenever there is a rebalancing issue (need to change one tokens for another) it requires to perform some trading actions. Arcanum's multipool solves this issue in a fully decentralized way, giving new of opportunities to other DeFi roles.

This scheme describes multipool that consist of two assets. There is an underflow of asset 1 and overflow of asset 2 quantities. Anyone is able to mint/swap/burn any assets but they will need to pay extra fees if they move the asset quantity far from the line (increase the deviation).

Deviation

Deviation itself is a modular measure and is calculated via the formula below:

Deviation=āˆ£currentShareāˆ’idealShareāˆ£Deviation = |currentShare - idealShare|
currentShare=assetQuantityāˆ—assetPriceshareTotalSupplyāˆ—sharePricecurrentShare = \frac{assetQuantity * assetPrice}{shareTotalSupply * sharePrice}

Deviation fees

If the deviation stays same as it was before swap or goes lower - you will only pay a fixed base fee, otherwise an extra fee that depends on your current deviation should be payed. Deviation fee is charged in native token to simplify it's unification for on-chain traders.

The deviation that appears after mint can be measured as:

afterMintShare=(assetQuantity+mintQuantity)āˆ—assetPriceshareTotalSupplyāˆ—sharePrice+mintQuantityāˆ—assetPriceafterMintShare = \frac{(assetQuantity + mintQuantity) * assetPrice}{shareTotalSupply * sharePrice + mintQuantity * assetPrice}

For burn operation deviation is:

afterBurnShare=(assetQuantityāˆ’burnQuantity)āˆ—assetPriceshareTotalSupplyāˆ—sharePriceāˆ’burnQuantityāˆ—assetPriceafterBurnShare = \frac{(assetQuantity - burnQuantity) * assetPrice}{shareTotalSupply * sharePrice - burnQuantity * assetPrice}

Fee curve

For deviation fee we took a curve that is both simple to calculate and semi-exponential:

feeRatio=middleRatioāˆ—āˆ£deviationāˆ£deviationLimitāˆ—(āˆ£deviationāˆ£āˆ’deviationLimit)feeRatio = \frac{middleRatio * |deviation|}{deviationLimit * (|deviation| - deviationLimit)}

Deviation limit determines the percent of deviation that is restricted to be reached by actions. Anyway deviation is able to grow even bigger via price changes. Middle ratio describes fee ratio at the middle of deviation limit.

The diagram below describes an example of curve with middle ratio = 0.0003 and deviation limit = 0.1.

Multiswaps

Multipool supports a single trading operation called Multiswap that is an operation that allows users to supply many tokens are receive many tokens out in quote value equivalent. This allows users to create complicated operations that are gas efficient. Multiswap also allows operations that mint or burn using multiple tokens supplied or received respectively. This is an efficient way to operate with big quantities as deviation fee is calculated depending on the overal impact of the operation.

Cashbacks

Cashbacks were invented as a mechanism that creates incentives (additionally to low fees) to peg multipool shares. As it was mentioned before, depeg fees are collected to a different place than base fees. Protocol earns only base part meanwhite depeg fees are used to incentivise people to earn them prooptionally by moving deviation back to zero.

cashback=deviationOldāˆ’deviationNewdeviationOldāˆ—collectedDepegFeescashback = \frac{deviationOld - deviationNew}{deviationOld} * collectedDepegFees

This formula is used when new deviation gets lower than old one and can be explained like: "you will receive collected depeg fees in a linear proportion to your deviation decreasement, if you decrease deviation by 50% comparing to old one, you will get 50% of collected depeg fees".

Last updated