Smart Contracts
TRTH’s protocol logic lives in Solidity contracts compiled with 0.8.24. The system centers on a capped ERC-20 that pre-mints the full supply once at deployment, a weekly epoch rewards engine with VRF hooks, a USDC-style genesis phase, single-shot Uniswap V4 liquidity creation, fee recycling, and optional timelocked governance.
TruthToken
Section titled “TruthToken”Purpose: ERC-20 TRTH with CAP = 21_000_000e18, enforced by OpenZeppelin ERC20Capped.
Supply model: The token has no minter roles and no AccessControl. The entire 21,000,000 TRTH supply is minted once in the constructor to a treasury/deployer address, so there is no ongoing minting and no hidden inflation lever. Distribution to the protocol’s buckets happens by transfer of that pre-minted supply, not by minting on demand:
- 19,950,000 TRTH is transferred to
EpochRewardsV1_1to fund weekly emissions. - 525,000 TRTH is transferred to
Genesisfor pro-rata participant distribution. - 525,000 TRTH is transferred to
LiquidityBootstrapto seed initial liquidity.
Interactions: The token exposes a public burn(uint256) (holders can burn their own balance; used by the FeeSink buyback-and-burn path) and an immutable balanceSyncHook set once in the constructor. The hook implements IBalanceSyncHook and receives syncBalance callbacks on transfer, mint, and burn so EpochRewardsV1_1 can track balances for reward eligibility without wrapping the token.
EpochRewardsV1_1
Section titled “EpochRewardsV1_1”Purpose: 7-day epochs, base / bonus / king reward accounting, VRF request and fulfillment lifecycle, claims, and carry between epochs. Emission halves every 31-day era.
Interactions: Pays claims by transferring from the pre-funded emission pool held by the contract, preserving the invariant distributedTotal <= EMISSION_POOL. Calls into Chainlink through ChainlinkVrfWordAdapter. Consumers rely on the hook or indexed events for holder snapshots.
ChainlinkVrfWordAdapter
Section titled “ChainlinkVrfWordAdapter”Purpose: Bridge Chainlink VRF v2.5 to EpochRewardsV1_1 with a stable request id space for the rewards contract while mapping to upstream Chainlink request ids.
Interactions: Implements the request/fulfill path so EpochRewardsV1_1 receives fulfillRandomness with verifiable words.
Genesis
Section titled “Genesis”Purpose: Genesis phase with deposits in USDC on Base, referrals, influencer tiers, and batch distribution of TRTH allocations.
Interactions: Distributes TRTH from its pre-funded genesis allocation. BOOTSTRAP_ROLE is granted to LiquidityBootstrap so the LP module can pull finalized genesis state when bootstrapping.
LiquidityBootstrap
Section titled “LiquidityBootstrap”Purpose: One-shot Uniswap V4 LP creation using the Uniswap V4 PositionManager (with Permit2), producing a position NFT, plus configured fee tier, tick bounds, and sqrtPriceX96 for pool initialization.
Interactions: Consumes a pre-funded LP allocation held by the bootstrap contract and requires BOOTSTRAP_ROLE on Genesis for coordination.
FeeSink and V4FeeSinkSwapAdapter
Section titled “FeeSink and V4FeeSinkSwapAdapter”Purpose: FeeSink collects protocol fees and executes TRTH buyback and burn via swaps when a V4FeeSinkSwapAdapter is configured (Uniswap V4 swap router integration).
ProtocolTimelock
Section titled “ProtocolTimelock”Purpose: Governance timelock (TimelockController) for delayed execution of admin actions — role grants, parameter updates, and coordinator changes — reducing rug-pull surface when multisigs or DAOs control the protocol.
Contract inventory
Section titled “Contract inventory”| Contract | Primary function |
|---|---|
TruthToken | Capped ERC-20, full supply pre-minted at deploy, immutable balance hook, public burn |
EpochRewardsV1_1 | Epochs, VRF lifecycle, claims, carry |
ChainlinkVrfWordAdapter | VRF v2.5 bridge to rewards |
Genesis | USDC deposits, referrals, tiers, distribution |
LiquidityBootstrap | Single Uniswap V4 position |
FeeSink | Swap adapter + burns |
V4FeeSinkSwapAdapter | Uniswap V4 swaps for FeeSink |
ProtocolTimelock | Timelocked proposals |
For deployed addresses, see Contract Addresses.