ZenithPay iconZenithPay
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)

FieldMeaningEnforcement
perTxLimitMax settlement-token amount per transactionHard block on-chain
dailyBudgetMax cumulative settlement-token spend per dayHard block on-chain
allowlistAllowed merchant hostnames (service URLs)Hard block on-chain (when set)
approvalThresholdSettlement-token amount above which payments require human reviewOff-chain "pause" queue (not a contract override)

What happens when a payment is attempted

  1. Approved: payment passes hard policy and executes.
  2. Pending: payment exceeds approvalThreshold and is paused for human review (GET /approvals).
  3. Blocked: payment violates hard policy and is rejected immediately (e.g. per_tx_limit_exceeded, daily_budget_exceeded, merchant_not_allowlisted).

On-chain proofs

  • PaymentExecuted for approvals
  • PaymentBlocked for hard rejections

Current deployment

  • Network: X Layer (chainId: 196)
  • Contract: 0x1250e52B7154E12F66e8E347ce116F463D4E248B

On this page