Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acknowledge non idempotence of updateWithdrawQueue #371

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

MathisGD
Copy link
Contributor

@MathisGD MathisGD changed the base branch from main to post-cantina December 28, 2023 16:55
@MerlinEgalite MerlinEgalite changed the title acknoledge non idempotence of updateWithdrawQueue acknowledge non idempotence of updateWithdrawQueue Dec 28, 2023
@MerlinEgalite MerlinEgalite mentioned this pull request Dec 28, 2023
@MerlinEgalite MerlinEgalite requested review from a team, adhusson, Rubilmax, QGarchery and Jean-Grimal and removed request for a team December 28, 2023 17:27
@MathisGD MathisGD merged commit b833b0a into post-cantina Dec 29, 2023
6 checks passed
@MathisGD MathisGD deleted the docs/acknoledge-non-idempotence branch December 29, 2023 11:53
@@ -159,6 +159,7 @@ interface IMetaMorphoBase {
/// market to be empty can be griefed by a front-run. To circumvent this, the allocator can simply bundle a
/// reallocation that withdraws max from this market with a call to `updateWithdrawQueue`.
/// @dev Warning: Removing a market with supply will decrease the fee accrued until the next deposit/withdrawal.
/// @dev Warning: updateWithdrawQueue is not idempotent. Submitting twice the same tx will change the queue twice.
Copy link

Choose a reason for hiding this comment

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

Nitpick: updateWithdrawQueue here is not wrapped by ` but in the above comments it is.

Copy link
Contributor

Choose a reason for hiding this comment

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

nitpicking goes brrrrr

Copy link

Choose a reason for hiding this comment

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

nitpicking goes brrrrr

it's a trap!

@QGarchery QGarchery mentioned this pull request Jan 2, 2024
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.

updateWithdrawQueue can be front-runned so the end result depends on the order of txs
4 participants