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 at deployment, a weekly epoch rewards engine with VRF hooks, a USDC-style genesis phase, single-shot Uniswap V3 liquidity creation, fee recycling, and optional timelocked governance.
TrueBitcoinToken
Section titled “TrueBitcoinToken”Purpose: ERC-20 TRTH with CAP = 21_000_000e18, enforced by OpenZeppelin ERC20Capped.
Roles (AccessControl):
| Role | Typical holder | Responsibility |
|---|---|---|
owner | Admin / timelock / multisig | Token governance entrypoint; manages token-side roles and balanceSyncHook |
DEFAULT_ADMIN_ROLE | Mirrors owner | Internal AccessControl compatibility role synced on ownership changes |
BURNER_ROLE | FeeSink | Burn from holders for buyback path |
Interactions: TRTH is not mintable after deployment. Deployment scripts pre-fund the fixed launch buckets (Genesis, EpochRewardsV1, and LiquidityBootstrap) from the deployer’s pre-minted supply. The token now exposes a standard owner() governance entrypoint for scanner/tooling compatibility, while BURNER_ROLE remains the only operational token-side role. An optional balanceSyncHook implements IBalanceSyncHook and receives syncBalance callbacks on transfer, mint, and burn so EpochRewardsV1 can track balances for eligibility without wrapping the token.
EpochRewardsV1
Section titled “EpochRewardsV1”Purpose: 7-day epochs, base / bonus / king reward accounting, VRF request and fulfillment lifecycle, claims, and carry between epochs.
Interactions: Pays claims from a pre-funded emission pool held by the contract. 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 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 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 V3 LP creation using the Nonfungible Position Manager, 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 V3FeeSinkSwapAdapter
Section titled “FeeSink and V3FeeSinkSwapAdapter”Purpose: FeeSink collects protocol fees and executes TRTH buyback and burn via swaps when a V3FeeSinkSwapAdapter is configured (Uniswap V3 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 |
|---|---|
TrueBitcoinToken | Capped ERC-20, full pre-mint at deploy, optional balance hook |
EpochRewardsV1 | Epochs, VRF lifecycle, claims, carry |
ChainlinkVrfWordAdapter | VRF v2.5 bridge to rewards |
Genesis | USDC deposits, referrals, tiers, distribution |
LiquidityBootstrap | Single Uniswap V3 position |
FeeSink | Swap adapter + burns |
V3FeeSinkSwapAdapter | Uniswap V3 swaps for FeeSink |
ProtocolTimelock | Timelocked proposals |
For deployed addresses, see Contract Addresses.