---
name: earn-and-collect-creator-fees
description: Understand how creator trading fees work for Sentry-launched tokens — how fees route to the creator, how to check accrued/uncollected amounts, and who can trigger collection (the factory owner OR the token's creator). Use when an agent or user wants to see, collect, or reason about the trading-fee revenue from tokens they launched, or how an agent self-funds from its token economy. Triggers include "collect my fees", "creator fees", "how much have I earned", "claim trading fees", "agent self-funding".
license: MIT
metadata:
  author: sergio-inkfnd
  version: "1.0.0"
  homepage: "https://github.com/mavrkofficial/inkonchain-mcp"
  network: "Ink mainnet (chain 57073)"
credentials:
  - name: EVM wallet key
    description: "EVM private key in the OS keychain (set via `npx inkonchain-mcp-setup`) or the EVM_PRIVATE_KEY env var. Required for write operations; read-only tools work without it."
    required: false
    storage: keychain
requires:
  mcp: inkonchain
  tools: [sentry_get_creator_nfts, sentry_get_creator_fee_status, sentry_collect_fees, erc20_balance, analytics_creator_dashboard]
  env: []
---

# Earn (and get paid) creator fees

Every Sentry launch holds its LP permanently inside the factory. As people trade the token, the position accrues fees. The creator **earns** a share of those fees, and can **collect them directly** — collection routes each side automatically no matter who triggers it.

> **Key fact:** collection can be triggered by the **factory owner** (any token) or by a **token's own creator** (only the tokens they created — and the creator pays the gas). The split is automatic and identical either way: your creator share goes to you, the rest to treasury. Trying to collect a token you didn't create just reverts.

## How fees route

When a position's accrued fees are collected, each side splits like this:
- **Launched-token side** → 100% treasury.
- **Base-token side** (WETH or USDT0) → the creator's configured share to the **creator**, the remainder to treasury.
- **GoPumpMe** launches → **100% of the base side to the creator**.
- Unknown/legacy pair or unset creator → falls through to treasury (defensive; never reverts).

So an agent that launched a USDT0 market earns **USDT0**, deposited straight to its wallet on collection.

## Why it matters — the agent self-funding loop

This is the point of agent token launches: to give an agent its **own economy**. As its token trades, the agent accrues USDT0 creator fees and can collect them itself. That revenue lets the agent **fund itself off its token's trading activity and success**, instead of relying on its owner to keep topping up the wallet. Once it holds USDT0, the agent is self-sufficient on Ink:

- **Gas:** swap a little USDT0 → ETH when needed (the `bridge-with-relay` or `trade-on-tsunami` skills).
- **Payments:** spend USDT0 directly via x402 (`x402_pay`) for any metered service or agent-to-agent payment — no ETH needed.

The loop: **launch → earn USDT0 fees → collect → swap for gas or pay via x402 → keep operating.** (To launch in the first place, see [`launch-a-token`](/skills/launch-a-token.md).)

## Who can collect

| Role | Can do |
|---|---|
| **Creator (any EOA/agent)** | Collect fees for **tokens they created** (pays own gas); check accrued amounts; confirm payouts. |
| **Factory owner / admin** | Collect **any** token IDs (e.g. an operator sweep across all creators). |

Either way, routing is identical: creator share → creator, remainder → treasury.

## Tools used

- `sentry_get_creator_nfts` — all LP NFT IDs for a creator.
- `sentry_get_creator_fee_status` — per-NFT uncollected fee counters (what's accrued and owed).
- `sentry_collect_fees` — collect + route. Owner can pass any IDs; a creator may only pass IDs they created.
- `erc20_balance` — confirm a payout landed.
- `analytics_creator_dashboard` — total creator fees **already paid out** (from the public subgraph), aggregated across all your tokens.

## Steps (collect your own fees as a creator)

### 1. Find your positions

`sentry_get_creator_nfts({ creator? })` (defaults to your wallet) → your LP NFT token IDs.

### 2. See what you've accrued

`sentry_get_creator_fee_status({ creator? })` → per-NFT uncollected fee counters.

### 3. Collect

`sentry_collect_fees({ tokenIds: ["111", "110", ...] })` — pass only IDs you created. The factory collects each position and routes your share to you (the rest to treasury). You pay the gas. For large batches, collect in chunks (~10 IDs per call) to avoid nonce/gas issues.

### 4. Confirm payout

`erc20_balance({ token: "0x0200c29006150606b650577bbe7b6248f58470c1" })` (USDT0 markets) → confirm your balance increased. Then `analytics_creator_dashboard({ creator })` to see your paid-out total over time.

## Gotchas

- **Creators can only collect their own tokens.** Passing a token ID you didn't create just reverts — you can only collect IDs you created. The factory owner can collect any ID.
- **You pay the gas** when you collect your own tokens — keep a little ETH around.
- **USD value ≠ token amount.** A low-volume token shows tiny counters; use `analytics_token_report` for volume context.
- **GoPumpMe vs others.** GoPumpMe creators get 100% of the base side; other launch types get the configured creator-fee split.

## Done when

`sentry_collect_fees` confirms and `erc20_balance` shows your increased creator balance.
