PlusPool
This contract manages the leveraged assets of Meshswap's plus pool liquidity providers. Liquidity providers can maximize their returns with positive assets (deposited assets + utilized assets) by using positive deposits according to their deposited assets. However, a high asset utilization ratio can result in automatic returns, which can result in losses.
Code
Github Link: (Will be updated after official launch)
Address
Contract adress after production is deployed
Events, Read-Only Functions, and State-Changing Functions
Events
ChangeBorrowFactor
event ChangeBorrowFactor(uint newBorrowFactor);Event log of borrow factor change
ChangeLiquidationFactor
event ChangeLiquidationFactor(uint newLiquidationFactor);Event log of liquidation factor change
ChangeBorrowable
event ChangeBorrowable(address token, bool b);Event that occurs when availability is changed
GiveReward
event GiveReward(address user, uint amount, uint lastIndex, uint rewardSum);Event log of when mined MESH is claimed and distributed
Parameters
user: address of the user who claimedamount: the amount of MESH claimedlastIndex: index result of the pair of the wallet after claimingrewardSum: The amount of MESH that has been accrued so far
GiveAirdropReward
event GiveAirdropReward(address user, address dist, uint amount, uint currentIndex, uint userAirdropSum);Event log of when airdrop token is claimed and distributed
Parameters
user: address of the user who claimeddist: Airdrop contract addressamount: the amount of token claimedlastIndex: index result of the pair of the wallet after claimingrewardSum: The amount of token that has been accrued so far
OpenPosition
event OpenPosition(address user, uint amount0, uint amount1, uint borrow0, uint borrow1, uint amountLP, uint userLP);Events that occur when depositing to PlusPool
If the token to deposit is MESH,
msg.valueis provided.Parameters
user: address of the useramount0: The deposit amount of token0amount1: The deposit amount of token1borrow0: The utilization amount of token0borrow1: The utilization amount of token1amountLP: The amount of LP tokens minted due to additional liquidityuserLP: the total amount of LP tokens minted due to additional liquidity
ClosePosition
event ClosePosition(address user, uint amountLP, uint amount0, uint amount1, uint userLP);Events that occur when withdraw liquidity
Parameters
user: address of the useramountLP: The amount of LP tokens burned due to liquidity removalamount0: The withdraw amount of token0amount1: The withdraw amount of token1userLP: the total amount of LP tokens minted due to additional liquidity
Liquidate
event Liquidate(address user, uint idx, uint debt0, uint debt1, uint lp, uint debtRatio, uint time);Event that occur when the automatic return system activates
Parameters
user: address of the useridx: Number of auto-return countdept0: Number of token0 returned automaticallydept1: Number of token1 returned automaticallylp: the total amount of LP tokensdebtRatio: Asset utilization ratio in case of automatic returntime: Automatic return time
Last updated