Docs·Rewards and mechanics

Rewards and mechanics

Quests

The quarter of every reward that its earner spends on acquiring other users: 116,250,000 THD the platform never directs.

Version
1.1
Updated
2026-09-28
Source
THD contract sources · THD — Full Plan v1.43

Status#

Quests are the platform’s user-directed acquisition budget. A quarter of every reward-earning user’s daily THD allocation is routed into a budget they spend on attracting other users. The platform never spends it and never chooses who receives it.

The 75/25 split#

The split is applied before the allocation reaches the user: a trader earning 100,000 THD on a day takes 75,000 into their claim and 25,000 into their quest budget.

The three groups whose allocation splits, and what the 25% amounts to
GroupQuest budget, lifetime
Curve and predict traders55,000,000 THD
Creators and market makers18,750,000 THD
KOLs and referrers42,500,000 THD
Total116,250,000 THD — 11.6% of supply

That is larger than any platform bucket, and none of it is the platform’s to spend. Three allocations are deliberately excluded and the reasons differ:

ExcludedWhy
SettlersThe recipients are bots. A quest budget an automated settler will never direct is a 25% pay cut rather than an option — and because budgets never expire, it would sit inert permanently.
LP providersStarts only after 100% unlock. The acquisition phase quests exist for is over by then.
SpoilsPost-TGE, and the battlepass, bands and seasons already reward presence directly.

What a campaign is#

A campaign is a sponsor-published task list, a set of rates and a budget. Completers who do the tasks are paid out of that sponsor’s budget, and — where they are not already tied to a referrer — become the sponsor’s referee.

What a sponsor is buying, by group
SponsorWhat the campaign buys them
TraderReferees — their only income that is not their own trading.
Creator or market makerGraduation. Buyers on their curve before the target, which turns on their post-graduation fee stream permanently.
KOLFollowers, rank, and a larger allocation.
ReferrerTheir entire business, funded in THD rather than in cash.

Every row is self-interested, which is the design: a task list built around what the platform wants is a list nobody chooses from. The platform benefits are side effects — curve volume rises because creators want graduation, activation rises because referrers want referees who actually trade.

The six steps#

The budget is on chain. The completions are not. The settlement is a root. That division is the whole architecture.

#StepWhereCost
1The 25% is credited to the sponsorOn chain — creditBatch, keeper-only, with the THD pulled in the same transaction and credited as the measured balance deltaBatched
2The sponsor signs a campaign: tasks, rates, budgetAn EIP-712 signature under “The Hood Quests”; openCampaign is a permissionless relay and msg.sender appears nowhere in the accountingNo gas for the sponsor
3The budget moves from accrued to committedOn chain, at open—
4Completions are verifiedOff chain — the indexer for capital and gas tasks, the attestor for social tasks—
5The day’s payouts are committed as one rootpublishRoot(root, debits, expiries), keeper-onlyOne transaction per day regardless of volume
6The completer acceptsaccept / acceptMany, permissionless, always crediting the account rather than the callerThe completer’s own gas, once

Why the budget is genuinely on chain rather than a database number: a sponsor is committing tokens to strangers. If the budget were only our record, the sponsor would be trusting us not to renege and so would every completer. Locked in a vault, the money is provably there before anybody does a task.

A leaf is keccak256(abi.encode(index, account, amount)), and amount is the completer’s whole day, summed across every campaign they completed. That is why acceptance is one call however many sponsors paid them, and why the sponsor-side accounting settles at publication rather than at acceptance.

Accepting moves nothing: the THD stays in the vault and becomes the account’s. The vault’s only exit is settleAccepted, which moves accepted balances to the reward distributor, ThdRewardVest — the only caller it accepts — where they vest to the end of the 90-day window from TGE + 24h. Every exit — including both sweeps — points at that one address, and it is whitelist-gated.

Windows and durations#

ConstantValueSecondsWhat it bounds
ACCEPTANCE_WINDOW24 hours86,400Stamped as acceptBy = publishedAt + 24h at publication, never inferred from the next root. A constant, not a setter.
MIN_CAMPAIGN_DURATION1 hours3,600The shortest campaign a signature may ask for.
MAX_CAMPAIGN_DURATION90 days7,776,000The longest.
SETTLEMENT_GRACE3 days259,200After endsAt, before closeCampaign returns the remainder — which the quests keeper sends on its next run. It removes a race; it does not extend a campaign.

A lapsed acceptance returns to the sponsor, either through the keeper’s reclaimExpired or through the expiry leg of the next publishRoot, and the return is bounded twice — by the campaign’s own debit for that epoch, and by the epoch’s unsettled remainder.

A campaign ends at whichever comes firstOn chainUnspent budget
Reward pool exhaustedClosed inside the publishRoot that empties it; endsAt moves to that block; closeReasonOf = 1None left
Preset end dateCompletions stop at endsAt; after SETTLEMENT_GRACE the keeper sends closeCampaign; closeReasonOf = 2Returns to the sponsor’s accrued budget, never burned

There is no manual close (owner ruling 28-09-2026). A sponsor may still revoke a signature that has not yet been relayed — the revocation is keyed on the terms rather than the campaign id, because the id is the EIP-712 digest and only exists once the campaign is open.

What the keeper can and cannot do#

campaignId == EIP-712 digest of
  Campaign(address sponsor, bytes32 termsHash, uint256 budget,
           uint64 duration, uint64 validUntil, uint256 salt)

Only the digest is stored. The terms themselves live off chain behind termsHash, and the signature is checked with a checker that accepts EIP-1271, so a Safe can sponsor a campaign.

The boundary, as the contract states it
The keeper canThe keeper cannot
Misallocate a sponsor’s budget between completers.Take THD out of the contract. Every exit pays the whitelist-gated reward distributor, and the keeper can move no THD to itself.

The owner’s power is narrower still: it appoints the keeper and repoints the reward distributor, and the second is guarded three ways — non-zero, has code, and listed in TreasuryRegistry, whose address is immutable on this contract. That registry gate is what breaks the five-call owner-compromise walk, and it is why the vault is owned by the owner Safe rather than the guardian. See the trust model.