Credit: deferred debit authority
Credit authorizes a spender to debit an owner’s ERC-20 wallet under defined conditions. Creating the grant alone neither deposits principal into Core nor locks the owner’s balance or allowance. A credit limit is not a redeemable token balance. When creation includes an initial draw, that transaction collects the agreed funds and creates the payment Note.
Roles and output
- Owner: supplies ERC-20 funds, sets limits and expiry, and can update or revoke.
- Spender: authorizes draws within the grant’s conditions.
- Note recipient: receives the ordinary payment Note and may differ from the spender.
- Submitter: pays gas and broadcasts the EVM transaction; a relay may fill this role.
A draw may combine multiple owners while retaining one spender and one token. Failure to collect from any payer reverts the whole call; there is no partial payment.
Lifecycle
create → current Credit → draw / update → successor Credit
│ │
└── original revocation slot ────┘
│
owner revokes
| Operation | Inputs and outputs | Proof and authority |
|---|---|---|
createCredit | New state; optionally an initial debit and ordinary Note | Owner authorization and creation proof |
creditDraw | N consumed states, N successors, one ordinary Note | Spender authorization and draw proof |
updateCredit | Consumes a state and creates an updated one | Owner authorization and update proof |
revokeCredit | Sets the original slot’s revocation bit | Direct owner call or separate revoke signature; no ZK proof |
Revocation needs no latest private state and cannot claw back issued Notes. It remains available during both protocol and circuit pauses, although token behavior can still affect fee collection.
Amounts, limits and fees
singleLimit, dailyLimit and monthlyLimit limit a draw, UTC-day usage and UTC-month usage. Zero disables that particular check. availableCredit and unlimited independently govern remaining total authority: finite zero means exhausted, not unlimited.
Draw limits and usage count the gross debit; the ordinary recipient Note contains gross minus fee. Optional create/update/revoke fees are collected from the owner wallet and do not consume draw quota.
Updates adjust remaining authority using increase/decrease deltas rather than replacing an absolute balance. They cannot erase historical usage. Review fees, net output and expiry before signing. Core’s initial payment amount is gross, whereas the merchant’s IPP initial-payment amount is net; the adapter must preserve that distinction.
Integration checks
- Define owner, spender, recipient, token, limits and expiry.
- After creation, discover and authenticate the spender-role delivery.
- Before drawing, recheck consumption, revocation, limits, current balance and allowance.
- Use execution-block time for periods and deadlines; local time cannot guarantee eligibility.
- Reconcile successor Credit and the ordinary output Note together, including actual fees.
IPP defines application requests and receipts. Credit alone does not establish that a merchant order is complete.