P0and Bob wants to use XHedge to divide some BCH into a pair of LeverNFT/HedgeNFT. He must provide the following arguments:
A=(1+CR0)*Vh/P0. After that Bob gets a LeverNFT and a HedgeNFT, which can be transferred to other persons. In some scenarios, these NFT can be both burnt and the BCH locked because of them will be liquidated:
P1and the locked BCH cannot meet the minimum collateral rate (
A < (1+CRmin)*Vh/P1), then the owner of HedgeNFT can initiate liquidation. The owner of HedgeNFT can get
min(A, (1+Pc)*Vh/P1)and the owner of LeverNFT,
MT, any owner of these two NFTs can initiate liquidation. At the liquidation moment, if BCH's price is
P2, then the owner of HedgeNFT can get
min(A, Vh/P2)and the owner of LeverNFT,
max(0, A-Vh/P2). The owner of HedgeNFT secures the value of her asset, while the owner of LeverNFT enlarges her risk and benefit.
Pis large enough for
P>P0*CR0, she can withdraw some BCH to shrink A (reduce the margin), as long as A is no less than
(1+CR0)*Vh/Pafter withdrawing. And, from the coins withdrawn by her, 0.5% is deducted and paid to the owner of HedgeNFT as a compensation fee.
price ✖ durationproducts through the
price1CumulativeLastfunctions, and the pool's token reserve through the
price ✖ durationproduct is sampled once at each pool, while the token reserve can be sampled multiple times and the smallest value will be kept at last.