Skip to content

fix(mintburn): bind direct-flow funding via in-call pull (not held balance) - #1513

Open
SashaMIT wants to merge 2 commits into
across-protocol:masterfrom
SashaMIT:fix/direct-flow-funding-guard
Open

fix(mintburn): bind direct-flow funding via in-call pull (not held balance)#1513
SashaMIT wants to merge 2 commits into
across-protocol:masterfrom
SashaMIT:fix/direct-flow-funding-guard

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • directReceiveMessage / executeDirect previously spent quote.amount / amountLD with no proof that this call funded the quote (CCTP receiveMessage enforces minted-balance-delta).
  • First guard (balanceOf(this) >= amount) still let a compromised DIRECT_CALLER_ROLE spend pre-existing in-flight / orphaned balance.
  • This PR pull-funds from msg.sender in 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)
  • Residual case: orphaned dst balance alone reverts; caller must fund via allowance

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>
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>
@SashaMIT SashaMIT changed the title fix(mintburn): direct-flow entrypoints execute unfunded quotes (missing balance guard) fix(mintburn): bind direct-flow funding via in-call pull (not held balance) Aug 8, 2026
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