# Escrow and payment

> Where the bounty sits, what it costs, how the worker is paid and how you get a refund.

Arrowproof never holds your money. The bounty sits in an escrow agreement on Robinhood Chain, made with Bull's escrow contracts, from the moment you approve a worker.

> **Note** Bull's escrow contracts are not audited yet, so bounties are capped at 50 USDG per task.

## The agreement

When you press **Approve and lock**, an agreement is created with:

| Field | Value |
|---|---|
| Payer | Your wallet |
| Payee | The worker you approved |
| Amount | The bounty, in USDG |
| Release condition | One attestation from the arbiter's key |
| Expiry | Your deadline, counted from the lock |
| Terms hash | `keccak256("enclaus:" + commitment)` (a protocol label from the open-source platform), see [How privacy works](/docs/privacy.html#what-goes-on-chain) |

Bull's API builds the transactions. Our server decodes and checks every one (token, exact approval, payee, amount, terms hash, a single arbiter condition, expiry and fee) before your wallet sees them.

## Costs

| | Amount | Paid by |
|---|---|---|
| Bounty | You choose, up to 50 USDG | You, only if the condition comes true |
| Escrow fee | 0.5% of the bounty in ETH, at least $0.05 | You, when you lock |
| Gas | Two transactions on Robinhood Chain | You, when you lock |
| Platform fee | None for now | |

## How the worker is paid

1. The worker submits an exploit, and the arbiter signs a `condition-true` verdict.
2. The arbiter reads your lock transaction from the chain and checks that the agreement commits to the exact terms it opened.
3. It sends `attest`, then `release`. The USDG goes to the worker's wallet.
4. The task shows **Paid** with the release transaction.

The task is marked paid only after the release transaction succeeds. If the chain is busy or the arbiter is out of gas, the task stays **Checking** and either side can press **Retry payment**. The arbiter records each transaction, so a retry never pays twice.

## Refunds

If no exploit makes the condition true before the deadline, the agreement can no longer be released. After the expiry, anyone can send `refund` on the agreement and the USDG returns to you.

> **Note** The app has no refund button yet. Until it does, the refund is a direct call to Bull's agreement contract.

One edge case to know: if a true verdict is still waiting for its payout when the deadline passes, Bull only allows a refund. The payout runs right after the verdict, so the window is short.

## Open contests

An open contest has no worker to lock for until someone wins, so its bounty moves differently:

| | Exclusive task | Open contest |
|---|---|---|
| Before a win | Locked in escrow for the approved worker | Held in the requester's wallet, shown live on the task page |
| After a win | The arbiter attests and Bull releases | Arrowproof locks the bounty in a 24 hour agreement whose payee is the winner, then the arbiter attests and releases |
| No winner by the deadline | Refund from the escrow | Nothing to refund: no money was locked |

The trade-off, stated plainly: before a win, the bounty is not locked on chain, so workers rely on the requester paying after the win. For now, only Arrowproof posts open contests, from its own starter wallet, and the payout runs automatically. The arbiter's signed verdict names the winning wallet, and the arbiter only releases an agreement that pays that wallet. If the payout is late, the task page still shows the signed verdict for everyone.
