LP Tokens are given to Liquidity Providers when they add liquidity to mAsset-UST or MIR-UST Terraswap pools. Each pool has a unique LP token associated with it and cannot be combined with LP tokens from other pools. They serve primarily as a unit of account, representing the liquidity provider's share in the pool in order to reclaim assets when they remove liquidity.
Although LP tokens exist independently as a yield-generation feature of Terraswap, they are central to Mirror's market infrastructure. As such, the protocol provides MIR rewards to users who stake LP tokens as an incentive to help maintain liquid markets on Terraswap for mAssets and MIR.
A user can provide liquidity by depositing tokens to both sides of a Mirror-related Terraswap pool. This results in the creation of LP tokens for that pool, which they can use to retrieve assets from the pool.
For a new pool with starting quantities of UST and mAsset / MIR , the number of LP tokens is:
Given quantities of UST and mAsset/MIR being deposited, and currently in the pool prior to deposit, and the current supply of LP tokens , the amount of newly minted LP tokens is:
Although liquidity providers can deposit any amount for both tokens, they are incentivized to put in quantities where value is equal on both sides, taking into consideration the mAsset or MIR's market price. Doing otherwise would cause them to incur losses as it would create arbitrage opportunities against the pool, and the LP tokens they received would be insufficient for recover their liquidity.
A user can burn their LP tokens to recover their deposited liquidity. The pool will send back amounts of UST and mAssets (or MIR), depending on the amount of LP tokens they burn, determined by the formulas shown below.
Holders of LP tokens receive a portion of rewards generated by the pool's trading fees, divvied out in proportion to total share of LP token pool. A portion of either mAsset/MIR or UST (depending on the direction of the trade) gets added back into the pool as the LP Commission.
This functionality is not implemented in the Mirror Protocol contracts, and comes purely due to Terraswap's incentive structure for liquidity providers. Because the trading fee rewards are returned to the pool, they can only be withdrawn by burning LP tokens and withdrawing liquidity.
Mirror allows users to additionally profit from LP tokens by staking them to receive Mirror Token (MIR) rewards. The LP tokens can be unstaked at any time, and then burned to retrieve the corresponding deposited liquidity and LP Commission rewards.
At each block, the protocol introduces into circulation an amount of MIR tokens (which had been locked by the protocol), by distributing them across all stakers of LP tokens in proportion to their total weighted stake.
Mirror Protocol rewards stakers of LP tokens for each of the mAsset-UST pools as well as the MIR-UST pool. All mAsset-UST staking pools receive a weight of 1, while the MIR-UST pool receives a weight of 3. Therefore, there is a stronger reward incentive to stake MIR-UST LP tokens as they confer 3 times the reward when staked relative to mAssets.
The block reward, for a specific staking pool corresponding to asset with weight and quantityof MIR introduced into circulation per block, is given by:
A user will receive the portion of rewards for their pool equivalent to their proportional share of staked assets for that pool. This is applied for each pool to which the user has staked LP tokens.