Skip to main content
In this guide, you’ll read and claim trading fees on Robinhood Chain. Each token has its own BagsFeeShare contract that accrues the creator half of the trade fee (1% of every trade, in WETH) for the claimers configured at launch, plus the optional partner’s cut of the protocol half.

Prerequisites

Before starting, make sure you have:
  • Completed the Environment Setup.
  • A token whose feeShare address you can resolve (from launch, factory.feeShareForToken(token), or BagsLens.getTokenState).
  • A wallet with a positive claimable balance — i.e. one of the token’s configured fee claimers or the optional partner. Check with claimableOf(token, user) (or feeShare.claimable(user)).
To use the Bags API instead of reading contracts directly, call Get Robinhood Claimable Positions, then Create Robinhood Claim Transactions for each position you want to claim.

1. How Fee Sharing Works

The flat 2% trade fee splits into two halves, and the token’s BagsFeeShare is the pull-payment ledger (in WETH) for two independent streams:
  • The claimers configured at launch split 100% of the creator half by their bps — the partner never reduces their share.
  • The partner (if set at launch) earns its cut from the protocol half at the launch-snapshotted partnerFeeBps (default 2500 = 25% of the half). See the Partner Program guide for the partner-side workflow.
Each recipient’s balance accumulates in claimable[address] until they call claim. This happens automatically as trades occur in both phases — creators earn from bonding-curve trades and pool trades alike.
Post-migration fees first accrue inside the Bags v4 hook and are periodically swept into the fee-share contract (anyone can call hook.sweep(poolId)). claim pokes that sweep for you, so you don’t need a separate sweep transaction.

2. Read Claimable Fees

Use BagsLens.claimableOf(token, user) for the amount claimable right now (already notified to the fee-share, in WETH wei):
read-claimable.ts
You can also read directly from the fee-share contract:
claimableOf counts only WETH already notified to the fee-share. Fees still sitting un-swept in the v4 hook are not included; they become claimable once claim (or another sweep) flushes them.
The claimer list is not immutable — the fee-share owner can call setClaimers (mirrored by the ClaimersUpdated event). Re-read getClaimers() rather than caching it forever.

3. Claim Fees

Call claim(unwrap) on the token’s BagsFeeShare. Pass unwrap: true to receive native ETH; false leaves the payout as WETH.
claim-fees.ts
Check claimableOf (or feeShare.claimable) is greater than zero before claiming. Calling claim with nothing to claim reverts with BagsFeeShare_NothingToClaim and wastes gas.

4. Estimate Pending (Un-Swept) Fees

For a fuller picture of what a creator will eventually receive, add the un-swept accrual sitting in the v4 hook for the token’s pool. The hook exposes per-pool config and pending fees in one read: pools(poolId) returns (bondingCurve, feeShare, pendingFees, minted, partner, partnerFeeBps).
pending-estimate.ts
pendingUserEstimate is an estimate — the exact amount is settled when the sweep runs during a claim (FeesSwept(poolId, bagsShare, creatorShare, partnerShare) reports the actual split).

Troubleshooting

  • BagsFeeShare_NothingToClaim — your claimable balance is zero. Wait for trades to accrue fees (or for a sweep to flush hook fees), and check claimableOf before claiming.
  • BagsFeeShare_NotAuthorized — only the bonding curve and hook may notify fees; you can’t call notifyFee yourself. Just call claim.
  • Claim succeeds but you received WETH, not ETH — you passed unwrap: false. Pass true for native ETH, or unwrap the WETH yourself later.
  • Not a claimer — only the token’s configured claimers and its optional partner accrue fees. Verify eligibility with claimableOf(token, user) (or feeShare.claimable(user)) being greater than zero. Note feeShare.getClaimers() lists only the configured claimers — it does not include the partner.
For the full function, event, and error catalog, see the Contracts Reference.