chore: Document allowance semantics in SEP-41#1918
Open
aristidesstaffieri wants to merge 3 commits intomasterfrom
Open
chore: Document allowance semantics in SEP-41#1918aristidesstaffieri wants to merge 3 commits intomasterfrom
aristidesstaffieri wants to merge 3 commits intomasterfrom
Conversation
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.
Contributor
There was a problem hiding this comment.
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-28andVersion 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.2entry describing the allowance documentation update.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.