# Explanation of Methodology to Calculate the Impact of MIP-14 on Moonwell Users

**URL:** https://forum.moonwell.fi/t/explanation-of-methodology-to-calculate-the-impact-of-mip-14-on-moonwell-users/351
**Category:** Community Proposal
**Tags:** moonriver
**Created:** [January 5, 2023, 8:27pm UTC](https://forum.moonwell.fi/t/explanation-of-methodology-to-calculate-the-impact-of-mip-14-on-moonwell-users/351 "2023-01-05T20:27:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jmo](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@jmo](https://forum.moonwell.fi/u/jmo)
#### Post date: [January 5, 2023, 8:27pm UTC](https://forum.moonwell.fi/t/explanation-of-methodology-to-calculate-the-impact-of-mip-14-on-moonwell-users/351/1 "2023-01-05T20:27:24Z")

</div>

Context

MIP-14 was passed via governance and executed on block 3260087:

- This mistakenly set [a protocol parameter](https://docs.moonwell.fi/moonwell-finance/protocol-info/protocol-information#collateral-factor) called the “collateral factor” almost to 0 (6400 instead of 0.64e18)
- The collateral factor determines if your position is eligible for liquidation, as this is used to calculate the health factor of the account
- A collateral factor near 0 caused the protocol to allow users to be liquidated, who otherwise had well funded accounts, because it effectively discounted the borrowing power enabled by USDC collateral deposits by over 99.9%.

**The Example**

Let’s take a look at an example user. For User 0x7f0759cb20de8c7a996db6f6c12b33314d0379c3:

1. They deposited funds into Moonwell, including USDC collateral
2. [MIP-14](https://gov.moonwell.fi/apollo/proposal/5) passed, discounting that collateral and making the account eligible for liquidation
3. The account was [liquidated](https://moonriver.moonscan.io/tx/0x0051e07985c9b352207d20914b5002fb08009d90e1ee30587556c7fcf75d90ab) a little over an hour later

The liquidation had the following impact:

 ![](https://europe1.discourse-cdn.com/flex017/uploads/moonwell/original/1X/f160bde7425626c7aece987a24294c0ae362edc8.png)

\*USD Prices for xcKSM are derived from CoinGecko by utilizing the max open and closing price for Dec 25th.

When liquidations occur in Moonwell, liquidators are sold that collateral at a 7% discount, while an additional 3% also [goes to the protocol](https://docs.moonwell.fi/moonwell-finance/protocol-info/protocol-information#protocol-seize-share) reserves, which is called the “protocol seize share”. This results in 10% of the liquidated amount being paid as a “liquidation penalty” in total. This occurred in two steps as shown in the on-chain [transaction](https://moonriver.moonscan.io/tx/0x0051e07985c9b352207d20914b5002fb08009d90e1ee30587556c7fcf75d90ab):

1. The liquidator repaid 11.82 xcKSM at a price of $23.60 = $297.15

2. This account has ~30.14 xcKSM in borrows left

3. The liquidator seized $316 of USDC

This results in the following:

1. 0x7f0759cb20de8c7a996db6f6c12b33314d0379c3 is out $29
2. A liquidator has $21
3. The protocol reserves have 8$

We determine the customer impact to be the amount of liquidation penalties paid, in this case - $29.

That is to say - Gauntlet calculates the customer impact as the liquidation incentive calculated from the repayment amount (debt owed) during the liquidation [event](https://github.com/compound-finance/compound-protocol/blob/master/contracts/ComptrollerG7.sol#L784-L786).

Gauntlet is working to return funds that are equal to the amount of impact per user. As 30% of these funds went to the reserve, we are going to submit a governance proposal to return those funds directly to users.

Gauntlet plans pay the remainder which is equivalent to the liquidator payout ($21). This, plus plus the money returned from the reserve should sum to the total user impact. This is equal to 10% of borrows repaid in the liquidation.

Hopefully this helps the community understand what happened and how we calculated the impact.

---

<div class="post-metadata">

### Author: ![baconlard](https://avatars.discourse-cdn.com/v4/letter/b/3da27b/32.png) [@baconlard](https://forum.moonwell.fi/u/baconlard)
#### Post date: [January 5, 2023, 8:40pm UTC](https://forum.moonwell.fi/t/explanation-of-methodology-to-calculate-the-impact-of-mip-14-on-moonwell-users/351/2 "2023-01-05T20:40:19Z")

</div>

Very helpful. Thank you.

---

<div class="post-metadata">

### Author: ![jmo](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@jmo](https://forum.moonwell.fi/u/jmo)
#### Post date: [January 5, 2023, 10:05pm UTC](https://forum.moonwell.fi/t/explanation-of-methodology-to-calculate-the-impact-of-mip-14-on-moonwell-users/351/3 "2023-01-05T22:05:14Z")

</div>

We also wanted to share a list of user liquidations as well. These are available on-chain, but it’s hard to find the transactions where your account was liquidated on Moonscan.

> **[Moonwell Incident 12/25 - Raw Liquidation Data](https://docs.google.com/spreadsheets/d/1qIYHMAp_vp9I2uNjvWY61TiJq1NY63Kd4VzJYO1wShs/edit#gid=27175280)**
>
> LIQUIDATIONS
> 
> block\_date,transaction\_hash,borrower,contract\_address,liquidation\_amount\_token,repay\_amount\_token,repay\_symbol,collateral\_symbol,transaction\_link
> 2022-12-25...

If anyone is interested in looking into this further, we thought this would help.
