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 oftokenOutto be received_receiver: the address to sendtokenOutto
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