Campaign Status Line
One string for the state of a campaign, for a badge subtitle, a table cell, or a tooltip. Pass the wallet’s claimable amount when you have it, so a finished campaign with unclaimed rewards says so.lib/campaign-status.ts
claimable comes from userPosition.claimable, claims.statuses, or rewards.forUser. Status alone never decides claimability: an ended or finalized campaign can still have rewards waiting. See Lifecycle and Claimability.
Open-Ended Runway
Open-ended campaigns pay a fixed amount per second until their budget runs out, so “time left” is a projection. This shows the daily emission and how long it is funded for.lib/runway.ts
fundedUntil is a floor: it assumes the full emission rate, and an APY cap or quiet periods only make the budget last longer. Top-ups push it out without changing the rate.
Per-Campaign Earnings
The Rewards Panel lists every campaign. When a page is about one campaign, select it out of the same query, so the two views share a cache entry.hooks/use-campaign-earnings.ts
null means the wallet has not entered the campaign. Otherwise accumulatedRewards is what it has earned, and claimable is what it can claim now. Why those two differ is in How Claiming Works.
Referral Bind Before Deposit
For campaigns with a referral pool: bind the referee to the referrer from your link right before they sign their first deposit. Never let it block the deposit.lib/referral-bind.ts
- Both wallets need Rabbithole accounts. A referee without a linked Rabbithole wallet is rejected with
WALLET_NOT_LINKED, which for many partner users will be the common case. - Username links need resolving first. The Add Referrals guide has
resolveReferrer()for that, and the full list of rejection codes.
Forwarder Deposit
Only campaigns withrequiresForwarderDeposit: true need this. They reward positions that entered through the Rabbithole Forwarder, and discovery hides them unless you pass includeForwarderRequired: true. If you run a campaign on your own vault and users deposit through your own frontend, you do not need it.
The short version:
Keep Exploring
Reward Badge
The status line and earnings, assembled for a vault page.
Rewards Panel
Every campaign the wallet has earned in.
Add Referrals
The full referral flow, from link to payout.