Repository navigation
Test rounding economics in Blue idle parking markets - #201
Closed
devin-ai-integration[bot] wants to merge 1 commit into
Closed
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Note
Lend orders can park funds in Blue idle markets, so integrators need to distinguish harmless share-price changes from losses. These tests exercise the actual Midnight bundle with no collateral or interest and reproduce a one-smallest-token-unit attacker profit after three dust parking round trips. This is accounting evidence, not a demonstrated gas-profitable exploit.
Context
Direct token donations do not change Blue's recorded market assets. However, share-denominated supplies round assets up, and full-share withdrawals round assets down; no interest is needed to move the conversion rate.
Concrete sequence, in smallest token units:
Impact of merging
Maintainers gain executable evidence for evaluating idle-market parking safeguards. This is test-only: contracts, deployments and SDK guards remain unchanged.
Special things to note
The positive-profit case depends on repeated one-unit victim round trips; the attacker does not control the lender. One unit would be 0.000001 USDC for a six-decimal token. No general immunity or economically viable attack is established. The tests call the contract directly and do not exercise SDK validation.
Change outline
main, no parent PR: measure actual token balances after idle-market parking and redemption.Evidence
forge test --match-contract MidnightBundlesV2MakerTest --match-test testIdleMarket -vv: 3 passed, including 256 fuzz runs.Link to Devin session: https://app.devin.ai/sessions/046b7521e4914cb6b6963a03528c9d72
Open in Devin Desktop: https://app.devin.ai/desktop/session/046b7521e4914cb6b6963a03528c9d72?variant=devin