-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harm mitigation in liveness faults #570
Comments
Beat me to writing an issue on it =) ! The goals here:
The current state of things:
The problem for CFMM LPs imo is mainly that the risk they took is going to give a lot of money to arbers, without them getting the opportunity to take a stop loss in the middle, or profit from natural volatility. The problem for orderbook style LPs is that they are basically rekt, and have huge PGA wars to be first. Solution ideas:
Architecture: I would like for the following fields to built into their own module:
And then other modules can import this. This should actually be of utility throughout modules in the code, and we should make things consistent. Then in gamm, perhaps we only care after 1hr of downtime. Or maybe we even care at 10 minutes. |
Increasing the swap fee is a probably a better solution to downtime than shutting down the swap because it minimizes harm to other parts of the economy that depend on the liquidity |
👍 Definitely on board with dynamically increasing swap fees after liveness failure. I think if done right this would basically trade a slowdown in price adjustment, for transferring the arb subsidy mostly from arbers to LPers. Having the swap fee start out really high and fall over a recovery window would create a falling price game for arbers, where they get a larger profit if they wait, but whoever goes first gets it. If arbing is competitive (or well automated), then we would expect prices to be arbed within swap fee bounds repeatedly over the recovery window. |
This is paper by Tarun Chitra(@pluriholonomic) et al observes that a liveness fault in a dex creates the possibility of unexpected losses for liquidity provides as price movements during the liveness fault are arbitraged against price movements during the fault.
The gamm module should track the time between blocks and if it exceeds a threshold value (maybe 1 hr) to start out with it triggers a pause on the swap messages and only allows removing or adding liquidity from pools.
It would also be good to allow instantly unstaking/unlocking LP positions in the event of extended liveness fault.
The text was updated successfully, but these errors were encountered: