fix(mintburn): bind direct-flow funding via in-call pull (not held balance) - #1513
Open
SashaMIT wants to merge 2 commits into
Open
fix(mintburn): bind direct-flow funding via in-call pull (not held balance)#1513SashaMIT wants to merge 2 commits into
SashaMIT wants to merge 2 commits into
Conversation
directReceiveMessage and executeDirect execute quotes for DIRECT_CALLER_ROLE holders without proving the backing funds arrived, while the CCTP-bridged path enforces a minted-balance-delta check for the same invariant. A compromised or malfunctioning role holder could execute unfunded quotes and spend balance belonging to in-flight flows. Require balanceOf(this) >= quote.amount / amountLD at entry in both direct paths. Signed-off-by: SashaMIT <sash@ela.city> Co-authored-by: Cursor <cursoragent@cursor.com>
SashaMIT
requested review from
bmzig,
mrice32,
nicholaspai and
pxrl
as code owners
August 5, 2026 18:57
balanceOf(this) >= amount still lets a compromised DIRECT_CALLER spend pre-existing in-flight/orphaned balance. Pull from msg.sender in-call so funding binds like the CCTP minted-delta guard. Src paths approve the dst handler after pulling from the user. Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
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
directReceiveMessage/executeDirectpreviously spentquote.amount/amountLDwith no proof that this call funded the quote (CCTPreceiveMessageenforces minted-balance-delta).balanceOf(this) >= amount) still let a compromisedDIRECT_CALLER_ROLEspend pre-existing in-flight / orphaned balance.msg.senderin the same call (src periphery pulls from the user, approves the dst handler, dst pulls). Funding binds like the CCTP mint delta.Test plan
forge test --match-contract CCTPDirectFlowTest(10/10)forge test --match-contract OFTDirectFlowTest(8/8)