commish

Hold the router's cut until the call is final. 

An agent pays a tool 0.05 USDC over HTTP 402. The router that sent it there earns 10%, reserved on-chain where the tool can't spend it. After a 10-minute refund window, anyone can release it, and it can only reach the router. First users are agents. Humans are not in this loop.

Non-custodial and open source. Custody and payout rules are enforced by a program on Solana mainnet; the relayer verifies each payment before it is recorded.

Follow one router's cut

commish · usdc
Calls recordedHeldPaid outSold early
Traffic
Example: 1,000 paid calls · 50.00 USDC
Router cut at 10%
5.00 USDC
Payee
Router

10

Refund window

Unreserved vault50.00 / 50.00

Example run, not live traffic: agents paid the tool for 1,000 calls through one router. Record them to reserve the router's cut.

USDCSolana mainnetRefund windowReserved on-chainPermissionless releaseEarly payoutPinocchioOpen sourceNon-custodialUSDCSolana mainnetRefund windowReserved on-chainPermissionless releaseEarly payoutPinocchioOpen sourceNon-custodial

Program address, deploying

Program size

9,272 bytes

Instructions

6

Attack and flow tests

33

License

Apache-2.0

Agents pay per call. Routers get paid on trust.

Pay the router at once, pay for failures

A call can fail, time out or be refunded. A tool that pays its router on every payment pays commission on calls it later gives back.

Hold the cut, and the router trusts a spreadsheet

If the tool keeps the cut until it is sure, the router has no record of what it is owed and no way to collect if the tool stops paying.

Machine speed, human paperwork

Agents make thousands of 5-cent payments. Invoices, payout thresholds and monthly settlement don't fit that, and nobody is there to click approve.

How it works

Pay, record, hold, release

01

Pay

An agent asks for a paid route and gets 402 Payment Required. It pays 0.05 USDC into the campaign vault, with a memo naming the router that sent it.

02

Record

The relayer reads the payment on-chain and records it. The program works out the router's 10% from the campaign rate and reserves it in its own account.

03

Hold

Inside the 10-minute window a refunded call can still be cancelled, with an on-chain refund as proof. Once the window closes, the cut is owed.

04

Release

Anyone can then release it. It can only reach the router's USDC account, and the account's rent goes back to whoever paid it.

Guarantees

Rules the tool can't bend

The program checks each one, and the test suite attacks each one.

Owed money stays locked

Withdrawals can only touch the part of the vault that isn't reserved for routers.

One payment, one cut

The commission address comes from a hash of the payment signature, so the program rejects a second record while the cut is open. After it closes, the relayer checks the address's on-chain history and refuses the payment again.

Only the attestor records calls

Each campaign names one attestor key, the relayer. The amount comes from the campaign rate, never from the caller.

Payouts can't be redirected

Release pays the current payee's token account in the campaign's own token, and nothing else.

No cancelling after the window

Once the refund window has passed, a cut can only be paid.

Works without this website

Release needs no permission. If this site went offline, routers could still collect.

Early payout

Sell a pending cut for USDC now

A held cut is money owed on a date. For tools with longer refund windows, the router can sell it at a small discount to a buyer who pays now and collects at release. The buyer also takes over the refund risk.

It settles in one transaction: the buyer pays the router, and the buyer becomes the payee. Nothing else about the cut changes.

Router receives today

48.75

Buyer collects at release

50.00

Buyer's annualized return133.7%

For tools

  • Charge agents per call over HTTP 402, in USDC
  • Pay routers for traffic: the program holds the cut, not you or them
  • Set the cut and the refund window once, per campaign
  • The payment itself funds the vault: no USDC float needed
  • Withdraw what isn't reserved whenever you like
Create a campaign

For routers

  • Name yourself in the payment memo: commish:<your wallet>
  • Every cut you earned, visible on-chain
  • Paid to your wallet when the window closes
  • Collect even if the tool stops answering
See my cuts

Integration

Record a paid call

The relayer signs one instruction per verified payment. The order hash is SHA-256 of the campaign and the payment signature, so the same payment always maps to the same commission address.

// The relayer, after it has read a successful USDC transfer into the vault.
import { recordSaleIx, COMMISSION_LEN } from "./commish/program";
import { createHash } from "node:crypto";
// The order hash is bound to the payment signature; the relayer also refuses a payment whose closed commission was recorded before.
const hash = createHash("sha256").update("commish:x402:" + campaign + ":" + paymentSig).digest();
const { instruction } = await recordSaleIx({
attestor: relayer.address, // the key named by the campaign
payer: relayer.address, // rent for the commission account
campaign,
vault,
orderHash: hash,
orderAmount: 50_000n, // 0.05 USDC paid by the agent, 6 decimals
creator: router, // from the payment memo commish:<router>
lamports: await rpc.getMinimumBalanceForRentExemption(BigInt(COMMISSION_LEN)).send(),
});
await sendAndConfirm([instruction], [relayer]); // your usual send helper

Questions

The campaign's vault: a USDC token account owned by the campaign address. Only the program can move funds out of it, and only under the rules above.

Pay routers for agent traffic, with the cut held on-chain.

Call the live 402 endpoint, or set up a campaign with any Solana wallet.