Compensation Proposal: Distribute COMP to Affected Users in the DAI Liquidations

Agree, Coinbase can provide some data and stats about the event, but problem is that Coinbase Price Feed Data is a centralized part of the “decentralized” Compound protocol.

1 Like

I am looking into getting something submitted. Will report back soon.

3 Likes

Can you explain to me please what you want to say with this statement?
This statement means that I use a platform with low returns but on the other side I want to be part of Compound community (because I additionally farm COMP)?
That makes me a high-quality COMP holder,
and not a farmer whose main goal is profit (sell / dump COMP).

The point is that in the case of “DAI liquidation” every user who used the “borrowing service” was in danger.

I was liquidated two times in the last 16 months in Compound protocol but that was my fault, this time users are manipulated with planned attack.
I don’t need charity from protocol, I just want to be refunded the part of the funds that were taken away from me by that attack and be a more active member of the healthy community.
I understand, your perspective on this situation is different but please can you tell me what is long-term impact on the protocol if real affected users will not be compensated?

1 Like

Not sure if everybody saw this tweet from Synthetix Founder Kain Warwick regarding proposal 032, But I thought it was worth sharing here:

I voted yes on Compound proposal 032. This proposal would distribute COMP to offset losses incurred by liquidated DAI positions. I thought about this a lot over the weekend, and while I expect the proposal to fail here is my reasoning regardless. Factoring in all risk is probably the defi platform I trust most. Excluding SNX there have been times when 50% of my crypoassets have been on deposit there. I think it is one of the safest places in DeFi you can put your funds. However, there are risks, and liquidations due to anomalous prices are foremost among these. The reason I voted yes is that I want to ensure there is skin in the game for all COMP holders, so they are hyper aware that the funds on deposit are at risk, and they are responsible. Right now there is indirect alignment between COMP holders and depositors, while this proposal sets an aggressive precedent I think it is one which is unlikely to be repeated in the future if all Compound stakeholders are aligned. This is also a good initiative to restore trust. The final point I will make is that I would highly suggest the Compound community at least discuss with Chainlink, the possibility of using their oracles as a backstop. And I say this as someone who holds no LINK, but as an SNX I am holder extremely aligned with CL security.

I again want to applaud @kybx86 on the valiant effort on prop 032. While the proposal did not pass in current form, it helped to propel the conversation forward by giving us a reference point on which to base our discussions, offer alternative routes to compensation, discuss issue prioritization etc.

That said, that several notable entities who publicly shared their reasoning (i.e. Polychain, Pantera, Kain from Sythetix) all pointed at Compound’s oracle design as a key area that needs improvement, regardless of how they voted on this proposal. Obviously I am in agreement with the sentiment, and as stated before, I am looking into submitting a CAP along these lines. If anybody wants to work with me on this feel free to shoot me a message. Would love the support!

10 Likes

A valuable next step may be to summarize all the compensation proposals we have so far to make it easier to examine their merits.

4 Likes

Thank you for your input, @ekrenzke . It is great to have your involvement and I appreciate you keeping an open mind.

This I agree with completely.

The protocol worked as designed, but the design was clearly flawed. The Coinbase oracle printed an off-market price and Compound accepted it. Legitimate users were unnecessarily liquidated.

I am not sure why you make this statement. I was liquidated and all I had done was supplied ETH/WBTC and borrowed DAI to the 80% limit which was described as a “safe max”. I was not doing anything particularly unusual other than using the protocol to borrow DAI. How is that behavior not long term aligned? Is the protocol not meant to be used?

If your statement does not apply to the entire set of users that were liquidated, but rather only the subset of liquidated users that were doing loop-farming, then I do agree with you.

All that said, I personally do believe that we can come up with a better proposal. 8% across the board makes DAI-DAI famers completely whole, while leaving “legitimate” users with as little as ~25% reimbursement on their losses. Effort should be made to understand the losses in more detail.

7 Likes

It seems like if we modify the proposal, there is actually a chance that it would pass. and I do think if it passes it will be a very positive message overall and show that the community do have the power to protect users in events like this. If anyone is working on a revised proposal and need help, please let me know.

