Skip to content

Add flash loan attack prevention with price manipulation detection #379

@Smartdevs17

Description

@Smartdevs17

Description

Flash loans can be used for price manipulation attacks. Implement detection and prevention mechanisms including TWAP usage and sandwich attack mitigation.

Acceptance Criteria

  • TWAP-based pricing during flash loans
  • Flash loan amount limits relative to pool liquidity
  • Price impact calculation and revert on excessive impact
  • Concurrent flash loan detection
  • MEV protection for liquidation pricing
  • Attack simulation in test suite

Technical Scope

  • stellar-lend/contracts/lending/src/flash_loan.rs
  • stellar-lend/contracts/lending/src/mev_protection.rs
  • stellar-lend/contracts/hello-world/src/flash_loan.rs
  • stellar-lend/contracts/hello-world/src/mev_protection.rs
  • Edge: oracle manipulation via flash loans, multi-block MEV attacks

Metadata

Metadata

Assignees

Labels

200-points200 point issueStellar WaveIssues in the Stellar wave programdrips-waveDrips Wave project taskhighHigh priority issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions