Key Features
ERC-20 Compatibility
TIP-20 is fully compatible with ERC-20, implementing all standard functions:transfer(address to, uint256 amount)transferFrom(address from, address to, uint256 amount)approve(address spender, uint256 amount)balanceOf(address account)totalSupply()allowance(address owner, address spender)
Transfer Memos
TIP-20 extends transfers with optional on-chain memos for payment reconciliation:transferWithMemo(address to, uint256 amount, bytes32 memo)transferFromWithMemo(address from, address to, uint256 amount, bytes32 memo)
- Invoice reference tracking
- Payment reconciliation
- Multi-party transaction coordination
Compliance Integration
TIP-20 tokens integrate with TIP-403 transfer policies for programmable compliance:- Whitelist/blacklist controls
- KYC/AML requirements
- Geographic restrictions
- Asymmetric sender/recipient rules (TIP-1015)
Reward Distribution
TIP-20 includes native support for distributing yield or rewards to token holders:- Holders opt-in by calling
setRewardRecipient(address) - Rewards are distributed proportionally based on opted-in balances
- Recipients can delegate rewards to a different address
claimRewards()transfers accrued rewards to the recipient
Administrative Controls
TIP-20 tokens support role-based administration:ISSUER_ROLE- Mint and burn tokensPAUSE_ROLE/UNPAUSE_ROLE- Pause transfersBURN_BLOCKED_ROLE- Burn from blocked addresses (TIP-1015)BURN_AT_ROLE- Burn from any address (TIP-1006)DEFAULT_ADMIN_ROLE- Manage roles and policies
- Set supply caps
- Change transfer policies
- Pause/unpause the token
- Mint and burn tokens
Token Metadata
Each TIP-20 token has:currency field is used by the Stablecoin DEX for quote token routing and validation.
Quote Tokens
TIP-20 tokens form a hierarchy via quote tokens:- Trading pairs on the Stablecoin DEX
- Cross-currency conversion paths
- Token relationships for pricing
setNextQuoteToken() and complete the migration with completeQuoteTokenUpdate() after ensuring no circular references.
Gas Efficiency
TIP-20 is optimized for low-cost payments:- Transfer to existing address: ~50,000 gas (0.1 cent at baseline pricing)
- Transfer to new address: ~300,000 gas (0.6 cent, includes state creation)
- Transfer with memo: Adds ~5,000 gas for memo emission
Factory Deployment
TIP-20 tokens are deployed via the TIP20Factory precompile at address0x20Fc000000000000000000000000000000000000:
- Deterministic addresses
- Consistent initialization
- Proper role configuration
- Integration with protocol precompiles
Contract Address
All TIP-20 tokens are deployed with addresses in the range:- Fast token detection
- Protocol-level optimizations
- Prevention of transfers to other TIP-20 contracts
Standard Decimals
All TIP-20 tokens use 6 decimals for microdollar precision:- 1 token unit = 1 microdollar = 0.000001 USD
- No need to query decimals for TIP-20 tokens
- Consistent precision across all USD-denominated tokens
- Simplified arithmetic and display logic
Related TIPs
- TIP-1000: State creation cost increases (affects transfer gas costs)
- TIP-1004: Permit functionality (gasless approvals)
- TIP-1006: burnAt function (privileged burning)
- TIP-1015: Compound transfer policies (asymmetric compliance)
- TIP-403: Transfer policy registry (compliance framework)
Next Steps
Transfers
Learn about transfer methods and gas costs
Memos
Attach payment references to transfers
Compliance
Integrate with TIP-403 policies