Guides
Risk, limits and approvals
The refusals a payment can meet, the risk operator product — corridors, limits, exposures, breakers, identities, cases and the audit log — and the maker-checker flow every loosening change goes through.
Needs: to read the refusals, nothing more than the product you call. For /risk, a test key
with risk; to decide an approval, a second test key of another person with risk and the approver
scope of the action.
Every payment is admitted by risk before any value moves. Risk is also an operator product: corridors,
limits and breakers act on the whole deployment, and every change that loosens a control waits for a
second person. In live mode /risk is available to a key whose agreement includes operator access,
and every request carries the signature of a registered operator
(Going live).
What a payment is refused with
| Code | Status | When |
|---|---|---|
pathglobal.risk.corridor_closed | 422 | No open corridor carries the pair |
pathglobal.risk.exposure_exceeded | 422 | The amount is outside what one payment or one day of the corridor carries, or a limit is reached |
pathglobal.risk.velocity_exceeded | 429 | A rate of the client or of the destination is reached |
pathglobal.risk.corridor_throttled | 429 | The corridor is throttled and its rate is reached |
pathglobal.risk.breaker_open | 503 | A breaker on the path of the payment is open, or admits only a probe amount |
pathglobal.risk.identity_restricted | 403 | The identity of the payer is restricted, blocked or not verified |
pathglobal.risk.verdict_invalid | 422 | The payment carries no valid Proof verdict for its subject |
pathglobal.proof.failed | 422 | The Proof verdict is fail |
pathglobal.proof.review | 409 | The Proof verdict is in review |
pathglobal.risk.halted | 503 | New work is paused. Send it again later |
On a route these codes come as the error of the call, or as the failure.code of a route that ends
failed (Route a payment). A 429 or a 503 can succeed when sent
again later.
Corridors
A corridor carries payments from one asset on a network to another, ASSET@network>ASSET@network,
for instance USD@fednow>MXN@spei. It states the bounds of one payment and of a day, a throttle, how
pay-ins that can still be recalled are treated, and the fields and Proof checks a payment must carry.
Its state is open, throttled or closed.
| Route | |
|---|---|
GET /risk/corridors · /corridors/:id | Read |
PUT /risk/corridors/:id | Writes a corridor, under an approval corridor_open |
POST /risk/corridors/:id/close | Closes it at once, { reason? } |
POST /risk/corridors/:id/throttle | { throttle: { per_minute, amount_per_hour }, approval?, reason? }: a tighter throttle applies at once, a looser one under corridor_open |
POST /risk/corridors/:id/open | Opens it, under corridor_open |
In the sandbox, a pair with no corridor gets one on first use; it advances pay-ins that can still be
recalled up to a limit, so such a payment is bounded_exposure. In live mode, Path Global opens the
corridors of a client's pairs on request.
Limits, exposures and breakers
A limit bounds a measure of one subject. Its id is <scope>:<subject>:<measure>[:<window>].
| Part | Values |
|---|---|
| scope | partner, network, corridor, asset, issuer, client, participant, provider, system |
| measure | exposure, outflow, count, open_position, unwind, in_doubt, prepaid |
| window | minute, hour, day, or none |
PUT /risk/limits/:id with { limit, approval? }: a lower limit applies at once, a higher one under
an approval limit_raise. GET /risk/exposures answers, per limit, the current value, the
limit_value and utilisation_bps.
A breaker stops what passes through one subject. Its id is <scope>:<subject>, with scope
corridor, partner, network, asset, account, client, provider or system. Its state is
closed, half_open or open.
| Route | |
|---|---|
GET /risk/breakers | Read |
POST /risk/breakers/:id/trip | Opens it at once, { cause } |
POST /risk/breakers/:id/reset | Under an approval breaker_reset: to half_open with a probe amount first, then to closed |
Changes that wait for a second person
A change that loosens a control or moves value out waits for a second person: another credential, and another operator, than the one that asked for it. Tightening applies at once.
- The maker sends the change. The API answers
202with{ approval }, staterequested. - A checker reads it (
GET /risk/approvals/:id) and approves or rejects it. - The change is applied by the call that carries the approval:
- on
/risk,/intelligenceand the pool routes of/liquidity, the same call withapprovalin its body; - on
/treasurypolicies, safeguard policies, fundings and the allowlist, the same request sent again; - a treasury transfer executes once approved, with no second call.
- on
const limit = { value: '<amount>', asset: 'USD' };
// maker
const first = await pg.risk.setLimit('client:acme:outflow:day', limit);
if (!('approval' in first)) throw new Error('a lower limit applies at once');
// 202 { approval: { id: "apr_…", state: "requested", … } }
// checker, with another person's key
await checker.risk.approve(first.approval.id);
// maker: the same change, carrying the approval
await pg.risk.setLimit('client:acme:outflow:day', limit, first.approval.id);An approval applies once, to the change it names, at the version of the target it names. It carries
action, subject, target_version, maker, checker once decided, and expires_at, and it is
signed.
state | |
|---|---|
requested | Waits for a decision |
approved | Decided; the change can be applied once |
rejected | Decided against |
consumed | The change was applied |
expired | Past expires_at without being used |
| Error | Status | When |
|---|---|---|
pathglobal.risk.self_approval | 403 | The checker is the maker's credential or operator |
pathglobal.risk.approval_pending | 409 | The change is sent again while its approval waits |
pathglobal.risk.approval_invalid | 409 | The approval is absent, not approved, expired, already used, or for another change |
pathglobal.auth.scope_missing | 403 | The checker's key lacks the approver scope of the action |
GET /risk/approvals lists them by state, action and subject.
Who decides what
The checker's key carries risk and the approver scope of the action.
| Approver scope | Actions |
|---|---|
treasury_approve | treasury_transfer, allowlist_add, policy_change, funding_expect, break_resolve, rule_change, collateral_withdraw, pool_resume |
risk_approve | corridor_open, limit_raise, breaker_reset, operator_register, identity_restore, case_decide, bounds_change, instruction_resolve, participant_onboard, cap_raise |
The decision in live mode
In live mode the checker also signs the decision. The body of POST /risk/approvals/:id/approve (or
/reject) is { "signature": "<128 hex characters>" }: the checker operator's Ed25519 signature over
the text of
hex(sha256(canonical({ approval, payload_digest, decision })))where approval is the id of the approval, payload_digest is read from the approval, decision is
approve or reject, and canonical is JSON with sorted keys and no whitespace. The request itself
carries the operator headers. In test mode the body is empty.
import { ed25519 } from '@noble/curves/ed25519';
import { sha256 } from '@noble/hashes/sha256';
import { bytesToHex } from '@noble/hashes/utils';
// `canonical` as in the verification example of Route a payment
const a = await checker.risk.approval(id);
const digest = bytesToHex(sha256(new TextEncoder().encode(canonical({ approval: a.id, payload_digest: a.payload_digest, decision: 'approve' }))));
await checker.risk.approve(a.id, bytesToHex(ed25519.sign(new TextEncoder().encode(digest), checkerPrivateKey)));Rules
A rule decides some treasury transfers within the bounds it states, in place of a person. Rules are
read with GET /risk/rules/:id and written with PUT /risk/rules/:id under an approval
rule_change.
Operators
GET /risk/operators lists the registered operators: each with its public_key, its scopes and
its status. POST /risk/operators registers one under an approval operator_register;
POST /risk/operators/:id/revoke revokes one at once.
Identities and cases
An identity is a client, a participant, a supplier, a provider or a partner, with a status:
pending, verified, restricted or blocked.
| Route | |
|---|---|
GET /risk/identities/:subject | Read |
POST /risk/identities/:subject/restrict · /block | At once, { reason } |
POST /risk/identities/:subject/restore | Under an approval identity_restore |
A case is opened when a payment needs a person, for instance a Proof verdict in review. It is
open, assigned or decided. POST /risk/cases/:id/assign takes it;
POST /risk/cases/:id/decide with { decision: "pass" | "fail" | "file", approval? } decides it under
an approval case_decide. GET /risk/cases lists them by state and subject.
The audit log
GET /risk/audit?from=&to= answers the decisions recorded between two instants: admissions,
verdicts used, approvals, cases, identities, limits, corridors, operators and rules, each with its
actor, digest and instant. Pages take after and limit.
What intelligence and the MCP server never do
Intelligence reads positions, forecasts and corridors. It only tightens a control or proposes a change: it never loosens a control, approves a change or moves value, and what it proposes goes through the same approvals as a person's change. No tool of the Path Global MCP server approves, halts or resumes, opens, closes or throttles a corridor or a circuit, adds to the allowlist, registers, or changes a limit. Its treasury transfer tool proposes a transfer that waits for a person.