6 Likes

We can simply add okex to the list of the reporters. They post prices but aren’t included. We could also add more reporters, chainlink to me just isn’t the best option because it’s very prone to human error, and had a problem with aave not too long ago.

1 Like

Your comments about chainlink sound interesting. Would be great, if you could write some more details over in the chainlink thread.

3 Likes

the proposal was not accepted by the VC funds due to compensation in the COMP token (mostly) as far as I understood from their statements.
I understand them because the 2 biggest liquidated addresses would get big bags of governance power.
I think the fairest calculation for compensation is suggested by @jacobdecatur and @wario - weighted compensation - in DAI.
Argument against proposal by @blck makes sense

I think that every component of a decentralized system should be decentralized, so in this “oracle case” it is necessary to plug in more price discovery sources. The protocol must use global cryptocurrency prices.

I also wonder if anyone works on new proposal?

I agree with you

6 Likes

Im my view adding more reporters only nominally mitigates the situation, as simply taking the median across a select few exchanges still does not provide adequate market coverage (it also doesn’t take into account volume and liquidity differences across exchanges like data aggregators do).

As @cryptix said, would love to hear more detailed thought on this comment in the Chainlink thread so I can better understand.

2 Likes

Hi everyone, I’d like to first make an attempt at summarizing a couple of the concerns expressed by others in this thread, including @lay2000lbs @tonyotonio @ekrenzke @franklin-pantera that might have resulted in this proposal not gaining the required support:

  1. Some of the largest liquidated accounts were using the protocol in a way that is not intended, and displayed behavior not well aligned with the long-term interests of the protocol (aka Recursive farmers, wash lenders)
  2. COMP is a governance token, any compensation should come from the DAI reserves

With that in mind, I have been working on an idea for which I would like to solicit feedback from the community, on its soundness and on if it’s considered worth pursuing further.

I’ve done some work to discern the accounts that were engaging in farming and to what extent if they were. By using the following formula we can quantify this for any Compound user. Let’s call it recursive factor for lack of a better name

Screenshot from 2020-12-18 17-22-36

Where:
t = Tokens the user has borrowed or supplied as collateral
CFactor = Collateral factor for the token in question
Supply,Borrow = Self descriptive for the token in question and converted to Dollar value

A couple of examples might help to illustrate how this works out:

  1. Alice supplies 10M DAI, subsequently borrows 7.5M DAI, then recursively does this again and again, and ends up with a total supply of 40M DAI and total borrows of 30M DAI. The collateral factor for DAI is 0.75, so Alice would have a recursive factor of 1
  2. Bob deposits ETH for 10M worth of value, borrows 7.5M DAI, exchanges the borrowed DAI for ETH, which he again deposits to the protocol for another DAI loan, and so forth until his account ends up with 40M worth of ETH supplied and 30M worth of DAI borrowed. Bob is leveraged up on a long ETH and short USD position. His recursive factor is 0

What determines the recursive factor is not how leveraged up a position is, but what proportion of their supplies and borrows are in what we could call “wash loans” which serve no seeming purpose other than farming COMP. So for the purposes of this metric, all stable coins in the system are counted as a single asset. Another example might illustrate this point:

  1. Carol supplies 10M USDC, subsequently borrows 7.5M DAI, exchanges the borrowed DAI for USDC, then recursively does this again and again, and ends up with a total supply of 40M USDC and total borrows of 30M DAI. The collateral factor for both DAI and USDC is 0.75, so Carol would also have a recursive factor of 1

I analyzed all the liquidated accounts using this proposed metric, and have created a spreadsheet with the results. The columns in green are there just to demonstrate the formula described above. All the supplies and borrows are using coingecko USD prices for the day of the liquidation event, except for stable coin prices which I fixed at $1, and all account values are taken from a snapshot at block 11332733 which is 1 block before the first liquidation. I’d of course happy to share the code used so that it can be properly audited by the community.

A summary of the results is that out of 122 distinct liquidated accounts, 87 have recursive factors of basically 0, and only 29 have a recursive factor greater than 0.50.

