> ## Documentation Index
> Fetch the complete documentation index at: https://docs.star.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Rewards campaigns

<video src="https://mintcdn.com/star-a73a9f07/KEGQ_g3yY3FV4IZP/assets/bg_video.mp4?fit=max&auto=format&n=KEGQ_g3yY3FV4IZP&q=85&s=96223155d2e4335abb180b41ccaa4a5b" autoPlay loop muted className="page-video-300" data-path="assets/bg_video.mp4" />

A rewards campaign pays your token to the people that grow your product. You allocate a fixed amount of your token to the campaign, define which actions earn it, and Star computes, escrows, and distributes the rewards. Campaigns run in the CLI and the dashboard.

## Two campaign modes

| Mode               | What participants earn                             | Use it for                                                                 |
| ------------------ | -------------------------------------------------- | -------------------------------------------------------------------------- |
| **Points**         | A score and a leaderboard rank                     | Competitions: reward the top referrers or the most active users at the end |
| **Action rewards** | A fixed amount of your token per qualifying action | Direct incentives: every signup, order, or referral earns a set amount     |

A points campaign converts to token payouts at the end, from the campaign budget. An action-reward campaign pays from a funded action pool, at a fixed rate per action, until the pool or the caps are reached.

## How a campaign runs

1. **Fund it.** You allocate an exact amount of your token before earning begins. The tokens sit in a program-controlled campaign vault. You cannot withdraw them after earning starts, and Star cannot transfer them outside committed rewards.
2. **Define the actions.** Each action has a type (`unique`: once per participant, or `count`: repeatable), a reward or point value, a per-participant cap, and a campaign cap.
3. **Participants earn.** Earning is never paused during a campaign.
4. **Participants claim.** A campaign-wide claim window opens. Participants select and verify a Solana wallet at claim time, not before.
5. **Leftovers return.** Unclaimed tokens return to your project treasury after the claim window closes.

One campaign earns at a time per project. An older campaign can remain claimable while a newer one earns.

## What participants need

Nothing. A participant earns without a Star account and without a wallet. They claim later, through your product, with a wallet they verify at that moment. You can also nominate rewards directly to an email address or an X handle, from a separate budget lane; only a user authenticated with that identity can claim them.

## Connecting your product

Actions are verified server-side in your own app, so a reward is paid only when the real action succeeded:

1. Create the campaign in the dashboard and download the integration bundle.
2. Hand the bundle to your coding agent. The [`@star-factory/sdk-launch-rewards`](https://www.npmjs.com/package/@star-factory/sdk-launch-rewards) package ships an agent skill that wires your app: your agent finds the server-side success facts (a new account row, a completed order, an accepted referral) and connects them to the campaign actions.
3. Your server signs and delivers each qualifying event. Duplicate events are rejected by design, and caps are enforced by Star.

Your users' identities stay in your database. Star receives no emails, handles, wallets, or IP addresses from your app. Participant scores and a campaign leaderboard are available to your app through the same SDK.

## Design notes

* Budgets are absolute token amounts, not percentages of supply.
* A campaign that pays more in rewards than the revenue its actions bring in is a marketing cost. One that pays less funds its own growth. Price the action values against the value of the action.
* Fund campaigns from the reward reserve you allocate at launch, or top them up later.
