Skip to main content

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
OperationInputs and outputsProof and authority
createCreditNew state; optionally an initial debit and ordinary NoteOwner authorization and creation proof
creditDrawN consumed states, N successors, one ordinary NoteSpender authorization and draw proof
updateCreditConsumes a state and creates an updated oneOwner authorization and update proof
revokeCreditSets the original slot’s revocation bitDirect 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​

  1. Define owner, spender, recipient, token, limits and expiry.
  2. After creation, discover and authenticate the spender-role delivery.
  3. Before drawing, recheck consumption, revocation, limits, current balance and allowance.
  4. Use execution-block time for periods and deadlines; local time cannot guarantee eligibility.
  5. 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.