I also added a column that computes one possible compensation scheme based on this recursive factor that results in a total compensation of 2.22M as opposed to the 6.8M originally proposed. There are other ways to use the recursive factor to compute possible compensation, and I don’t think this one is necessarily the ideal one, I added this one simply to get an idea of how much recursive farming could impact the proposed compensation.

It’s worth noting that both the supply and borrow columns for assets have been converted to USD value using the coingecko prices for that day, and the supply columns have been multiplied by each asset’s collateral factor

The spreadsheet in question can be accessed here

I’ve also made a simple web app that generates account history charts, as shared in my posts above, and also computes the recursive factor for any account, which can be accessed here (It requires a browser with Metamask).

In addition to sharing the code used for this, there is further possible work that has been suggested by different members of the community, which might also be relevant for deciding on possible compensation schemes.

  1. Calculate the prices of liquidations, as some accounts that had non-DAI collateral seized lost more than the 8% liquidation incentive.
  2. Calculate what accounts would have gotten liquidated on that day due to other collateral assets crashing in price, had DAI remained at parity with the global market price, and to what amount they would have gotten liquidated if that is the case
  3. Check if there are other accounts that might have gotten liquidated due to the DAI price, but for which the liquidator might have repaid a non-DAI loan. These would not have been included in the originally shared liquidations spreadsheet.

I appreciate any feedback here, and if there’s some form of soft approval from the community, and no important issues with what I’m proposing, I’m happy to continue work on next steps, including possibly creating a new formal compensation proposal.

Finally I’d like to sincerely thank @kybx86 for getting the ball rolling, not only on a proposed compensation, but I think more importantly on starting to address the issue of DAI market risk the protocol currently faces.

7 Likes

I’m a fan of all of these

  1. Calculate the prices of liquidations, as some accounts that had non-DAI collateral seized lost more than the 8% liquidation incentive.
  2. Calculate what accounts would have gotten liquidated on that day due to other collateral assets crashing in price, had DAI remained at parity with the global market price, and to what amount they would have gotten liquidated if that is the case
  3. Check if there are other accounts that might have gotten liquidated due to the DAI price, but for which the liquidator might have repaid a non-DAI loan. These would not have been included in the originally shared liquidations spreadsheet.

They should be trivially computable from the transactions, and seem fair.

3 Likes

I will repeat more or less what I have written in the governance discord commenting the work of @wario but also the general handling of this liquidation event.

First of all I am not trying to “throw him under the bus” as another user has commented there and I respect his work on this situation that is trying to get some money back to the users that got liquidated. Second, I would like to point out that I am biased as I was in fact one of those users and I was also “looping” (farming) but also hedging my position.

Now to the main points that he has risen I disagree on some things. I basically disagree with the main idea which is - if I was to summarize it - comprised of two basic points: 1) spend around the amount there is in the DAI reserves, 2) categorise compound users to “farmers” and “non farmers” and punish farmers.

In my opinion the appropriate way to handle this is: 1) ask if everything worked as intended? lets agree on that first, 2) if not, then fix it, 3) if it is fixed then calculate what each user lost in this incident and 4) go from there.

For what is worth, I am not an idiot and I see the good practical merits that his work is doing by trying to compromise different opinions of big COMP holders and for that I sincerely thank him because his work and its direction will get a % of the amount I lost back.

