Skip to content

Pool Cover

Lucas Manuel edited this page Aug 25, 2022 · 3 revisions

Providing Pool Cover is done in the Maple protocol to cover Liquidity Providers against losses that could be sustained by Loan defaults. Providing Pool Cover is performed by DeFi users who would like to earn a higher yield, and who are willing to assume more risk to do so.

In order to provide Pool Cover, users must first add liquidity to the MPL-USDC 50-50 Balancer Pool to mint Balancer Pool Tokens (BPTs), or can buy these BPTs directly. Every Pool in Maple has a corresponding StakeLocker that it uses for its staking functionality. Once BPTs are staked in the StakeLocker, StakeLocker Funds Distribution Tokens (FDTs) are minted and given to the Pool Cover provider. These FDTs are used to claim all future interest that is earned by the StakeLocker corresponding to that Pool, since Pools reward the StakeLockers with a portion of the revenue generated in compensation for assuming more risk.

When a default occurs in a Loan, all the collateral in the CollateralLocker corresponding to that Loan is liquidated. Since the majority of Loans in the Maple protocol are undercollateralized, there may be a loss that is incurred by the Pool due to the difference between the amount recovered from the liquidation and the amount of remaining principal owed on the Loan.

To cover this, all BPTs are pulled from the StakeLocker. In the example of a USDC Loan, the minimum amount needed is calculated using the following logic:

  1. Calculating the total available swapOut amount in the stakeLocker (denominated in USDC)
  2. Calculating the maximum allowed swapOut amount of the Balancer pool (done by multiplying the current USDC supply present in the Balancer pool by the MAX_OUT_RATIO constant in Balancer, which is 1/3 of the current USDC supply, covered in their documentation here)
  3. Using the minimum between these two values, availableSwapOut
  4. Using the minimum between availableSwapOut and defaultSuffered

In the case where availableSwapOut >= defaultSuffered, there will be leftover BPTs that are returned to the StakeLocker, and the LiquidityLocker will be transferred an amount of USDC equal to the difference between the amount recovered from the liquidation and the amount of principal owed on the Loan.

In the case where availableSwapOut < defaultSuffered, this means that there is still a shortfall, which is passed on to the LPs. This is covered in more depth on this page.

The burning mechanism uses exitswapExternAmountOut in Balancer, which is documented in Balancer's documentation here.

Essentially, the burning mechanism burns a number of BPTs and pulls out an amount of an asset from one side of the pool to be applied to cover losses arising from Loan defaults.