Track and Introduce ERC-3009 Transfer With Authorization to TRON
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- blockchain
- Domínio
- blockchain, cryptography
Direção de pesquisa
Start by reading ERC-3009 alongside TIP-2612, TIP-712, and TIP-20, then review the related TRC-2771 issue (#852). Draft the proposed TIP-3009 specification covering the three authorization functions, typed-data and TRON address rules, replay protection, and TVM signature behavior. Done means the open compatibility and adoption questions have documented resolutions or explicit non-normative guidance.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Background
ERC-3009 lets a token holder authorize a transfer with an off-chain EIP-712 signature that any third party (a relayer) can submit on-chain and pay fees for — enabling gasless token transfers. It defines transferWithAuthorization, receiveWithAuthorization, and cancelAuthorization. transferWithAuthorization and receiveWithAuthorization use distinct EIP-712 primary types: a transferWithAuthorization signature can be submitted by anyone, while receiveWithAuthorization binds the payee path and additionally requires to == msg.sender (mitigating front-running of the relayed call). Transfer/receive authorizations carry validAfter/validBefore time bounds and use random 32-byte nonces (not sequential), so they can be created and redeemed out of order / in parallel; cancelAuthorization signs only authorizer + nonce (no time window). It is the mechanism behind Circle's USDC gasless transfers.
It differs from the permit pattern (TIP-2612): permit sets an allowance (still needing a later transferFrom) with sequential nonces, whereas ERC-3009 performs the transfer itself by signature with random nonces. Stablecoin transfers dominate TRON usage and "holds tokens but no TRX for fees" is a common friction point, so we propose to track ERC-3009 and introduce it to TRON as a TIP (proposed TIP-3009), as an extension for TIP-20 tokens — a token-level building block for gasless transfers that complements TIP-2612 (permit) and TRC-2771 (#852) (meta-transaction forwarding).
Scope
- Follow ERC-3009's functions and EIP-712 typed-data definitions as closely as possible.
- Apply to TIP-20 tokens (not native TRX or TRC-10).
- Provide TRON-specific guidance only where TIP-712, address encoding, or the resource model requires clarification.
Compatibility Topics for Discussion
- Positioning within TRON's gasless stack. TRON would then have three related primitives — TIP-2612 (permit, allowance-by-signature), TRC-2771 (forwarded meta-tx), TRC-3009 (direct signed transfer). How builders should choose among them, and whether there is redundancy to call out or they are complementary (3009 for direct payments, 2612 for approving contracts, 2771 for arbitrary calls).
- Relayer economics on TRON. "Gasless" means the relayer pays energy/bandwidth (staked or burned TRX), as discussed for TRC-2771 (#852). Note that ERC-3009 itself has no fee field or relayer-recipient parameter, so any relayer compensation (fee skimmed from the token, off-chain payment, sponsored service) is an application-layer/wrapper concern, not part of the standard — this should be a non-normative note. Whether TRON's regenerating-energy model makes high-throughput relayers cheaper at scale is also worth a non-normative note.
- TIP-712 domain, address encoding, and replay protection. The authorization is an EIP-712 signed message. A complete TRON domain should bind
name,version, TIP-712chainId(block.chainid & 0xffffffff), andverifyingContract—chainIdalone cannot prevent replay between two 3009 contracts on the same network. Addresses are encoded as the 20-byte form after stripping the0x41prefix (per TIP-712 / TIP-2612), while wallets may display Base58Check; the random 32-byte-nonce semantics and theauthorizationStateview should be preserved exactly, andvalidAfter/validBeforeevaluated against TVMblock.timestamp. receiveWithAuthorizationfront-running on TRON. SincetransferWithAuthorizationsignatures are submittable by anyone,receiveWithAuthorization(distinct primary type,to == msg.sender) exists to let a payee claim safely. TRON's Super Representative block production does not remove the front-running risk (nodes/observers can still replay atransferWithAuthorization), so both functions should be included for parity.- Signature verification on TVM. Whether the TVM
ecrecoverprecompile recovers EIP-712 signatures identically, and the standard's known edge cases must be handled: malformed signatures returningaddress(0), low-s/vnormalization, and anauthorizer != address(0)check (cf. the permit warnings in TIP-2612). Wallets must sign TIP-712 typed data without TRON-specific message prefixes that would break verification. Whether secp256r1/passkey signing is in scope: TIP-7951 (#785) verifies a P-256 signature against an explicit public key (it does not recover an address likeecrecover), so the core 3009 should stay secp256k1/TIP-712 and any passkey variant needs a separate signer-binding model. - Adoption by existing stablecoins (open). Already-deployed token code/ABI cannot be extended in place unless the token was designed with proxy-style upgrade dispatch — so for major TRON stablecoins (e.g., USDT) adoption realistically targets new tokens, future token versions, or a future/new official USDC deployment. Whether the TIP should recommend ERC-3009 as a default extension for new TIP-20 stablecoins.
References
- ERC-3009: https://eips.ethereum.org/EIPS/eip-3009
- TIP-2612 (permit), TRC-2771 (tracking issue #852) (meta-tx)
- TIP-712, TIP-20, TIP-7951 (#785)
- Linguagem predominante
- Sem dados de linguagem
- Estrelas
- 341
- Forks
- 347
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de tronprotocol/tips
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
tronprotocol/tips#950 · 2 comentários ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
tronprotocol/tips#945 · 8 comentários ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
tronprotocol/tips#944 · 6 comentários ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
tronprotocol/tips#941 · 5 comentários ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
tronprotocol/tips#938 · 15 comentários ·
Todas as issues de tronprotocol/tips
Issues semelhantes
-
bug Medium security smart-contract Stellar Wave validation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Web3Novalabs/Nevo#1749 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
contract good first issue testing
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Emmyt24/nova-launch#2436 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
status-im/nimbus-eth1#5181 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
erigontech/erigon#26523 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
lambdaclass/ethrex#7550 ·
Mantenedores costumam responder em até 2 dias