Xspence
Connecting…
Checking amendment… Sandbox XRPL Devnet · XLS-68

Sponsored Fees & Reserves

Interactive Devnet sandbox for the Sponsor amendment. Create accounts, co-sign or prefund, manage recoveries, with clear guidance, expandable detail, and full transaction JSON.

Ledger: - XLS-68 spec Docs FAQ No real value
How reserves & sponsorship work Read this: ownership vs underwriting

Ownership almost never swaps. The sponsee owns their account and trust lines. The sponsor only temporarily underwrites reserve requirements (and sometimes pays fees). Ending sponsorship does not take objects away. It only says the sponsee must cover that reserve again.

Create Payment + flag

Sponsor sends XRP with tfSponsorCreatedAccount:

  • Sponsee owns the new account (their keys)
  • Sponsee holds the Payment amount in balance
  • Sponsor underwrites the ~1 XRP base reserve via AccountRoot.Sponsor

What “reserve” means

On Devnet roughly: 1 XRP base per account + 0.2 XRP per owned object. That XRP is not a separate vault. It is locked accounting against free balance. Sponsorship changes who the ledger holds responsible for that lock.

Who covers what, when

Layer Sponsor covers when… Sponsor free when… Cash back to sponsor?
Account base Create with flag · AccountRoot.Sponsor set End account (Transfer, no ObjectID; sponsor must set Sponsee) No automatic return of the create Payment
Object reserve TrustSet etc. with spfSponsorReserve · High/LowSponsor End object: sponsee Transfer+ObjectID; sponsor must add Sponsee=owner — or object deleted No 0.2 XRP payment back; obligation moves
Fee pool Prefund locks FeeAmount Delete pool (tfDeleteObject) Yes: leftover FeeAmount refunded
Per-tx fee Cosign / prefund fee for that tx After that tx settles Never: fees are burned

What can return to the sponsor

  • Unused FeeAmount when the fee pool is deleted
  • Sponsee residual only via AccountDelete → sponsor while still account-sponsored
  • Easier free-balance math when Sponsoring* counts drop (not a transfer)

What does not refund

  • Ending account sponsorship (no clawback of create Payment)
  • Ending object sponsorship (no automatic 0.2 XRP payment)
  • Fees already burned
  • Faucet / extra gifts to sponsee (never auto-clean sponsorship)

Tip: after each lab step, use Inspect sponsor / sponsee and check Sponsor, SponsoringAccountCount, SponsoringOwnerCount, and High/LowSponsor on objects.

Four sponsorship layers What can stack · how each ends

XLS-68 is not one switch. A sponsee can stack several independent obligations at once. There are two payment rails (cosign each tx, or prefund once) that can cover fees and/or object reserves, plus a separate account-base relationship set at create time. Each layer is created and torn down with a different tool. Mixing them up is the usual lab failure mode.

Rails (how the sponsor pays or underwrites): Cosign = sponsee + sponsor both sign that tx (Sponsor, SponsorFlags, SponsorSignature). Prefund = sponsor locks budget in a Sponsorship ledger object; later sponsee txs can spend it without the sponsor signing every time (unless require-sign flags are set).

What can be covered on a sponsored tx: spfSponsorFee (burned fee), spfSponsorReserve (who underwrites new object / account reserve), or both on the same tx from the same sponsor. Ownership of the account and objects stays with the sponsee.

Deeper refunds / ownership notes: How reserves & sponsorship work.

1 · Per-tx fee

Cosigned fee (no pool)

Sponsor pays that transaction's fee only. No Sponsorship object is created. Sponsee free balance stays flat for the fee. The fee is burned, never refunded.

  • Create: cosign with spfSponsorFee
  • Ends: when that tx settles (nothing left to clean up)
  • Lab: Co-sign → fee only · Control (self-pay) for contrast
2 · Fee pool

Prefunded FeeAmount

Sponsor locks XRP into a Sponsorship object via SponsorshipSet. Later sponsee txs debit the pool instead of cosigning every fee. Optional cap fields (e.g. MaxFee) bound what the sponsee can burn per use.

  • Create: Prefund (FeeAmount)
  • Ends: Delete fee pool (tfDeleteObject)
  • Refund: yes — leftover FeeAmount returns to sponsor
  • Lab: Prefund → Use fee → Manage Sponsor: delete pool
3 · Object reserve

Owned objects (trust lines, etc.)

Sponsee still owns the object. The sponsor only underwrites the incremental owner reserve (~0.2 XRP on Devnet). Ledger fields: HighSponsor / LowSponsor (or object Sponsor). Not only trust lines: any object that can take spfSponsorReserve (this lab uses TrustSet).

  • Create: cosign fee+reserve, or prefund reserve slots + use
  • Ends: Transfer End + ObjectID (sponsee) or End + ObjectID + Sponsee=owner (sponsor) — or object deleted
  • Refund: no cash clawback — obligation moves back to owner
  • Lab: Co-sign fee+reserve · Prefund slots · Manage Sponsor/Sponsee: End object
4 · Account base

AccountRoot.Sponsor

Set when the sponsor creates the sponsee with tfSponsorCreatedAccount (or later create/reassign flows). Sponsor underwrites the ~1 XRP base reserve. Sponsee keys still own the account; the Payment amount is their balance, not an escrow to reclaim by "End".

  • Create: Setup Accounts / create sponsee
  • Ends: End account (Transfer, no ObjectID) — sponsee as Account, or sponsor with Sponsee set
  • Refund: End alone does not return create Payment
  • Residual: AccountDelete → sponsor while still sponsored
  • Lab: Manage Sponsor/Sponsee: End account (objects can be ended first or after; layers independent)

