Flat vs metered
The composer has a segmented toggle between two pricing models.- Flat
- Metered
One price per call, no matter the response. Simple and predictable. The default price is 0.0001.Flat is the right choice when every call does roughly the same amount of work.
The metering formula
For a metered endpoint, the price of a call is:decimals() at runtime and never hardcodes it, so the same code is correct whether USDC has 6 decimals or another value. See metering and classification for how the size and compute measurements are taken.
The cap relationship
Every paying agent signs an authorization for a cap, a ceiling on what it is willing to pay for a single call. The cap is not the price. When your handler returns:- The escrow reserves the cap up front, before the handler runs, so there is no free-compute path.
- On a successful response the buyer is charged
min(computed, cap), never more than what it signed for. - If your metered formula would exceed the cap, the charge is clamped down to the cap.
A cap that is too low for your pricing means calls get clamped and you earn less than your formula intends. Price your endpoint so a normal call lands comfortably under the caps agents sign.
The 70/30 split
Every paid call is split 70/30 between you and the platform. The split is applied inline, inside the same on-chain debit that charges the buyer, not as a later payout job. Your 70% accrues as an internal balance you withdraw whenever you want. See Earnings and withdraw.Bonds
To publish an endpoint you post a USDC bond into the StakingVault. Publishing is gated on a posted bond: no bond, no listing.
The bond backs your endpoint’s reputation. It is skin in the game: a well-behaved endpoint keeps its bond, and a misbehaving one puts it at risk.
Reclaiming a bond
A bond can be reclaimed after a 7-day cooldown. The flow is two steps:1
Request withdraw
Call
requestWithdraw to start the 7-day cooldown clock.2
Withdraw
After the cooldown, call
withdraw to take the bond back.Slashing and insurance
If an endpoint misbehaves, its bond can be slashed into an insurance pool. Slashing is a two-step process with a 1-day dispute window, so it is never instant or silent. Refunds to buyers harmed by a bad endpoint come from that insurance pool. In normal operation, a declared error for bad buyer input is never a strike and never touches your bond. See Reputation and strikes for what counts as misbehavior.Metering and classification
How the size and compute measurements are taken and how a response is classified.
Contracts reference
The StakingVault, PaymentEscrow, and the on-chain details behind bonds and the split.