Claim PONS Creator Fees
Every PONS V2 token pays its creator a share of each trade plus the optional creator tax. Those fees are not sent to your wallet. While a token trades on its bonding curve they accumulate on the curve; a sweep moves them into the PONS Fee Escrow, per creator, and claim() pays the escrow balance out. This endpoint builds one transaction that does both — sweeps the curves of the tokens you name, claims the escrow — and takes PumpDev's commission inside it. You sign and send it yourself; there is no API key and no custody.
API Endpoint: POST https://rhc.pumpdev.io/api/claim-local
Prefer not to hold the key? PONS Lightning Claim does the same claim server-side in one call. To see the amount first, read GET /api/claim-account.
Before You Start​
How the claim works​
Read this once. The escrow's claim() pays whoever calls it and takes no recipient, and a curve's sweepFees() only obeys the creator — so no contract can do either on your behalf. Instead your wallet runs a small piece of code for the claim: an EIP-7702 authorization points your wallet at PumpdevClaimDelegate, the transaction calls your own address, the delegate sweeps your curves, calls the escrow, receives your fees and forwards the commission. The delegate has one function, claim(address[] curves), that refuses every caller but your wallet itself, and no storage. The source is contracts/src/PumpdevClaimDelegate.sol in the PumpDev repository — read it before you authorize it.
Pass your tokens. Fees from live trading sit on each token's curve until swept. Name the tokens in tokens and the claim sweeps them; without it you get only what is already in the escrow (fees PONS swept itself, and fees from graduated tokens). Up to 10 tokens per claim.
The delegation stays on your wallet after the claim. That is by design: your next claim is a plain transaction with no authorization and ~37k less gas. It is safe to leave — there is nothing on it to call — and you can remove it any time with an authorization to the zero address (see Removing the delegation).
Your wallet must be an EOA. A smart-contract wallet cannot delegate; the API answers publicKey must be an EOA.
ethers ≥ 6.14. wallet.authorize() and type-4 transactions need it. Check with npm ls ethers.
Gas. About 0.0001 ETH covers a claim. The fees you claim arrive in the same transaction, but the gas is charged first.
Sign and send promptly. The nonce in the built transaction is read live; sending anything else from the wallet in between invalidates it.
Request Parameters​
| Parameter | Type | Required | Description |
|---|---|---|---|
publicKey | string | Yes | Creator wallet address — the wallet that will sign |
tokens | string[] | No | Tokens whose curves to sweep in this claim (max 10) |
priorityFee | number | No | Priority fee in gwei per gas (default 0.05) |
Response​
{
"transaction": {
"chainId": 4663, "type": 4, "from": "0x…", "to": "0x…",
"data": "0x…", "value": "0", "gasLimit": "201316", "nonce": 25,
"maxFeePerGas": "450000000", "maxPriorityFeePerGas": "50000000"
},
"authorization": { "chainId": 4663, "address": "0x<delegate>", "nonce": 26 },
"replacesDelegation": null,
"gasEstimated": true,
"escrowBalance": "1562787000000000",
"sweeps": [{ "token": "0x1Fb5…ABF9", "curve": "0xDbfE…7989", "pending": "142155013199998" }],
"tokens": [ … same per-token array as GET /api/claim-account … ],
"claimable": "1704942013199998",
"fee": "8524710065999",
"expectedNet": "1696417303133999",
"feeBps": 50
}
to is your own address and data is the delegate's claim(curves) over the curves in sweeps — the tokens you passed that hold fees and can be swept; graduated, custom-pair and unknown tokens are left out rather than allowed to fail the transaction. authorization is what you sign in addition to the transaction; it is null when delegated is already true, and the transaction is then type: 2. replacesDelegation names a delegate some other app installed on your wallet, which this claim replaces.
With sweeps, claimable, fee and expectedNet are estimates: the curve rounds its split on its own terms (a wei per sweep was observed). The commission is charged on-chain on what actually arrives; the exact figures are in the Claimed(wallet, claimed, fee) event of the receipt.
Example​
import { JsonRpcProvider, Wallet } from "ethers";
const API_URL = "https://rhc.pumpdev.io";
const RPC_URL = "https://rpc.mainnet.chain.robinhood.com";
const wallet = new Wallet(process.env.RHC_PRIVATE_KEY, new JsonRpcProvider(RPC_URL, 4663));
const MY_TOKENS = ["0x…", "0x…"]; // tokens you created that are still on their curve
// 1. Check the balance
const balance = await (await fetch(
`${API_URL}/api/claim-account?publicKey=${wallet.address}&tokens=${MY_TOKENS.join(",")}`,
)).json();
console.log(`Claimable: ${balance.claimableEth} ETH`);
if (balance.claimable === "0") process.exit(0);
// 2. Build the claim
const res = await fetch(`${API_URL}/api/claim-local`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ publicKey: wallet.address, tokens: MY_TOKENS }),
});
if (res.status !== 200) throw new Error((await res.json()).error);
const { transaction, authorization, expectedNet } = await res.json();
// 3. Sign the authorization (first claim only) and send
const authorizationList = authorization ? [await wallet.authorize(authorization)] : [];
const tx = await wallet.sendTransaction({ ...transaction, authorizationList });
console.log("Claim sent:", tx.hash, "— expected net", expectedNet, "wei");
await tx.wait();
Removing the delegation​
const nonce = await wallet.getNonce();
const revoke = await wallet.authorize({
address: "0x0000000000000000000000000000000000000000",
nonce: nonce + 1,
chainId: 4663,
});
await wallet.sendTransaction({ type: 4, to: wallet.address, authorizationList: [revoke] });
Limits in this version​
- ETH-quoted tokens only. Fees on tokens paired with an ERC-20 (
balanceOfToken) are not shown or claimed; such a token comes back witherror: "Custom-pair fees are not supported yet". - Graduated pools. After graduation fees accrue on the Uniswap V4 hook until PONS sweeps them into the escrow; this API claims what is in the escrow and reports the token as
graduated: true.
Error Handling​
| Error | Cause | Fix |
|---|---|---|
publicKey is required / Invalid publicKey | Missing or malformed address | Pass a 0x address |
publicKey must be an EOA | The address holds contract code | Claim from a plain key wallet |
No claimable creator fees available | Nothing in the escrow and nothing on the curves passed | Check GET /api/claim-account with your tokens first |
Invalid token address: … / Maximum 10 tokens per claim | Bad or too many tokens | Pass up to 10 0x addresses |
priorityFee … above the … gwei ceiling | A value in ETH where gwei was expected | Pass gwei per gas, e.g. 0.05 |
Gas estimation failed: … | The simulated claim reverted — most often a token in tokens whose creator is not publicKey | Pass only tokens this wallet created; the message carries the reason |
Claim is not configured on this server (503) | No delegate on this deployment | — |
nonce too low (on-chain) | Something else was sent from the wallet after the build | Build again |
Next Steps​
- PONS Claimable Balance — read the amount before claiming
- PONS Lightning Claim — the same claim, signed and sent server-side
- PONS Trading — buy and sell on Robinhood Chain
- PONS Create Token — launch a token
- Claim Creator Fees — the same idea on pump.fun