Bu sayfa yalnızca İngilizce olarak mevcuttur. Bağlayıcı olan İngilizce sürümdür.
Billing & escrow
How deposits, per-second billing, the 7% protocol fee, refunds, cancellation, timeout reclaim and slashing compensation work, with worked MZG examples.
MZGrid billing is enforced by the MZGridEscrow contract on Base. This page explains exactly what you pay and every path by which your deposit comes back.
The deposit
Before a job starts you deposit:
deposit = pricePerHour × maxDurationOn-chain, maxDuration is in seconds and the contract computes pricePerHour × maxDuration / 3600 in wei (18 decimals). The API reports amounts as decimal strings with up to six decimals.
Per-second billing
When the job ends, you are charged only for the seconds it actually ran:
charged = min(deposit, pricePerHour × usedSeconds / 3600)
refund = deposit − chargedThere is no minimum charge, no start-up fee and no separate network fee.
The 7% protocol fee is inside the price
The offer price is everything you pay. The 7% protocol fee (FEE_BPS = 700) is taken out of the charged amount and sent to the treasury; the provider receives the remaining 93%. Of that provider share, 80% is paid out liquid and 20% (LOCK_BPS = 2000) is added to the provider's lock in the ProviderRegistry.
Worked example: H100 SXM, stopped early
You deploy Llama 3.3 70B FP8 on an H100 SXM offer priced at 750 MZG/h with a maximum duration of 4 hours, and stop it after 2 h 30 min (9,000 seconds).
| Item | Calculation | MZG |
|---|---|---|
| Deposit | 750 × 4 | 3,000.00 |
| Charged | 750 × 9,000 / 3,600 | 1,875.00 |
| Refund to you | 3,000 − 1,875 | 1,125.00 |
| Protocol fee (treasury) | 1,875 × 7% | 131.25 |
| Provider share | 1,875 − 131.25 | 1,743.75 |
| — locked in registry | 1,743.75 × 20% | 348.75 |
| — liquid to provider | 1,743.75 − 348.75 | 1,395.00 |
Check: 1,125.00 + 131.25 + 348.75 + 1,395.00 = 3,000.00 — every unit of the deposit is accounted for.
Worked example: RTX 4090 batch job that runs the full duration
A batch job on an RTX 4090 offer at 150 MZG/h with maxDurationHours: 6 runs until the deadline.
| Item | MZG |
|---|---|
| Deposit (150 × 6) | 900.00 |
| Charged (capped at the deposit) | 900.00 |
| Refund | 0.00 |
| Fee (7%) | 63.00 |
| Provider liquid (74.4%) | 669.60 |
| Provider locked (18.6%) | 167.40 |
If your batch job might need more time, set a longer maxDurationHours. The extra deposit is refunded if unused.
Refund paths
| Situation | Who acts | Contract call | You receive |
|---|---|---|---|
| Job completes or you stop it | Coordinator | completeJob | deposit − charged |
| Provider does not accept within 10 minutes of funding | You | cancelJob | Full deposit |
| Job fails (container cannot start, provider misbehaves, verification fails) | Coordinator | failJob | Full deposit |
Job is not settled by deadline + 1 hour | You | reclaimTimeout | Full deposit |
Accept window and cancellation
A provider must call acceptJob within ACCEPT_WINDOW = 10 minutes of funding. If they do not, the job stays funded and, once the window has passed, you can call cancelJob from the dashboard or directly on the contract. The full deposit is returned and the job becomes cancelled.
Timeout reclaim
When a provider accepts, the escrow sets deadline = acceptedAt + maxDuration. If the job has not been settled by deadline + TIMEOUT_GRACE (1 hour), you can call reclaimTimeout yourself. This path does not depend on the MZGrid API being available: it is a direct contract call and returns the full deposit.
Failed jobs
If the coordinator detects that a job cannot complete — the container fails to start, usage reports stop, or a spot check fails — it calls failJob, which refunds the full deposit regardless of how long the job ran.
Slashing compensation
When a failure is the provider's fault, the coordinator also slashes the provider's locked MZG. 50% of the slashed amount is sent to you, on top of your full refund; the other 50% goes to the treasury.
Example: your 3,000 MZG H100 job is accepted, and the provider's machine stops reporting for more than 10 minutes. The provider has 8,800 MZG locked.
| Item | MZG |
|---|---|
Full refund via failJob | 3,000.00 |
Slash: min(locked, 1 × deposit) = min(8,800, 3,000) | 3,000.00 |
| Your share of the slash (50%) | 1,500.00 |
| Total returned to you | 4,500.00 |
Slashed amounts are capped by what the provider actually has locked. See Slashing for all three reasons.
Where to see your balances
GET /v1/account and the dashboard show your MZG wallet balance, the amount currently held in escrow and your spend over the last 30 days. Every funding, acceptance and settlement transaction is linked from the job and can be inspected on BaseScan.