> For the complete documentation index, see [llms.txt](https://docs.goassay.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goassay.ai/developers/list-your-api-advanced/staking-and-penalties.md).

# Staking and penalties on chain

Understand the stake behind paid calls, how to withdraw it and what a penalty can take.

Stake is USDG you deposit as security for your paid tools on Robinhood Chain. It backs your promise about data quality. If verified failures exceed your declared failure rate by enough to count as a breach, Assay can propose a penalty against that stake.

## How much to stake

Check **Stake** for the amount your tools need. The standard calculation for a paid listing is the larger of the stake floor and a multiple of the call price. The configured defaults are 50 USDG and 1,000 times the call price, but a higher on-chain minimum or an agreed provider amount can change the requirement. Use the amount shown for your account.

For example, with those defaults and no override, a 0.10 USDG call needs 100 USDG of stake. Several listings share the stake: the requirement is their largest individual requirement, rather than their sum. A free listing requires no stake; a listing that also offers paid calls does.

## Add stake

1. Sign in and open **Stake**. Connect the wallet you will use for stake on Robinhood Chain.
2. Choose **Add stake** and enter the USDG amount.
3. Follow the wallet steps to prove ownership if needed, approve the token spend if needed, and deposit the stake.
4. Wait for confirmation and check the updated stake amount.

## Unlock and withdraw

1. Open **Stake** and choose **Withdraw stake**.
2. Enter the amount and start the withdrawal in your wallet.
3. Wait until the displayed unlock time, then return and withdraw the available amount to your wallet.

Starting a withdrawal moves stake into a waiting balance called unbonding. It immediately reduces the bonded stake used for paid-call eligibility. The waiting balance remains exposed to penalties until withdrawn. Another unstake request restarts the waiting clock for the whole unbonding balance.

The waiting period is configurable between 11 and 30 days. Withdrawal uses the current period, so a parameter change can move an existing unlock time. Pending penalties can keep part of the balance reserved even after the waiting period ends. A contract pause or account block can also stop stake deposits and withdrawals.

## What triggers a penalty

Assay measures your declared failure rate over a quality window. Only `PASS` and `FAIL` quality observations count toward the verified sample. A window closes when it reaches the minimum sample or its maximum age. A window below the minimum sample is not judged for an SLA penalty; the minimum is shown on **Quality** for each window.

For a large enough sample, the observed failure rate must exceed your declaration plus a statistical tolerance. A breach creates a proposed penalty; it does not immediately take money. The declaration and calculation settings are frozen when the window opens, so changing your promise does not rewrite that window's rules.

A mapping defect or an unjudged response is not automatically a quality failure. Review the failed calls and calculation under **Penalties → Why this penalty?** before deciding how to respond.

## What is taken, and where it goes

A penalty first reserves stake on chain. During its dispute window, you can contest it with your stake wallet. The default on-chain delay is 72 hours, but the deadline on the individual record is what matters.

If the penalty executes, the contract transfers the customer share to the named harmed customer and the platform share to Assay's treasury. The remaining share stays in your stake. The app's displayed split is 60% to customers, 30% to Assay and 10% never taken. For a fully applied 10 USDG penalty at that split, your stake falls by 9 USDG: 6 goes to customers, 3 to Assay and 1 stays yours.

The actual transfer uses the on-chain split at execution. Limits or already reserved stake can reduce the amount reserved when the penalty is proposed. At execution the entire reserved amount must fit the rolling limits; otherwise it waits. Read the executed amounts for the final deduction, rather than treating the original proposed amount as money already lost.

## Check it worked

After a deposit, check the confirmed bonded stake and required amount. After requesting withdrawal, check the waiting balance and unlock date. After a penalty, check whether it is pending, disputed, cancelled or executed and whether the deduction has actually happened.

<details>

<summary>Optional: reproduce the SLA calculation</summary>

With the window's frozen values, let `p` be your declared failure rate, `n` the verified sample size and `r` the observed failure rate:

```
tolerance = 2.58 × sqrt(p × (1 - p) / n)
breach requires n >= n_min and r > p + tolerance
penalty = total call amount × max(0, r - p) × 2
```

`n_min` and the z value are frozen on the window and shown under **Why this penalty? → Show derivation**.

The tolerance decides whether there is a breach. Once there is one, the penalty measures excess above your declaration. The backend rounds the multiplied excess rate to a scale of 1,000,000 and floors the resulting money to whole minor units. It then allocates capped penalties among harmed customers in proportion to the priced failed calls. There is no extra division by the verification sample rate.

</details>

<details>

<summary>Optional: read the stake contract</summary>

`AssayStake` accepts `depositStake`, `requestUnstake` and `withdrawStake`. The provider is the stake-owning wallet; `depositStakeFor` can fund that wallet's stake from another account. Withdrawals pay the stake owner.

`withdrawableOf` is the smaller of matured unbonding and total at-risk stake minus pending reservations. Both bonded and unbonding balances remain at risk. Execution deducts transferred amounts from unbonding first, then bonded stake.

At proposal, the reservation is bounded by the signed penalty, the provider's allowance calculated from at-risk stake and `slashCapBps`, and stake not already reserved. Each attestation must also fit `penaltyAmount`. Execution checks a rolling provider limit and `verifierDailyCap`; both meter the gross applied penalty. These limits are not a permanent ceiling on your total possible loss.

The live `slashAgentBps` and `slashPlatformBps` determine each transfer with integer flooring. Any remainder stays with you. An unexecuted pending record can be expired from seven days after its `executableAt`, or earlier if its verifier key becomes unusable. Expiry releases the reservation; it does not transfer money.

</details>

## Errors

| Situation                                             | Action                                                                             |
| ----------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Stake is below the requirement                        | Add the displayed shortfall before relying on paid-call eligibility.               |
| Unlock date has passed but not all stake is available | Check pending reservations and the current waiting period.                         |
| Wallet action is refused                              | Check the stake-owning wallet, balance, chain, pause status and any account block. |
| A proposed penalty looks wrong                        | Open its record and act before its dispute deadline.                               |

## Go further

* [Map your API to a tool contract](/developers/list-your-api-advanced/map-your-api.md).
* List your API (optional): [Staking and penalties](https://docs.goassay.ai/list-your-api/manage-your-stake).

## Next

* [Dispute a stake penalty on chain](/developers/list-your-api-advanced/dispute-a-stake-penalty.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.goassay.ai/developers/list-your-api-advanced/staking-and-penalties.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
