Skip to content

Add flash loan manipulation guards#401

Open
TUPM96 wants to merge 1 commit into
Smartdevs17:mainfrom
TUPM96:codex/flash-loan-manipulation-379
Open

Add flash loan manipulation guards#401
TUPM96 wants to merge 1 commit into
Smartdevs17:mainfrom
TUPM96:codex/flash-loan-manipulation-379

Conversation

@TUPM96
Copy link
Copy Markdown

@TUPM96 TUPM96 commented May 25, 2026

Closes #379

Summary

  • add configurable flash-loan security limits for loan/liquidity, price impact, and TWAP deviation
  • track per-asset active flash loans and latest security snapshots
  • block liquidation pricing while debt/collateral asset is in an active flash loan
  • add tests covering liquidity caps, excessive price impact, and TWAP liquidity manipulation simulations

Tests

  • cargo fmt -p stellarlend-lending
  • cargo check -p stellarlend-lending --lib
  • cargo test -p stellarlend-lending -- --test-threads=4

Copilot AI review requested due to automatic review settings May 25, 2026 11:41
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@TUPM96 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

Add flash loan attack prevention with price manipulation detection

2 participants