Skip to content

Flash Loan Defense During Yield Harvesting#334

Open
ene-rizzles wants to merge 2 commits into
Vesting-Vault:mainfrom
ene-rizzles:feat/flash-loan-defense
Open

Flash Loan Defense During Yield Harvesting#334
ene-rizzles wants to merge 2 commits into
Vesting-Vault:mainfrom
ene-rizzles:feat/flash-loan-defense

Conversation

@ene-rizzles

Copy link
Copy Markdown

Summary

Protects the vault from flash-loan manipulation during yield harvesting by implementing TWAP-based pricing and delayed state commits.

Changes

  • \contracts/flash_loan_defense/\ — New contract with:
    • TWAP oracle for time-weighted average pricing
    • Delayed state commits with configurable cooldown
    • Price manipulation detection and event emission
    • Admin-configurable parameters (min hold ledgers, seconds, TWAP window)

Closes

Closes #219

- 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.

Flash Loan Defense During Yield Harvesting

2 participants