8000 dex: oracle circuit breaker · Issue #674 · left-curve/left-curve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dex: oracle circuit breaker #674

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

Open
larry0x opened this issue May 3, 2025 · 0 comments
Open

dex: oracle circuit breaker #674

larry0x opened this issue May 3, 2025 · 0 comments

Comments

@larry0x
Copy link
Contributor
larry0x commented May 3, 2025

Since our DEX's liquidity pool is guided by an oracle, the biggest risk is the oracle reports incorrect data.

To prevent this, we should set circuit breakers. If any of these conditions are triggered, the liquidity pool won't place any order in the order book:

  • The price is too old (older than a preset threshold).
  • The price is too much higher or lower than a moving average. Note we should compute a moving average ourselves, instead of using Pyth's EMA feed, since the entire purpose of this circuit breaker is to prevent irregularities in Pyth feeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0