How they stack in this sandbox

  1. Setup creates layer 4 (account base) for the sponsee.
  2. Co-sign fee only uses layer 1 once per tx.
  3. Co-sign fee + reserve uses layer 1 and layer 3 on the same TrustSet.
  4. Prefund fee + slots opens layer 2 and prepays capacity for more layer 3 objects without per-tx cosign.
  5. End object / delete pool / end account each target one layer. Ending the account does not delete trust lines or refund the fee pool.

Rule of thumb: fees burn or sit in a pool; reserves are underwriting (not a vault). Only leftover FeeAmount auto-refunds on pool delete.

Setup

Create a few test wallets, then run the lab.

Setup help What the buttons do
Tip

Setup Accounts makes three Devnet wallets for you and assigns the roles: Sponsor (pays fees / covers reserves), Sponsee (the user account), and Control (a normal wallet for side-by-side comparison). You can run the lab right after this.

Good to know

The sponsee owns their account and keys. The sponsor is only covering the base reserve cost, not taking ownership. Stopping sponsorship later does not take back the XRP that was sent when the account was created. Clear Accounts only removes wallets from this browser; it does not delete them from Devnet.

Want the deeper picture? How reserves & sponsorship work

Wallets & roles Devnet only

Setup Accounts assigns these three wallets for you. They stay fixed for the lab — use Clear Accounts for a fresh set.

Sponsor

Business wallet. Pays fees and covers reserves.

Wallet
Not set — run Setup Accounts
Balance -
Reserved -
Objects -
Open cover -
Sponsee

User wallet. Can be fee/reserve covered.

Wallet
Not set — run Setup Accounts
Balance -
Reserved -
Objects -
Still covered -
Control

Normal wallet. Self-pay baseline.

Wallet
Not set — run Setup Accounts
Balance -
Reserved -
Objects -

Lab

Work left to right. The submit pipeline shows each phase, its description, and raw tx_json. Full multi-tx demos live under Guide.

Ready

Co-sign

Per-transaction sponsorship. The sponsee authors the tx; the sponsor co-signs once so they can pay the fee and/or underwrite a new object reserve. No standing fee pool is created.

Layer 1 · Fee

Co-sign fee only

Explains: the sponsee submits a small AccountSet. The sponsor co-signs with spfSponsorFee so the sponsor burns the network fee and the sponsee’s free balance stays flat.

  • How it works: dual-sign that one tx only (no Sponsorship SLE)
  • Who pays: sponsor fee is burned
  • Who owns: nothing new is created
  • You should see: sponsee balance flat; sponsor slightly down
  • Does not: create a fee pool or set AccountRoot.Sponsor
Layer 1 + 3

Co-sign fee + reserve

Explains: the sponsee opens a trust line (issuer = Control; currency rotates). The sponsor co-signs with fee + spfSponsorReserve so they underwrite the ~0.2 XRP object reserve while the sponsee still owns the line.

  • How it works: cosign flags both fee and object reserve on TrustSet
  • Who pays: sponsor fee burned; sponsor underwrites reserve
  • Who owns: sponsee owns the trust line
  • You should see: High/LowSponsor set; sponsoring-object count up
  • Does not: move ownership or create a fee pool

FAQ & documentation

Answers from live Devnet testing. Expand a question or jump to official docs.

What does Payment + tfSponsorCreatedAccount actually do?

Three things at once: (1) sponsee owns the new account, (2) sponsee holds the Payment amount, (3) sponsor underwrites the base reserve via AccountRoot.Sponsor. Ownership does not go to the sponsor. A plain gift of XRP without the flag does not set account sponsorship.

Full reserves explainer →
Does ownership move to the sponsor?

No. The sponsee always owns the account and trust lines. Sponsorship only underwrites reserves: account base via AccountRoot.Sponsor, objects via HighSponsor / LowSponsor (~0.2 XRP). Ending sponsorship clears underwriting; ownership stays with the sponsee.

Ownership vs underwriting →
What are the four layers — and are they independent?
  1. Per-tx fee — cosign spfSponsorFee; ends when that tx settles (burned).
  2. Fee pool — prefund FeeAmount; end with tfDeleteObject (leftover refunds).
  3. Object reserve — High/LowSponsor; end with End+ObjectID (owner) or End+ObjectID+Sponsee (sponsor).
  4. Account base — AccountRoot.Sponsor; end with Transfer without ObjectID (sponsor sets Sponsee).

Layers are independent. Deleting the fee pool does not clear account or object sponsors. Ending the account does not clear High/LowSponsor. Cosign never creates a Sponsorship SLE — only Prefund does.

Four layers →
Is anything ever refunded to the sponsor?

Yes: leftover prefund FeeAmount when you delete the fee pool; residual sponsee balance only via AccountDelete → sponsor while still account-sponsored (and account is old enough).

No: ending account or object sponsorship does not claw back XRP, and burned fees are never refunded.

Reserves & refunds table →
How does the sponsor End object sponsorship correctly?

Canonical sponsor shape: SponsorshipTransfer with tfSponsorshipEnd, ObjectID, and Sponsee = the object owner. rippled resolves ownership as Sponsee ?? Account — omit Sponsee and you get tecNO_PERMISSION.

The sponsee can End with ObjectID only. This sandbox’s Manage · Sponsor button uses the shaped path automatically.