Skip to content

Minimum Yield Threshold Circuit Breaker#335

Open
ene-rizzles wants to merge 2 commits into
Vesting-Vault:mainfrom
ene-rizzles:feat/yield-circuit-breaker
Open

Minimum Yield Threshold Circuit Breaker#335
ene-rizzles wants to merge 2 commits into
Vesting-Vault:mainfrom
ene-rizzles:feat/yield-circuit-breaker

Conversation

@ene-rizzles

Copy link
Copy Markdown

Summary

Implements an automatic circuit breaker that triggers emergency withdrawal when external lending pool APY drops below the cost of gas to harvest it or goes negative.

Changes

  • \contracts/yield_circuit_breaker/\ — New contract with:
    • Per-protocol APY tracking and gas cost monitoring
    • Configurable minimum APY threshold (default 0.5%)
    • Emergency withdrawal trigger when yield drops below threshold
    • Admin configuration for cooldown and auto-withdraw settings
  • Updated \Cargo.toml\ workspace

Closes

Closes #220

- TWAP oracle for time-weighted average pricing
- Delayed state commits with cooldown periods
- Price manipulation detection and prevention

Closes Vesting-Vault#219
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

Successfully merging this pull request may close these issues.

Minimum Yield Threshold Circuit Breaker

2 participants