> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skia.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Sponsorships

> Sponsored settlement on Skia: ERC-4337 smart accounts, the paymaster and policy contracts, session keys, and why the swap-sponsored template answers 501 in Phase 1.

# Sponsorships

Beyond the sovereign commit/reveal rail, Skia runs **sponsored settlement**
through ERC-4337 account abstraction: smart wallets that a relayer can drive
on the taker's behalf, with gas paid from a paymaster governed by policy
contracts.

## The pieces

| Contract / surface | Role |
| - | - |
| `SkiaAccount` | the smart wallet (ERC-4337 account), CREATE2-deployed per party |
| `SkiaAccountFactory` | deterministic account deployment |
| `SkiaPaymaster` | sponsors gas on governed lanes |
| `SkiaDefaultPolicy` / `ISponsorPolicy` | the sponsorship policy boundary — what the paymaster is allowed to pay for |
| Session keys | scoped keys on the smart account (`/api/wallets/smart/{address}/session-keys`) |
| UserOps | the bundler-facing lane (`/api/wallets/smart/{address}/userops`, `/deploy`) |

The console surface for smart accounts lives under `/api/wallets/smart/**`;
settlement itself still lands in the same `SwapERC20` rail.

## The fee semantics (receipted)

On the payment lane the **debtor signs the Order**, so:

```text theme={null}
debtor-cost   = target + 7 bps in the payment token
creditor-net  = target
```

`feeBearer` on the claim is a **pricing term** — who prices the fee into the
deal — never a protocol path. The exact leg construction (the target + 1
atomic-unit dust leg) is receipted against the deployed contract; the spec
pins semantics **and** the receipted leg shape.

## Why `swap-sponsored` answers 501

The `swap-sponsored` payment template is **RESERVED Phase 2**. Requesting it
in Phase 1 answers `501 PHASE_GATED` — the surface's only remaining 501.

The gate it must pass before activation is the **public-bundler receipt
gate**: a sponsored settle receipted END-TO-END through a PUBLIC bundler
(ERC-7562 access rules), not direct-RPC. Direct-RPC sponsorship does not
satisfy the gate — the receipt is the proof, and the proof must come from the
open infrastructure, not a private lane.

This is part of the **SECURED class** posture in the defer list: Phase 2
features ship behind receipts, never behind intentions.

## Custody boundary

Sponsored lanes require a custodial smart wallet in Phase 1 — a settlement
attempt from a non-custodial surface refuses with
`SETTLEMENT_REQUIRES_CUSTODIAL_WALLET`, and the invoice lane's custodial demo
signing path answers `SIGNING_REQUIRES_CUSTODIAL_WALLET` for non-custodial
callers. This is a disclosed **TESTNET-only** posture: the desk console can
sign for the demo wallet; external agents sign their own Orders offline and
bind them.

> [!NOTE]
>
> Custody honesty: `WalletSummary.custody` is one of `server-custodial |
>   simulated | external`. `server-custodial` is the only production path in
> Phase 1; `external` is typed for wire completeness but not verified
> end-to-end.

## Where to next

* The attempt machine the sponsored lane rides on:
  [Settlements](https://docs.skia.money/concepts/settlements.md).
* How the policy boundary is encoded and attested:
  [Attestations](https://docs.skia.money/concepts/attestations.md).
* Smart-account endpoints in the [API Reference](https://docs.skia.money/api-reference/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.