specs(exact): add TRON exact scheme specification#2076
Conversation
Adds the scheme specification for the exact payment scheme on TRON, covering both assetTransferMethod variants already defined by the EVM spec: permit2 and eip3009. Payload schemas are byte-identical to scheme_exact_evm.md; only Base58 address format and TronWeb SDK differ. No runtime code; the @x402/tron TypeScript and Python implementations will follow in separate PRs after spec approval.
|
@boboliu-1010 is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
Replace mixed ellipsis+description placeholders in JSON examples
("T...<...>", "0x...<...>") with plain "T..." / "0x..."
to match the pattern used elsewhere in the examples. Replace
"<to be added before PR1 merge>" cells in deployment tables
with TBD; addresses will be filled via a follow-up commit once
the reference TRC-20 and x402ExactPermit2Proxy are deployed and
TronScan-verified on Nile.
|
@x402-foundation/core gentle ping — this spec PR (companion to #2075) has been open without review since 2026-04-20. Whenever someone has bandwidth, would appreciate a triage pass or initial feedback. Note: the failing Vercel check is due to deploy authorization scoped to the Coinbase team — not something I can resolve from this fork. The |
|
@boboliu-1010 Apparently, Tron does not have a proper CAIP chain id. There are two PRs to CASA: ChainAgnostic/namespaces#170 and ChainAgnostic/namespaces#162, and looks like you're using custom "tron:nile" identifier. |
|
@boboliu-1010 FYI: the chain ids are borked in the PR. Should be:
As for x402ExactPermit2Proxy contracts deployed:
|
Thanks @ukstv — agreed. I’ll update the spec&codes to avoid the custom tron:nile / tron:mainnet identifiers and use the TRON hex chain IDs instead. |
Description
Adds formal specification for the
exactpayment scheme on TRON, covering bothassetTransferMethodvariants defined by the EVM spec:permit2andeip3009. Payload schemas are byte-identical toscheme_exact_evm.md— same JSON field names, same EIP-712 typehashes, same Permit2 Witness pattern. TRON-specific rules are limited to address conversion (Base58 inpaymentRequirements,0xhex inside signed payload) and on-chain SDK (TronWeb vs. viem).Closes #2075.
specs/schemes/exact/scheme_exact_tron.md— full TRONexactspec (both paths).specs/schemes/exact/scheme_exact.md— appends TRON to the scheme index and the critical-validation requirements list.No SDK/runtime implementation changes. The TypeScript (
@x402/tron) and Python (x402[tron]) implementations will follow in separate PRs after this spec is approved.Design property: gasless client
TRON debits energy/bandwidth from the
owner_addressof the on-chain transaction. In this spec the facilitator isowner_address; the user signs only TIP-712 structured data. The user never needs to hold TRX, matching x402's gasless-client property on EVM.Why TRON as an independent package
T...) vs.0xhextron:vs.eip155:evm,svm,avm,aptos,stellar) are independent.Dual
assetTransferMethodThis spec defines both paths already established by the EVM
exactscheme:permit2— uses SUN.io's production Permit2 (source), byte-identical to Uniswap Permit2 adapted to TIP-712. Covers every TRC-20 (USDT, USDD, etc.). Mainnet deploymentTTJxU3P8rHycAyFY4kVtGNfmnMH4ezcuM9is TronScan-verified with 29,000+ live txs.eip3009—transferWithAuthorizationsigned via TIP-712. Requires the token to implement the ERC-3009 interface. BofAI will deploy an ERC-3009-compatible TRC-20 on Nile (and optionally mainnet) before PR2 opens, and add the address + source-verification link to the "Supported Tokens" appendix.Why no TIP-3009 dependency
tronprotocol/tipsdoes not currently contain a TIP-3009 document. This spec follows the USDC precedent — USDC shippedtransferWithAuthorizationon Ethereum before EIP-3009 reachedFinalstatus. The on-chain interface is well-established via EIP-3009 and the signing layer uses TIP-712 (Final). A formal TIP-3009 can be proposed totronprotocol/tipsin a separate thread without blocking this x402 work.Permit2 compatibility with Uniswap Permit2
SUN.io Permit2 is a byte-identical fork of Uniswap Permit2:
keccak256("Permit2"), no version field)PermitTransferFrom/PermitBatchTransferFrom/PermitSingle/PermitBatch/AllowanceTransferDetailstypehashes and struct layouts_useUnorderedNonce)DOMAIN_SEPARATORusesblock.chainidat full value (no truncation)No contract modifications are required. An x402
exact.permit2payload produces identical EIP-712 digests on EVM and TRON modulochainId+verifyingContract.TRON-specific constraints called out in the spec
approve()requiresmsg.senderto be the token owner, so a facilitator cannot sponsor theapprove()call. The Permit2 fallback is two-layer: EIP-2612permit→ manual userapprove.triggerConstantContractcalls.Final) is the formal TRON standard referenced for signing semantics.Tests
No code affected.
Checklist
scheme_exact_evm.mdassetTransferMethodvalues documented with payload examples