# Amount mismatch

Injected failure: paid amount differs from the request; traded amount differs from the request.

Failure mode `amount_mismatch` of the CommitLayer failure matrix, on 2 of its 8 workflows. Each run below is the sandbox's scripted agent acting on the sandbox's fake systems of record under the injected failure, an oracle reading those systems' databases, and the verdict of engine 1.0.0 from the systems of record alone. The accounts, orders and amounts are the sandbox's and describe no real customer. Last changed 2026-11-13.

| Workflow | Agent reported | Oracle (policy) | CommitLayer (outcome / policy) | Why |
|---|---|---|---|---|
| Send a payout | success | FAIL | PASS / FAIL | Payout amount differs from the amount requested |
| Place a trade | success | FAIL | PASS / FAIL | The order's notional differs from the amount requested |

## Send a payout

Scenario `payout/amount_mismatch`: paid amount differs from the request. Asked for 100, the agent sends 1,000 (a unit error): the payment and the ledger both differ from the request.

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /ledger/accounts/acc_1`: 200
- `POST /payments/payouts`: 200
- `POST /ledger/accounts/acc_1/post`: 200
- `POST /crm/notes`: 200

Agent notes: sent 1000.0 where 100.0 was requested.

### What the systems of record showed

Records written after the action:

- payments `payout_created` on acc_1 (amount=1000, currency=USD, payout_id=po_acc_1_1)
- ledger `ledger_posted` on acc_1 (amount=1000, balance=9000)
- crm `note_added` on acc_1 (author=lab-agent, text=Payout of 1000.0 USD sent)

The oracle, reading the databases directly: outcome PASS, policy FAIL: payout amount differs from request; ledger balance not before minus amount.

### The verdict and why

FAIL — Payout amount differs from the amount requested (outcome PASS, policy FAIL).

- forbidden effect, payments.payout_created amount differs from the action's amount: Payout amount differs from the amount requested
- forbidden effect, ledger.ledger_posted balance differs from the latest ledger.account_balance balance before the action minus amount (tolerance 0.005): Ledger balance after the payout is not the balance before minus the amount

## Place a trade

Scenario `trade/amount_mismatch`: traded amount differs from the request. Asked for 50, the agent sends 500 (a unit error): the broker's order differs from the request.

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /broker/products/TSLA-USD`: 200
- `POST /broker/orders`: 200
- `GET /broker/orders/ord_TSLA-USD_1`: 200
- `POST /crm/notes`: 200

Agent notes: sent 500.0 where 50.0 was requested.

### What the systems of record showed

Records written after the action:

- broker `order_created` on TSLA-USD (order_id=ord_TSLA-USD_1, side=BUY, quote_value=500, status=FILLED)
- broker `order_filled` on TSLA-USD (order_id=ord_TSLA-USD_1, side=BUY, filled_value=500, filled_size=1.90839695, average_filled_price=262)
- crm `note_added` on TSLA-USD (author=lab-agent, text=BUY 500.0 USD of TSLA-USD)

The oracle, reading the databases directly: outcome PASS, policy FAIL: order notional differs from request.

### The verdict and why

FAIL — The order's notional differs from the amount requested (outcome PASS, policy FAIL).

- forbidden effect, broker.order_created quote_value differs from the action's amount (tolerance 0.01): The order's notional differs from the amount requested

## Run it in the Failure Lab

The Failure Lab replays each run above: the agent's calls, the records the systems held and the verdict. No account is needed. The verdict comes from the production engine while you watch.

- [Send a payout, Amount mismatch](https://commitlayer.ai/lab?workflow=payout&failure=amount_mismatch)
- [Place a trade, Amount mismatch](https://commitlayer.ai/lab?workflow=trade&failure=amount_mismatch)

The sandbox in the app runs the exact scenario in your own workspace, as a verified action:

- [`payout/amount_mismatch`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Dpayout%2Famount_mismatch)
- [`trade/amount_mismatch`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Dtrade%2Famount_mismatch)
