-
Notifications
You must be signed in to change notification settings - Fork 3
[KIP-001] - Prioritize Kolibri Liquidity Pool for Liquidations #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Kolibri Improvement Proposal #01 | ||
|
||
### Preface | ||
Hello everyone :) | ||
I am honored to present the first Kolibri Improvement Proposal. I feel like Satoshi in some sense right now. | ||
Kidding aside, I welcome and encourage everyone to participate in this and other proposals. | ||
Lets not forget that as kDAO holders and as a community, we are in the control of the future and success of Kolibri. | ||
I should also thank the Kolibri dev team for their hardwork and support. | ||
|
||
### Summary | ||
An onchain executable procedure to priorotize the Kolibri Liquidity Pool for oven liquidations. | ||
|
||
### Motivation | ||
The Kolibri Liquidity Pool (KLP) is an important and integral part of the kUSD algorithmic stable coin. | ||
It serves at least the following purposes : | ||
1. Makes sure that big ovens that may not be liquidable by individuals, can be liquidated by the pooling the resources of individual kUSD investors. | ||
2. Provides a fair return for the investors who are willing to help the kUSD ecosystem stability. | ||
|
||
|
||
The current implementation doesnt prioritize the KLP and individual investors compete for the liquidation of the under-collaterized ovens using high fees. | ||
Such implementation is not healthy for the ecosystem and will discourage the pool investors and may lead to disintegration of KLP due to small or no returns of their investment into KLP. | ||
In order to resolve this issue, I propose to give the KLP a X block priority for the liquidations. | ||
|
||
### Details | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One point I think we should clarify is that today, the in-protocol stability fund In this future, would they be able to liquidate in the [1] This is regardless of if the oven is underwater. The fund is currently controlled by a 1/3 msig, held by Hover Labs. Hover Labs has promised to never liquidate anything that isn't underwater. A future KIP to govern control of the fund / give it to a decentralized set of holders may be useful. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If an oven is underwater, I think the in-protocol stability fund should be able to liquidate it immediately and KLP should NOT be allowed to liquidate it because it would lose value. the purpose of the in-protocol stability fund was to manage underwater ovens from the start, not to gain from liquidating undercollateralized ovens. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Right now it looks like there's an admin check for the stability fund, so only the breakGlass contract can now do that (which would require a DAO proposal, which surely is way too long a time to wait). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh sorry, I think you're right in that it's a multisig and not the DAO/gov stuff. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think this is reasonable, having the stability fund be able to liquidate immediately is a general characteristic we're looking for for the stability fund's role, so if someone triggered the block timeout, and the stability fund liquidated it (or the stability fund were to just liquidate without kicking off the block timer) then that all holds logically IMO. |
||
In order to make an onchain executable procedure, I propose to make the Liquidation a 2 step process, Preliquidate and Liquidate. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's a quick high level view of how this works today. I think at a technical level to implement your proposal:
So we'd end up with:
Note: I've architected this system but I welcome debate on if there's a better technical design - I'm not an infallible engineer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I totally understand my proposal needs updating contracts and adds complexity, I am not a blockchain engineer so I dont comment on the design. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @keefertaylor wouldn't we be able to gate/manage this entirely at the minter? I feel like we might be able to actually hoist this into the existing system by upgrading the minter and rewriting the Then from the different roles:
Unless I'm missing something, I'm not sure there's anything else that needs updated but that one function. Benefits are minimal overhaul to the system, gives us the timeout mechanism we want to allow for the LP to liquidate things, and allows for individuals to liquidate as a last resort with a large economic incentive to keep on top of it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Additionally, if after 5 blocks (well N blocks) pass the oven is no longer liquidatable, the |
||
If an oven gets under-collaterized and is not in Preliquidation state, The Preliquidate entrypoint should be called which sets the Preliquidation state and prioritization expiry block height in the oven storage. | ||
The prioritization expiry block height is X blocks higher than the current block. (Can be 5 or 10 or ...) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should definitely add this as a constant in the minter's storage, which governance can update. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How complicated would it be to get this data though? Does the DAO contract need to be updated (which would be...complicated lol)? |
||
If an oven is in Preliquidation state and block height is less than expiry block height, only the KLP can execute the liquidate entry point. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do you deal with the case where (Assuming a buffer of 5 blocks):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If an oven is in Preliquidate state, it doesnt mean that it is liquidatable. It only means that KLP has the priority to exercise Liquidate procedure for X blocks from the time that flag is set. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we're over-complicating this a bit, why not just make the LP able to liquidate as long as ovens are under-collateralized (same with the stability fund), and then manage the individual actor path as its own case (with the block level tracking)? |
||
If an oven is in Preliquidation state and block height is higher or equal to expiry block height, meaning the prioritization duration has expired, anyone including KLP can execute the liquidate entry point. | ||
If an oven is in Preliquidation state but has become over-collaterized without liquidation for any reasons the ResetLiquidate entrypoint can be called which resets the Preliquidation state and expiry block height in the oven storage. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Who would be calling I think there's the possibility that we automatically reset the state if it is called There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should provide economical incentives to the users who help the govern and run the whole ecosystem. for example rewarding anyone who successfully executes Preliquidate, Liquidate for KLP and Resetliquidate entrypoints on ovens with 1 kUSD from the KLP because it is a service to the KLP and its investors. |
||
In order to make sure these procedures are followed and executed by the community, the proper economic incentives are provided by the Kolibri DAO and users executing these procedures are awarded accordingly. | ||
The award can be kDAO tokens or a percentage of the successful KLP liquidations or etc. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think with a sufficiently large LP reward rate (10%-50%) folks would retool to compete for having the LP do its thing, and then the individual liquidators can be used as a last resort (in case Quipu pauses the pool, or there's some other issue like 0 liquidity in the quipu pool). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a high level - why not just let the KLP always liquidate?
The only scenario I can think of is that:
In this scenario, the private investor could always contribute to the KL, and they'd receive a ratable share of the liquidation reward. Their share of the reward is split among folks in the pool, so it would be less if they were allowed directly, but should still be profitable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the 5 block priority time ? the block height is easy to measure on the blockchain which roughly translates to time. although it may not be 100% precise.
I dont think this resolves the issue, because the gain to users who liquidate the ovens individually are enormous, compared to anyone participating in the pool and hoping someone else would pay a 1000 XTZ fee to beat the others who are trying to liquidate an oven.
Competing to liquidate the ovens by the fees and hoping miners will pick it up, just does not sit right with me.
It is a proposal which I think should be considered seriously and be discussed.
From a technical point of view, it is much easier to implement and has less complexity but aside from that, I think letting both private users and KLP have access to Liquidate entry point brings more trust and stability into system.
If giving KLP priority in someway is hard to implement, probably it is the way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's real risk to this since with the LP as it is it may fail through a number of mechanisms, potentially destabilizing Kolibri overall. Having individuals still being able to liquidate things means we get to have our cake (prioritize/incentivize the LP) and eat it to (not worry about the negative consequences to the LP being the only liquidator). If Quipu doesn't have enough funds or there's some bug in the interaction there it could be catastrophic.
I do think the reward needs to be higher (probably min 10%, possibly more like 25%), but that's a separate thing.