Activate and transact in Freighter without first holding XLM

Aperta
#3,002 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Inizia dalla documentazione di Cavos Reserve e dai dettagli di integrazione riportati in questa issue, quindi esamina come l’estensione Freighter gestisce gli account non finanziati, gli invii classici, gli swap e la firma delle transazioni. La revisione del prodotto dovrebbe stabilire i limiti di fiducia, dell’allowlist e operativi prima dell’implementazione. Il lavoro è completato quando gli utenti idonei possono attivare e transare con un asset accettato, mentre gli utenti XLM finanziati mantengono il comportamento attuale e sendMax viene applicato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

discussion
What problem does your feature solve?

On Stellar, a Freighter user cannot exist or transact until they hold XLM.
Opening an account locks ~1 XLM, each trustline locks 0.5 XLM more, and every operation spends a network fee in XLM. Sending a user to an exchange to buy XLM is a bad UX design.

That cost is small in dollars and large in drop-off:

  • A user who was sent USDC (or another held asset) still cannot claim or spend
    it until they acquire a second asset they were not given.
  • Freighter’s current unfunded state can only say “add XLM” / Friendbot.
  • No on-ramp is designed to sell ~1.5 XLM.

This is not a fee-sponsorship-only problem. Stellar spends XLM as a fee and locks XLM as a reserve. Covering only the fee still leaves the account unable to be created.

What would you like to see?

Let Freighter activate an unfunded account, and later pay classic send/swap fees, using a supported asset the user already holds, without requiring them to acquire XLM first.

Concretely, in the extension:

  1. Unfunded account + inbound claimable in an accepted asset: one
    “Activate with {sendMax} {ASSET}” path. One signature creates the account (starting balance 0), opens the trustline, claims the balance, and pays reserves + the network fee from that asset. The button shows the quoted ceiling, not the waiting balance.
  2. Classic send / swap when spendable XLM is 0: an optional fee-assetpicker for accepted balances. Existing XLM-fee paths stay as they are.
  3. The user always sees sendMax before signing. If the route moves past that ceiling, the transaction fails and nothing is taken. Opt-in and conditional: the token path only appears when Reserve accepts the network and a supported asset is actually available. Funded accounts with enough XLM should look and behave exactly as they do today.
Integration details (for product review)

This would use Cavos Reserve, a hosted Stellar sponsor we operate
(docs, SDK @cavos/reserve).

What it sponsors Base reserves (CAP-33) and the network fee (CAP-15 fee-bump)
How the user pays PathPaymentStrictReceive in the same inner tx: token → exact XLM owed to the sponsor. Rate is the SDEX/pool route, not an oracle
Networks Testnet and mainnet hosted endpoints. No API key required
Accepted assets Allowlisted, liquidity-verified issuers only (XLM, Circle USDC, EURC, PYUSD, USDT0, AQUA, …). A code without its issuer is rejected
Keys Reserve never holds a user key and never adds itself as a signer. It signs only the outer fee-bump. SetOptions / signers / thresholds are not expressible in the request
Wallet check Freighter re-derives the server-built transaction from the request it made and compares XDR before prompting (ops, sponsorship sandwich, fee destination, destAmount, sendMax, path hops)
Scope in this proposal Classic G… accounts. Not Soroban, not dApp signTransaction inference

We maintain the SDK and the service, and we can change either if Freighter needs a different trust, allowlist, or operational boundary.

Happy to join a product review or adjust the integration before any code review of #3001.

Lingua principale
TypeScript
Stelle
122
Fork
62
Merge medio
4g 19h
PR unite (30g)
41

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stellar/freighter

Tutte le issue di stellar/freighter

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.