Skip to content

Prevent deposit and withdrawal in the same transaction#183

Closed
ashhanai wants to merge 1 commit into
mainfrom
feat/rebalance-guard
Closed

Prevent deposit and withdrawal in the same transaction#183
ashhanai wants to merge 1 commit into
mainfrom
feat/rebalance-guard

Conversation

@ashhanai
Copy link
Copy Markdown
Collaborator

@ashhanai ashhanai commented Mar 4, 2026

This PR implements rebalanceGuard that reverts if deposit/mint and withdrawal/redeem happen in the same transaction. The guard is applied to deposit, mint, withdraw, and redeem functions.

The purpose of the guard is to prevent MEV bots from rebalancing protocols treasury, which is done mainly via flashloans.

@ashhanai ashhanai requested a review from carlosgj94 March 4, 2026 21:51
@ashhanai ashhanai closed this Mar 9, 2026
@ashhanai ashhanai deleted the feat/rebalance-guard branch March 9, 2026 15:43
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.

1 participant