WalletConnect Protocol is a decentralized token economics system that powers the WalletConnect network through the WCT (WalletConnect Token). The protocol implements cross-chain token bridging, vote-escrowed staking mechanics, and timelock governance across Ethereum, Optimism, and Solana.
Key components:
- WCT token with cross-chain bridging via Wormhole NTT
- Vote-escrowed staking system with time-weighted rewards
- Perpetual staking positions for long-term alignment
- Timelock governance with multi-signature controls
- Emergency pause mechanisms for security
- Contract:
WCT.sol - Purpose: Primary governance token on Ethereum
- Features:
- ERC-20 with ERC-20Votes for governance
- ERC-2612 Permit for gasless approvals
- Wormhole NTT integration for cross-chain bridging
- Upgradeable via TransparentUpgradeableProxy
- Controlled by admin timelock (1 week delay)
- Contract:
L2WCT.sol - Purpose: L2-native token with staking capabilities
- Features:
- Transfer restrictions (can be permanently disabled)
- Bridge-controlled minting/burning
- Address allowlisting for transfers
- Integration with StakeWeight for staking
- Manager role for operational functions
- Contract:
StakeWeight.sol - Purpose: Vote-escrowed staking with time-weighted rewards
- Mechanics:
- Lock periods up to 4 years (209 weeks maximum)
- Stake weight decays linearly over time:
weight = amount * time_remaining / max_time - Perpetual staking positions with constant weight
- Checkpointing system for historical weight tracking
- Binary search for efficient historical lookups
- Emergency withdrawal capabilities
- Contract:
StakingRewardDistributor.sol - Purpose: Manages reward distribution to stakers
- Features:
- Proportional reward distribution based on stake weight
- Claim functionality for users
- Owner-controlled reward funding
- Admin Timelock: 1 week delay for critical operations
- Manager Timelock: 3 days delay for operational changes
- Canceller Role: Can cancel pending timelock operations
- Based on: OpenZeppelin's TimelockController
- Contract:
Pauser.sol - Purpose: Emergency pause functionality
- Features:
- Can pause multiple contracts simultaneously
- Role-based access control
- Pre-signed transactions for rapid response
- Contract:
WalletConnectConfig.sol - Purpose: Central configuration registry
- Features:
- Service-locator pattern for contract addresses
- Global configuration values
- Admin-controlled updates
- Components: NTT Manager and Transceiver on each chain
- Supported Routes:
- Ethereum ↔ Optimism
- Ethereum ↔ Solana
- Optimism ↔ Solana
- Rate Limits: Configurable per chain pair
- Security: Multi-signature controls, emergency pause
- Contract:
Airdrop.sol - Purpose: Merkle-based token distribution
- Features: One-time claim per address
- Contracts: Separate contracts for different cohorts (Reown, WalletConnect, Backers)
- Purpose: Time-based vesting with merkle proofs
- Features: Linear vesting over specified period
- Purpose: Allows vested tokens to be staked without transfer
- Features:
- Manages staking on behalf of vesting contracts
- Tracks transferred vs non-transferred balances
| Network | Key Contracts |
|---|---|
| Ethereum | WCT, NTT Manager, Timelock |
| Optimism | L2WCT, StakeWeight, StakingRewardDistributor, Config, Pauser, Timelocks |
| Solana | WCT Token, NTT Manager |
- Protocol governance
- Contract upgrades
- Critical parameter updates
- Transfer restriction management
- Operational parameter updates
- Day-to-day protocol operations
- Emergency response
- Quick reaction to vulnerabilities
- Pre-signed pause transactions
- Protocol treasury management
- Reward funding
The protocol implements a hierarchical access control system:
-
Admin Role (Timelock-protected)
- Contract upgrades
- Critical parameter changes
- Transfer restriction management
-
Manager Role (Timelock-protected)
- Operational parameters
- Allowlist updates
-
Pauser Role
- Emergency pause/unpause
- No timelock for rapid response
- Timelocks: Enforced delays on critical operations
- Multi-signature: All administrative functions require multiple signatures
- Emergency Pause: Quick response to vulnerabilities
- Upgrade Pattern: TransparentUpgradeableProxy with admin separation
- Rate Limiting: Cross-chain transfer limits
- Reentrancy Guards: On all critical functions
The protocol employs comprehensive testing:
- Unit Tests (
test/unit/): Individual function verification - Integration Tests (
test/integration/): Multi-contract interactions - Invariant Tests (
test/invariant/): System-wide property verification - Fork Tests (
test/fork/): Mainnet state testing - Fuzz Tests: Random input testing for edge cases
Tests are structured using BTT methodology:
.treefiles outline all execution paths- Systematic coverage of all scenarios
- Clear test organization and documentation
Example structure:
stake-weight/
├── create-lock/
│ ├── createLock.tree
│ └── createLock.t.sol
├── increase-amount/
│ ├── increaseAmount.tree
│ └── increaseAmount.t.sol
The following contracts use TransparentUpgradeableProxy:
- WCT (L1 and L2)
- StakeWeight
- StakingRewardDistributor
- WalletConnectConfig
- Pauser
- Proposal submitted to governance
- Timelock delay (1 week for critical, 3 days for operational)
- Multi-signature execution
- Proxy upgrade implementation
- Token integration: Standard ERC-20 interface
- Staking integration: StakeWeight contract interaction
- Bridge integration: Wormhole NTT protocols
- No on-chain components currently (future roadmap)
- Performance monitoring off-chain
While not currently implemented, the architecture supports future additions:
- Permissionless node operator rewards
- Oracle-based performance monitoring
- Additional cross-chain bridges
- Governance module enhancements