The Problem
Traditional blockchain ecosystems with EVM support often have token fragmentation:- Native tokens in the base blockchain format
- Wrapped tokens as ERC20 contracts
- IBC vouchers for cross-chain assets
- Multiple bridge token representations
Single Token Representation v2 (STRv2)
STRv2 ensures each asset has exactly one canonical representation that automatically adapts to its usage context. Core Principle: Each token exists in either Cosmos or EVM format at any given time, never both. The representation automatically switches based on where it’s being used. Automatic Conversion:- Sending to Ethereum address → converts to ERC20
- Sending to Cosmos address → converts to native coin
- IBC transfer with EVM recipient → arrives as ERC20
Token Pairs
A TokenPair links a Cosmos denomination with an ERC20 contract address:- Start as Cosmos SDK coins (uatom, uosmo, etc.)
- Module deploys an ERC20 contract representation
- Conversions use mint/burn mechanism
- Start as deployed ERC20 contracts
- Module creates a Cosmos coin denomination
- Conversions use escrow/release mechanism
Precompiled Contracts
Instead of traditional wrapped token contracts, STRv2 uses precompiled contracts - native code that appears as ERC20 to the EVM but executes at native speed. Native Precompiles:- Standard ERC20 interface (transfer, approve, balanceOf)
- Direct bank module integration
- No contract storage overhead
- Gas costs 10-100x lower than regular ERC20
- WERC20 interfaces with deposit/withdraw
- Runtime registration for custom tokens
- Module-specific features
Conversion Mechanics
Cosmos → ERC20:- Coins escrowed in module account
- ERC20 minted to recipient
- Tokens burned (if module-owned) or escrowed (if external)
- Coins released from module account
IBC Integration
STRv2 integrates with IBC through middleware that automatically converts based on recipient address type:- Ethereum address recipient → convert to ERC20
- Cosmos address recipient → keep as native
- Missing token pair → create dynamically
Design Rationale
Why Not Simple Wrapping? Traditional wrapping (like WETH) requires manual wrap/unwrap steps, splits liquidity between native and wrapped versions, and adds gas overhead from extra contract calls. Why Precompiles? Precompiles provide native execution speed with ERC20 compatibility, no storage overhead, and appear as regular tokens to contracts. This is only possible with chain-level integration. Why Automatic Conversion? Removes manual steps, unifies liquidity into single pools per asset, and eliminates user errors from using wrong token representations.Security
Module Ownership (native coins): Module can mint/burn ERC20, ensuring 1:1 backing with no external control risks. External Ownership (ERC20 origin): Original deployer retains control, module uses escrow mechanism, preserving contract upgradeability. Validation: ERC20 contracts validated before registration with event log verification and balance checks.Related Documentation
- ERC20 Module Reference - Configuration and token pair management
- Precompiled Contracts - Technical implementation details