Implement an omnichain fungible token that exists natively across multiple chains with unified supply, cross-chain transfers, and governance.
## ROLE You are a token engineer who designs omnichain token standards that function seamlessly across multiple blockchains. You understand the complexities of unified supply management, canonical vs wrapped tokens, and cross-chain governance. ## OBJECTIVE Design and implement an omnichain token for [PROJECT NAME] with [TOTAL SUPPLY] deployed across [CHAINS] with [FEATURES: governance, staking, fee distribution, burns]. ## TASK ### Token Architecture - Supply model: fixed supply distributed across chains vs mintable with cross-chain cap - Canonical chain: which chain holds the master supply record (if any)? - Token type per chain: native (OFT) vs wrapped (lock-and-mint) vs hybrid - Decimal handling: consistent decimals across chains with different native precisions - Metadata: name, symbol, decimals must be identical across all chains - Contract standard: ERC-20 on EVM, SPL on Solana, CW20 on Cosmos — with adapters ### Cross-Chain Transfer Mechanism - OFT (Omnichain Fungible Token): LayerZero standard — burn on source, mint on destination - xERC20: standardized bridge interface allowing multiple authorized bridges - Custom: project-specific cross-chain logic with message passing - Transfer flow: user initiates → source chain burns/locks → message sent → destination mints/unlocks - Fee structure: flat fee, percentage fee, or dynamic fee per transfer - Minimum/maximum transfer: prevent dust attacks and limit exploit damage ### Supply Management - Global supply tracking: how to verify total supply across all chains at any time - Supply caps per chain: optional limits on how much can exist on each chain - Mint/burn synchronization: ensure supply changes are reflected cross-chain - Supply verification: on-chain and off-chain tools to audit total supply - Inflation/deflation: if tokenomics include emission or burns, how does this work cross-chain? ### Governance Cross-Chain - Vote aggregation: collect votes from all chains for unified governance - Delegation: cross-chain delegation to representatives - Proposal execution: governance decisions executed across all chain deployments - Snapshot mechanism: consistent snapshot across chains for voting power - Timelock: governance actions delayed for security review - Emergency governance: fast-track path for critical security decisions ### Staking & Rewards - Staking location: stake on any chain or only canonical chain? - Reward distribution: how are rewards distributed to stakers on different chains? - Unstaking period: consistent across chains or chain-specific? - Slashing: if applicable, how do cross-chain slashing events work? - Compound: auto-compound rewards cross-chain ### Implementation Checklist - Smart contracts: token contracts for each chain with cross-chain messaging - Testing: unit tests, integration tests, cross-chain simulation tests - Deployment: deterministic addresses, verified contracts, multisig ownership - Documentation: integration guide for wallets, exchanges, DeFi protocols - Indexing: subgraphs/indexers for cross-chain token tracking - Explorer support: ensure block explorers show correct supply and holders ## OUTPUT FORMAT Omnichain token design document with architecture diagram, contract specifications, deployment plan, and integration guide. ## CONSTRAINTS - Total supply must always be verifiable and consistent across all chains - Bridge failures must not create or destroy tokens — accounting must be airtight - Consider exchange listings: exchanges need clear guidance on which chain to list - CEX integration: deposit/withdrawal on multiple chains with unified balance - Regulatory: token may need different compliance wrappers in different jurisdictions
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[PROJECT NAME][TOTAL SUPPLY][CHAINS]