Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Exit undercollateralized liquidation #529

Closed
wants to merge 7 commits into from
Closed

Conversation

NicholasDotSol
Copy link
Contributor

refs: #494

given an oracle price slip flash crash event, someone can initiate undercollateralized liquidation. This PR introduces a way to exit this liquidation flow back to the Active state.

  • The base auction bond percentage is reduced to give time for price recovery given a flash-crash event.
  • A new State was introduced. UNDERCOLLATERALIZED_LIQUIDATION_IN_PROGRESS. exiting the liquidation state can only happen from this new state. Liquidation should not be exited if there a signer abort or fraud.
  • redemptionTeardown gas savings was moved to purchaseSignerBondsAtAuction to avoid complications while exiting the liquidation state.

unresolved:

  • 70% auction base percentage reduced semi-arbitrarily.

NicholasDotSol added 7 commits March 16, 2020 23:22
To be called when we exit undercollateralized liquidation state
add an extra state specifically to keep track of liquidation
due to undercollateralization.

This is needed since this liquidation state
that can be exited via exitUndercollateralizedLiquidation
Allow for the ability to exit liquidation state if
the signer bond values recovers before liquidation occurs.
In case of a flash-crash, a lower base percentage
means there is more time for price recovery.
@Shadowfiend
Copy link
Contributor

@NicholasDotSol let's pull ee4cf3e out to its own PR so we can merge it. Still not convinced I want the rest of this, but I also don't want to close the PR yet… Just need to think about it some more, and don't want to block the liquidation percentage change.

@Shadowfiend
Copy link
Contributor

Commit in question was pulled out to #539. Holding on this PR for now.

@Shadowfiend
Copy link
Contributor

I'm going to close this PR without deleting the branch. We may revisit, but at this point it's highly unlikely this'll land before mainnet. We can reconsider this possibility for v2, however.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants