Skip to content

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.

Purpose: ERC-20 TRTH with CAP = 21_000_000e18, enforced by OpenZeppelin ERC20Capped.

Roles (AccessControl):

RoleTypical holderResponsibility
ownerAdmin / timelock / multisigToken governance entrypoint; manages token-side roles and balanceSyncHook
DEFAULT_ADMIN_ROLEMirrors ownerInternal AccessControl compatibility role synced on ownership changes
BURNER_ROLEFeeSinkBurn 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.

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.

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.

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.

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.

Purpose: FeeSink collects protocol fees and executes TRTH buyback and burn via swaps when a V3FeeSinkSwapAdapter is configured (Uniswap V3 swap router integration).

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.

ContractPrimary function
TrueBitcoinTokenCapped ERC-20, full pre-mint at deploy, optional balance hook
EpochRewardsV1Epochs, VRF lifecycle, claims, carry
ChainlinkVrfWordAdapterVRF v2.5 bridge to rewards
GenesisUSDC deposits, referrals, tiers, distribution
LiquidityBootstrapSingle Uniswap V3 position
FeeSinkSwap adapter + burns
V3FeeSinkSwapAdapterUniswap V3 swaps for FeeSink
ProtocolTimelockTimelocked proposals

For deployed addresses, see Contract Addresses.