Background & current state
New users without XLM cannot pay transaction fees, so their very first action (register/claim) fails. Trivela has no fee-sponsorship path; the wallet abstraction (frontend/src/lib/wallet) assumes the user funds their own fees.
Goal
Provide a backend fee-sponsorship service that wraps user transactions in fee-bump transactions (operator pays fees) with strict abuse controls, enabling gasless registration/claim for first-time users.
Technical design
- Endpoint
POST /api/v1/sponsor/fee-bump accepts a signed inner tx; server validates it (only allows Trivela contract ops to known contract IDs), wraps it in a FeeBumpTransaction signed by the sponsor account, and submits.
- Abuse controls: per-IP + per-identity quotas via the existing rate limiter; allowlist of permitted operations; max fee cap; daily budget with a circuit breaker.
- Sponsor account health monitored (NEW-016).
Edge cases
- Inner tx contains non-Trivela ops → reject.
- Quota exceeded → 429 with Retry-After.
- Sponsor budget exhausted → 503 + alert; fall back to user-paid.
- Replay of the same inner tx → dedupe (idempotency, NEW-031).
- Fee spikes → cap + reject above max.
Task breakdown
Acceptance criteria
Testing & verification
- Integration test on testnet with a zero-balance account; quota exhaustion returns 429.
Out of scope
- Account creation/reserve sponsorship (NEW-021).
Dependencies / related
- Pairs with NEW-021, NEW-019 (passkeys), NEW-016, NEW-031.
References
- Stellar fee-bump transactions (CAP-15).
Difficulty: medium · Effort: M · stellar
Background & current state
New users without XLM cannot pay transaction fees, so their very first action (register/claim) fails. Trivela has no fee-sponsorship path; the wallet abstraction (
frontend/src/lib/wallet) assumes the user funds their own fees.Goal
Provide a backend fee-sponsorship service that wraps user transactions in fee-bump transactions (operator pays fees) with strict abuse controls, enabling gasless registration/claim for first-time users.
Technical design
POST /api/v1/sponsor/fee-bumpaccepts a signed inner tx; server validates it (only allows Trivela contract ops to known contract IDs), wraps it in aFeeBumpTransactionsigned by the sponsor account, and submits.Edge cases
Task breakdown
Acceptance criteria
Testing & verification
Out of scope
Dependencies / related
References
Difficulty: medium · Effort: M · stellar