Now to the main points he is making I disagree in particular with:

  1. The categorisation of users. “Some of the largest liquidated accounts were using the protocol in a way that is not intended”. If this is not intended why do not you said so? And by “you” I mean compound in the MAIN PAGE. Secondly why dont you try to discourage it? Even now if you think that users should not be able to borrow and loan the same asset then code it like that or at least put a warning when users do it to say that this is not allowed/intended whatever. If this needs fixing then fix it. But doing nothing and afterwards using this as an excuse to divide us is not fair at all. Some would even say it is illegal.

  2. The way this categorisation is supported by pseudomath. By pseudomath I mean the creation of the recursive factor that has generalisations and assumptions and does not describe specific important parts of the situation: a) Assumption: Someone that supplied USDC/USDT and borrowed DAI by leveraging his position is automatically named a “farmer” with recursive factor of 1. That is not true. She could be short DAI in that situation. Actually that is the only thing that we can say for certainty for this user “she was short DAI with leverage, DAI went to 1.3 USDC and she got liquidated”. The math formula takes for granted that this would not be the case at all. She is a farmer period. I agree that most probably she was but not 100%! b) Hiding. The hiding of the riskiness of a users position. Does it matter if one would get liquidated when DAI went to 1.05 as opposed to a user that got liquidated because DAI hit 1.2? I would say YES. Because we are talking about some very different users here. One was prudent and the other was a gambler. DAI can move up and down but not to 1.2 or 1.3 (at least without messing the whole defi sector). The above math formula makes no such distinction on the repayment from what I can tell. Which user behaviour is healthier for the compound protocol?

The only category of users that has a 100% probability being a farmer is the one that supplied asset X and borrowed the exact X only. That is self explanatory I think. Note that those guys did not get liquidated…

  1. I particularly dislike the fact that the above does not answer the simple question: How much money the 120 or so users lost in this event and how much money this proposal returns to them (as a %). For me PERSONALLY it makes a hell of a difference to think/say “compound community covered their users by giving them back 30%-50%-100% of the money they lost and fixed that shit ASAP” versus “compound community gave 2% back to their users and still does not know if there is anything to fix”.

So, I see that the interests of big COMP holders and compound users are not really alligned in this and I will repeat that this saddens me as I believe this protocol is the gem of defi with the best security around that I STILL use. This saddens especifically when I see protocols like harvest.finance or YFV that try to compensate their users when they lost money without their fault without trying to divide them.

What I suggest?

For starters I would suggest, first of all, to fix the oracle or whatever needs fixing so this does not happen again. After that I would suggest the big holders of COMP that decide all the proposals to discuss themselves if and how much money they want to give to us to help the trust of the compound protocol. After all, they created this protocol and/or took the risk to invest in it and guys like @wario busted his ass to put this proposal forward so as to reimburse guys that have contributed nothing to compound (like me) and just came to use it and profit from it by farming some, hodling a little and hedging a lot.

Whatever you big COMP holders decide do not divide the users because that is certainly “not alligned with the protocol’s long term health”.

7 Likes

Hi @Azalin, thanks for your continued feedback.

The categorisation of users . “Some of the largest liquidated accounts were using the protocol in a way that is not intended”. If this is not intended why do not you said so? And by “you” I mean compound in the MAIN PAGE

It is not fair to say that this is not discouraged, it is in fact impossible to do recursive farming using the standard Compound UI, people doing so are interacting with the contracts directly. Aside from people recursively farming with 2 different stablecoins, which is still possible from the standard UI.

a) Assumption : Someone that supplied USDC/USDT and borrowed DAI by leveraging his position is automatically named a “farmer” with recursive factor of 1. That is not true. She could be short DAI in that situation.

You are correct. In fact, I brought up this precise situation in the governance Discord, and should have included in the forum post. I’m fine with making that assumption, as it seems pretty clear to me that the person in the example is not “short DAI”, but just farming COMP, but I agree that there is no way to prove this.

b) Hiding . The hiding of the riskiness of a users position. Does it matter if one would get liquidated when DAI went to 1.05 as opposed to a user that got liquidated because DAI hit 1.2?

The riskiness of each account is not the main intended purpose of what I’m proposing here, though it is implicitly accounted for. Given two recursive farmers with the same assets, the one with a higher leverage would naturally have a higher recursive factor since the difference between their supply and borrow will be smaller than the user with lower leverage. However, if the community thinks this is important to account for, this formula could be easily amended to take into account the account’s health to explicitly factor in riskiness. I actually think this is a good idea.

The only category of users that has a 100% probability being a farmer is the one that supplied asset X and borrowed the exact X only. That is self explanatory I think. Note that those guys did not get liquidated…

