feat(specs): add session scheme for EVM streaming payment channels #2080
feat(specs): add session scheme for EVM streaming payment channels #2080jimmyye123 wants to merge 5 commits intox402-foundation:mainfrom
Conversation
- Replace transferWithAuthorization with receiveWithAuthorization (enforces msg.sender == to, blocks mempool signature extraction) - Expand Section 12.13 with parameter-substitution front-running and deterministic-nonce mitigation (keccak256 over channel params) - Pack (v, r, s) into bytes signature in openWithAuthorization / topUpWithAuthorization for consistency with settle / close Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- topUpWithAuthorization gains topUpSalt parameter; nonce formula becomes keccak256(channelId, additionalDeposit, from, topUpSalt) so repeated top-ups of the same amount produce distinct nonces - TopUp payload (feePayer: true) carries topUpSalt - Voucher-merge deposit.salt becomes unconditional Required (dual-purpose: channelId on open, topUpSalt on topUp) - close() forfeit path: signature MAY be empty when cumulativeAmount <= channel.settled - Token compatibility note: escrow calls USDC v2.2 bytes overload of receiveWithAuthorization directly; (v,r,s)-only tokens are unsupported - ERC-1271 smart-wallet voucher signing: authorizedSigner MAY be either an EOA (ecrecover) or an ERC-1271 contract wallet (isValidSignature), removing the EOA-delegation requirement Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
@jimmyye123 is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
|
This is a strong addition, @jimmyye123. The one thing I’d lock down before multiple SDKs implement it is session continuity across A verifier should be able to tell which vouchers belong to one session even after balance changes. I’d add vectors for:
That would keep implementations from drifting on what counts as the same session. |
|
Hi @jimmyye123, thanks a lot for putting this up! We’ve been working through the same problem space and landed on the batch-settlement EVM spec in #2051, which aligns with the network-agnostic batch-settlement spec from Cloudflare in #1145 Lots of overlap (unidirectional, cumulative vouchers, gasless deposits) with the most notable differences being:
Closing in favor of #2051 to keep discussion in one place, we would appreciate your feedback there |
Add the
sessionscheme specification for EVM, enabling streaming payment channels via on-chain escrow and off-chain EIP-712 cumulative vouchers. Ships both the network-agnostic scheme definition and the EVM-specific implementation.Files:
Tests
N/A — documentation only. No TypeScript / Python / Go source changes, so pnpm test, uv run pytest, and go test ./... are not applicable.
Checklist
[x] I have formatted and linted my code — N/A (docs only)
[x] All new and existing tests pass — N/A (docs only)
[x] My commits are signed (required for merge) — verify before merge; rebase to sign if needed
[x] I added a changelog fragment for user-facing changes — skipped per template guidance (docs-only changes can skip)