Protocol

Settlement and fees

What happens on chain when an agent pays, and how the fee is set.

What happens on chain

  1. Policy check

    The signer calls requestPayment on the agent account. The account checks the per-call cap, the daily cap, the payee allowlist, pause and revoke, and that the payment ID was never used.

  2. Payment

    The settlement router takes the amount from the buffer and pays the merchant, or the signer in exact mode.

  3. Repayment

    The account repays the amount plus the fee from its liquid USDG. Whatever it cannot cover becomes debt, which must stay below the account's total value.

  4. Background settlement

    settleDebt unwinds just enough of the parked position to repay the debt. Anyone can call it.

The fee

The instant-settlement fee is set in the FeeModule. It is currently 0.10 percent of the payment. The contract bounds it between 0 and 1 percent, and any change goes through the 24-hour timelock. Holders of $UNSLEPT can receive tiered discounts once tiers are configured; the account owner's wallet and staked balances count.

PaymentFee at 0.10 percent
0.01 USDG0.00001 USDG
1 USDG0.001 USDG
100 USDG0.10 USDG