# Holder rewards

> Hold HeyEly's launch token on Elysium and claim your share of pool trading fees in credit tokens.

HeyEly's launch token lives on Elysium (Chain ID `99901`). Every trade through its configured Uniswap pool collects a fee, and periodic flushes convert those fees into credit tokens assigned to token holders outside the contract's excluded system addresses.

> **Where the program runs**
>
> Holder rewards run only on Elysium networks where HeyEly's token and hook are configured.

## The program

| Rule             | Detail                                                                                                                                                                                                                |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Who receives     | Any wallet holding HeyEly launch tokens, apart from system addresses excluded at deployment (the Uniswap pool manager, hook, sale, order book, exchange, pool seed position, deployer, treasury, and funding wallets) |
| What you receive | Credit tokens recorded by each flush as bought or minted for token holders                                                                                                                                            |
| When             | Whenever the hook executes a fee flush, triggered by the keeper once the cooldown interval elapses and accrued fees clear the minimum threshold                                                                       |
| Your share       | Proportional to your launch token balance at the moment credit tokens are credited in, tracked via a cumulative per-share accumulator rounded down                                                                    |
| Delivery         | Claim credit tokens straight to your wallet or activate them directly into service credit in one call; launch token transfers and external distribution calls can also settle owed tokens to your wallet              |

No staking, lockups, or minimum balances are needed. Eligibility begins as soon as your wallet holds launch tokens and ends the moment you transfer them out.

## How rewards work

1. Swaps in HeyEly's launch token pool generate trading fees captured by the hook contract.
2. During each flush, the hook logs the native `HYPE` and launch token fees gathered, the bridged USDC routed to the treasury and allocated for holders, and the credit tokens acquired or minted for distribution.
3. The hook deposits those credit tokens into HeyEly's launch token contract, crediting every eligible holder in proportion to balance.

Unclaimed credit tokens remain tracked inside the launch token contract until settled. Moving launch tokens automatically settles owed credit tokens for both sender and recipient, and anyone may trigger batch settlement for a list of addresses via `distribute`. Because of that, reward credit tokens can land in your wallet even without calling claim manually.

## Claim your rewards

Collect any remaining owed credit tokens by calling either function on HeyEly's launch token contract:

* **`claim()`** transfers liquid credit tokens directly to the wallet holding the launch tokens.
* **`claimAndActivate()`** burns those credit tokens in the same transaction and adds the post-activation-fee balance as service credit on the account linked to that wallet.

Reward credit tokens behave identically to any other [credit tokens](https://heyely.si/docs/concepts/inference): activate them for API usage, hold them, move them on Elysium, or list them on the order book.

## Check the numbers

Every flush and claim settles on chain on Elysium and can be audited independently through the [Elysium explorer](https://elysium.kinetiq.xyz/explorer).

To inspect what a specific address is owed directly from the contract:

1. Open HeyEly's launch token contract on the [Elysium explorer](https://elysium.kinetiq.xyz/explorer).
2. Under **Read Contract**, query `claimableOf` with the target wallet address. The output is denominated in six-decimal credit token atoms, matching what `claim()` sends.
3. Query `accumulativeOf` for lifetime assigned tokens, `claimedOf` for tokens already collected, and `isExcluded` to confirm whether the address participates.

To audit an individual payout, inspect its flush transaction on the [Elysium explorer](https://elysium.kinetiq.xyz/explorer). The hook emits `Flushed` with the `HYPE` and launch token fees gathered, bridged USDC split between treasury and holders, and credit tokens bought or minted; in the same transaction, the launch token emits `RewardNotified` recording the exact credit tokens credited into holder accounting.

For programmatic lookups, `GET /api/earn/<address>` responds with the wallet's `claimable`, `claimed`, `accumulative`, `balance_wei`, and `excluded` status, alongside launch token totals, `hook_state` (flush interval, last and next eligible flush timestamps, minimum threshold, pending quote, fee rate, treasury share, and flusher), `totals`, the 48 most recent `flushes`, and the wallet's 20 most recent `claims`. When tokens are claimable, `gas` estimates the `HYPE` fee for `claim()` and notes that function in `call` (activating directly via `claimAndActivate` consumes additional gas). The endpoint answers `not_configured` on networks without the launch token program and `503 chain_unavailable` if Elysium RPC reads fail, ensuring unreadable wallets are never misreported as empty.
