Concepts
Spend Policy
On-chain spend limits for agents
SpendPolicy.sol is an on-chain spend control contract deployed per agent on X Layer.
ZenithPay uses it as the authoritative gate: policy is always checked before swap or settlement.
SpendPolicy.sol: on-chain enforcement
ZenithPay's spend control is enforced by SpendPolicy.sol on X Layer.
Policy fields (v1)
| Field | Meaning | Enforcement |
|---|---|---|
perTxLimit | Max settlement-token amount per transaction | Hard block on-chain |
dailyBudget | Max cumulative settlement-token spend per day | Hard block on-chain |
allowlist | Allowed merchant hostnames (service URLs) | Hard block on-chain (when set) |
approvalThreshold | Settlement-token amount above which payments require human review | Off-chain "pause" queue (not a contract override) |
What happens when a payment is attempted
- Approved: payment passes hard policy and executes.
- Pending: payment exceeds
approvalThresholdand is paused for human review (GET /approvals). - Blocked: payment violates hard policy and is rejected immediately (e.g.
per_tx_limit_exceeded,daily_budget_exceeded,merchant_not_allowlisted).
On-chain proofs
PaymentExecutedfor approvalsPaymentBlockedfor hard rejections
Current deployment
- Network: X Layer (
chainId: 196) - Contract:
0x1250e52B7154E12F66e8E347ce116F463D4E248B