Skip to content

venue: honor the CoreDepositWallet destinationDex on EVM to Core deposits (0.2.9) - #6

Merged
piterxyz merged 2 commits into
developfrom
fix/deposit-destination-dex
Nov 17, 2026
Merged

piterxyz merged 2 commits into
developfrom
fix/deposit-destination-dex

Conversation

@piterxyz

Copy link
Copy Markdown

The sim credited every EVM to Core USDC deposit to the spot wallet, ignoring the destinationDex of the CoreDepositWallet call. On the real venue the simple margin agent's depositToCore(amount, 0) (depositFor(.., 0), the default perp dex) lands in the perp balance.

  • The bridge reads the deposit / depositFor call from the block's call trace and credits the wallet it names: 0 the default perp dex, u32::MAX spot, any other index that perpDexs dex. depositFor credits its recipient.
  • A call only counts when it targets the token's linked contract, is made by the depositor, carries exactly the amount that moved, and did not revert.
  • A plain transfer to the system address, HYPE deposits, and deposits whose call cannot be read (trace fault, unlisted dex, dex that does not take the token) still credit spot.
  • A perp credit is recorded as a send from spot into that dex in the ledger.

Tests: call decoding, trace matching rules, perp credit and ledger row. cargo test -p diorama-venue and clippy are clean.

…sits (0 credits the default perp dex, u32::MAX spot, depositFor credits its recipient)
@piterxyz
piterxyz merged commit a25f711 into develop Nov 17, 2026
1 check failed
@piterxyz
piterxyz deleted the fix/deposit-destination-dex branch November 17, 2026 10:17
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