Some of these accounts did get liquidated, in fact that was the precise case with the largest farming operation, given it was mostly doing recursive farming with DAI, but also had a small proportion of their collateral in USDC. If we count each stable coin separately, while using the same proposed formula, this account would still have a high recursive factor, though not pretty much 1 which is the case now when counting all stablecoins as a single asset.

I particularly dislike the fact that the above does not answer the simple question: How much money the 120 or so users lost in this event and how much money this proposal returns to them ( as a % ).

I understand and agree, and that is why I specifically suggested in the post this could be done as future work. Along determining what accounts would have gotten liquidated anyway regardless of DAI price staying on par with global pricing, as other collateral assets were crashing in price during the event.

Whatever you big COMP holders decide do not divide the users because that is certainly “not aligned with the protocol’s long term health”

I disagree with the suggestion that there is no difference between normal users and recursive farmers. Farmers are not providing anything to the protocol as they are both supplying and borrowing their own capital, and the interests they are paying is a tiny fraction of the COMP value they extract from the system. Perhaps more importantly, they are diluting the COMP incentives that would otherwise go to normal users. Today the vast majority of COMP rewards is most likely going to these farming operations, gaming the incentives at the expense of normal users. I do not understand why Compound users are not up in arms about this situation, I suspect it may be because it has not been measured publicly. I hope to start another thread in that regard and suggest a way to remedy the situation.

4 Likes

Sounds like there are two separate issues here.

  1. What is the raw damage as a %.
  2. What modifiers should apply to this based on user behavior (e.g. recursive-factor)

For 1), the value should be computable based on the liquidation transactions and should include the value of the real damage in the false liquidation (what was sold to cover the manipulated DAI + the 8% penalty) minus the value of what would have been lost had the position been legitimately liquidated at real asset prices.

Once you have that value, we can discuss whether or not there should be a modifier applied to it like this recursive factor.

2 Likes

I think that If there is no community agreement in that there is a fundamental and objective difference between normal users and recursive farming operations, then there isn’t much point in calculating off-price damages at all, as that would only increase the originally budgeted compensation that has already been voted against.

2 Likes

I appreciate your time spent to balance a compromise between users and VC funds, but the calculated compensation is charity and humiliating for affected users.
It is difficult to categorize users and track how much their collateral values have fallen per asset, because the liquidation would not have taken place if the DAI had not been manipulated.
Now we are trying to show via webapp how bad the user’s risk management is in order to solve the problem with CHARITY which realistically almost covers the costs of the gass fee in an attempt to save the position.
Users are not at a loss because of their risk management nor can you prove it with math because the problem is created by GLOBAL DAI PRICE vs COINBASE DAI PRICE. Any attempt to hide the manipulation and portray it as an internal problem puts the blame on a poor price discovery solution.
This situation has shown that a relationship between PROTOCOL OWNERS and USERS has been created which is equivalent to the relationship in traditional finance and business.
You can’t buy users with a few dollars, users are participate with confidence in the protocol and in the way it should work.

3 Likes

Agree with you, cover false liquidation cost + 8% is fair solution. Reducing that amount with pseudomath isnt solution.

1 Like

There is no proof that price was manipulated. Even if other exchanges did not show the spike, it does not prove manipulation. One might be able to say that the Coinbase orderbooks were inadequate to take that volume, but then the VOL during the 2hrs during that spike 2.37M, 1.79M. So it doesn’t even seem that their books were thin.

Right now that spike would only amount to being circumstantial and would need further proof to show actual manipulation.

To note: The 24h volume of the top5 exchange with direct dai - usd/usdc/usdt pairs are as follows:

  • Coinbase DAI/USD - 6.881m usd
  • Binance DAI/USDT - 6.380m usd
  • Curve DAI/USDC - 4.55m usd
  • 1inch DAI/USDC - 3.14m usd
  • Okex DAI/USDT - 2.38m usd

One might give that using only Coinbase as the sole price oracle is inadequate, but there being a single price oracle is widely known. And one would expect those who did not use the default compound interface to do further research while going into something risky (Perhaps loop farmers were thinking this was virtually 0 risk return, but then you would probably have come across Dai’s black
Thursday and how MakerDao voted not to compensate liquidated vaults) .

1 Like