Repository navigation
fix(solana-relay): require close authority on claimable token account creation - #100
Merged
Merged
Conversation
… creation Only relay Claimable Tokens user bank creations when the same transaction sets the user bank's close authority to the program's rent destination via a SetAuthority instruction signed by the user bank's owner. Reject any other SetAuthority and the program's Close instruction. Requires @audius/spl with Claimable Tokens SetAuthority support. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picks up the Claimable Tokens SetAuthority support required by the close authority check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rickyrombo
force-pushed
the
fix/relay-strict-userbank-close-authority
branch
from
September 24, 2026 19:10
c75c7af to
79ce853
Compare
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.
Summary
The relay now fee-pays a Claimable Tokens user bank creation only if the same transaction, after the create, contains:
SetAuthoritywhose signed data sets the close authority of that user bank to the program's rent destination (2HYDf9XvHRKhquxK1z4ETJ8ywueZcqEazyFZdRfLqGcT).Once the close authority is set, only the rent destination can close the account or change the close authority. This holds even after an ownership transfer, so rent the relay pays can't be reclaimed by anyone else.
Also:
SetAuthority(e.g. ownership transfers) is rejected.Closeis rejected, as it effectively was before (the old decoder threw).InvalidRelayInstructionError.All decoding goes through
@audius/spl.@audius/spl2.2.0 (from fix(sdk): set user bank close authority on creation apps#14607), which adds Claimable TokensSetAuthoritysupport. The other workspaces stay on 2.1.0.CloseAccountsigned by the rent destination; the program'sCloseinstruction will fail for them. The cleanup job needs updating.Test plan
vitest: 65 passing. New cases cover:SetAuthoritywithout a preceding secp256k1 instructionSetAuthorityClosenpm run lint(tsc + eslint)@audius/spl2.2.0🤖 Generated with Claude Code