Buying / Selling MLP
Buying and selling MLP can be done through the MLPRewardRouter.
To buy MLP, call mintAndStakeMlp
_token
: the token to buy MLP with_amount
: the amount of token to use for the purchase_minUsdg
: the minimum acceptable USD value of the MLP purchased_minMlp
: the minimum acceptable MLP amount
To sell MLP, unstakeAndRedeemMlp
_tokenOut
: the token to sell MLP for_mlpAmount
: the amount of MLP to sell_minOut
: the minimum acceptable amount oftokenOut
to be received_receiver
: the address to sendtokenOut
to
Note that MLP can only be redeemed up to the reservedAmount
, which is based on the amount of open interest, if the pool has been fully redeemed up to the reservedAmount
then redeemers will need to wait for positions to close before further redemptions can be done, in this scenario the borrowing fee APR would be very high so liquidity providers will be incentivised to mint MLP and traders will be incentivised to close positions
The price of MLP can be retrieved from the MlpManager.
The buy price would be getAum(true) / mlpSupply
The sell price would be getAum(false) / mlpSupply
Last updated