Skip to content

chore: Document allowance semantics in SEP-41#1918

Open
aristidesstaffieri wants to merge 3 commits intomasterfrom
chore/document-allowances-sep41
Open

chore: Document allowance semantics in SEP-41#1918
aristidesstaffieri wants to merge 3 commits intomasterfrom
chore/document-allowances-sep41

Conversation

@aristidesstaffieri
Copy link
Copy Markdown

The interface/spec specifies allowance-related functions (approve, transfer_from, burn_from, allowance) but does not describe how allowances behave, leaving implementers to infer the rules from the Stellar Asset Contract(or not). This adds an "Allowances" section under the specification that codifies those rules explicitly: per-(from, spender) independence, approve overwriting (not incrementing) the existing allowance, transfer_from/burn_from consuming the allowance, expiration behavior, and the relationship between allowance and balance.

  The interface specifies allowance-related functions (approve,
  transfer_from, burn_from, allowance) but does not describe how
  allowances behave, leaving implementers to infer the rules from the
  Stellar Asset Contract. This adds an "Allowances" section under the
  specification that codifies those rules explicitly: per-(from, spender)
  independence, approve overwriting (not incrementing) the existing
  allowance, transfer_from/burn_from consuming the allowance, expiration
  behavior, and the relationship between allowance and balance.
@aristidesstaffieri aristidesstaffieri self-assigned this Apr 28, 2026
Copilot AI review requested due to automatic review settings April 28, 2026 21:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates SEP-41 (Soroban Token Interface) to explicitly specify the semantics of token allowances (approve/allowance/transfer_from/burn_from), reducing ambiguity for implementers and aligning expectations across implementations.

Changes:

  • Bump SEP-41 metadata to Updated: 2026-04-28 and Version 0.4.2.
  • Add a new Allowances section defining allowance independence, overwrite behavior, consumption rules, expiration semantics, and balance interaction.
  • Extend the changelog with a v0.4.2 entry describing the allowance documentation update.

Comment thread ecosystem/sep-0041.md Outdated
aristidesstaffieri and others added 2 commits April 28, 2026 15:57
Pre-existing line-wrap issue blocking CI on this branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CAP-46-6 specifies the interface and a couple of behaviors (live_until_ledger
expiration semantics, events), but several allowance rules in this section
(overwrite-not-increment, independence per (from, spender), no reset-to-0
requirement, atomic failure of transfer_from, balance interaction) are not
specified there. Reword so SEP-41 is the normative source for these rules,
with CAP-46-6 cited as the matching reference implementation.

Addresses Copilot review on PR #1918.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants