ETHOS — DeFi Protocol on Base
Multi-Pool DeFi Protocol with veToken Governance, Discount Swaps & Uniswap V4 Integration on Base Mainnet
Private
Overview
ETHOS is a production-deployed DeFi protocol on Base Mainnet that combines vote-escrowed token (veToken) governance with community-based reward pools and Uniswap V4 integration. Users stake WAI tokens to earn veWAI governance power, then claim ETH rewards directly or execute discounted token swaps (cbBTC, SHIB, wrsETH) at up to 20% below market price — powered by real-time Uniswap V4 quotes. The protocol distributes fees across a shared multi-veToken pool and dedicated community pools via a CommunityRegistry contract.
Key Features
- •Stake WAI → earn veWAI governance tokens with 7-day lock periods
- •Direct claim: 10% of maxReward claimable immediately in native ETH
- •Discount swaps: trade cbBTC, SHIB, wrsETH for ETH at up to 20% discount via Uniswap V4
- •Real-time swap quotes from Uniswap V4 Quoter with live discount percentage display
- •Shared Pool (multi-veToken, 20% of fees) and Dedicated Pools (single-veToken, 80% of fees)
- •Time-bounded reward windows with on-chain snapshot blocks for voting power calculation
- •Permit2 signature-based token approvals for gasless UX
- •WalletConnect + ConnectKit wallet integration with eligibility checking
- •Emergency pause/unpause and admin access control system
- •Early unstake with time-weighted penalties (10–30%) split between burn and treasury
Challenges
- •Integrating Uniswap V4 Quoter and Universal Router for real-time pricing across three token pairs with different fee tiers
- •Designing a fair, linear discount curve (discountWad = userRemaining / maxReward) that rewards early users without excluding latecomers
- •Synchronizing frontend discount timers with on-chain window durations across pool types
- •Managing wallet eligibility checks, pool selection state, and multi-step transaction flows in a single React app
- •Supporting multiple ve token types across shared and dedicated pools with a unified reward distribution model
Solutions
- •Built a custom useQuoter hook integrating Uniswap V4 Quoter for each token pair's pool config (fee, tickSpacing, hooks)
- •Implemented linear discount formula on-chain in SharedPool and DedicatedPool Solidity contracts with S0/S window tracking
- •Used TanStack Query with Wagmi's useReadContract for real-time on-chain data sync including window duration and balances
- •Managed pool type and address state via React Context (PoolContext) shared across all pages and components
- •Designed CommunityRegistry to distribute 20%/80% fee splits to pools and deployed all contracts to Base Mainnet

