Tokens, Signatures and Contract Standards
Introduction
This branch connects interface standards to the real behaviors protocols must survive: unusual token transfers, typed signatures, contract wallets, permits, Merkle claims, vesting, and token lifecycle.
Why It Matters
An ABI-compatible token can still rebase, charge fees, invoke callbacks, omit return values, blacklist, pause, or violate assumptions. A valid signature can still be replayable, cross-chain, stale, or authorized for the wrong action.
Mental Model
Standards define message shapes and expected behavior; adapters enforce the narrower behavior a protocol accepts. A signed authorization binds payload, signer model, domain, nonce, deadline, and consuming contract.
Questions This Branch Answers
- Which token behaviors does an integration support or reject?
- What prevents cross-domain and repeated signature use?
- How do EOA and contract signatures share one authorization surface?
Scope
ERC token interfaces, EIP-712, ERC-1271, permit/nonces, safe adapters, Merkle distributors, NFT membership, vesting, and lifecycle controls.
Out of Scope
Token launches, financial promotion, marketplace business models, NFT art, and assuming an ERC number establishes implementation quality.
Dependencies
contract architecture, hashing/Merkle trees, ABI encoding, and Standards Registry.
Candidate Note Roadmap
token-standards-as-interfaces— Separate interface conformance from economic and transfer behavior.eip-712-domain-separation— Bind structured messages to the intended chain, contract, and schema.erc-1271-and-contract-signatures— Validate revocable contract-account authorization correctly.erc-2612-permit-and-nonces— Consume approvals once with explicit deadlines and domains.merkle-distributor-and-bitmaps— Build compact, non-replayable membership claims.safe-token-adapters— Detect or bound incompatible transfer and approval behavior.nft-membership-and-interface-detection— Compose ownership and interface detection without overclaiming identity.vesting-and-token-lifecycle— Model allocation, release, cancellation, recovery, and supply authority.
Future Project
A Merkle Distributor, Vesting module, permit-enabled educational asset, tokenized membership pass, and adversarial token adapter suite.
Initial Invariants
Claims and permits execute at most once; signatures are bound to their domain and action; vesting never releases more than allocation; adapter accounting observes actual balance changes where required.
Initial Threat Model
Replay, wrong chain/domain, signature malleability or signer-model confusion, fee-on-transfer and rebasing behavior, false/no returns, hostile callbacks, approval races, blacklist/pause authority, and malicious Merkle inputs.
Primary Sources
Canonical EIP/ERC specifications and maintained library documentation catalogued in SOURCES.md.
Connects to: smart accounts, vaults, and permissioned assets.