Skip to content

fix(oc): match the Coinbase stable swapper upgrade - #1439

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/coinbase-stable-swapper-upgrade
Sep 10, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/coinbase-stable-swapper-upgrade

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Client side of code-payments/ocp-server#257. The stable swapper program dropped its address whitelist and moved to role-based authorities (coinbase/stable-swapper#20), which changes both the swap instruction and the pool account layout the app reads.

Swap instruction

The whitelist account after user is gone, so the instruction now carries 15 accounts. The address_whitelist PDA derivation and its tests go with it. All four client-built swaps share CoinbaseStableSwapperProgram_Swap, so the stateful swap, stateless sweep, USDC to USDF onramp, and USDF deposit all pick this up.

Pool account

operations_authority was replaced by pause, unpause, treasury and configure authorities. That pushes fee_recipient from byte 72 to byte 136. The onramp reads this field from chain to pick the fee recipient for USDC to USDF and USDF deposit transactions, and at the old offset it now reads treasury_authority. The parser reads the new layout, checks the account discriminator, and is covered by the same mainnet fixture ocp-server uses: pool CrDL9SoCyW1tBgn8k7rgGSpWhnszneWDbvKvqPAU4PL9 after the 2026-09-08 MigrateAuthorities instruction.

Compute unit limits

Unchanged here. The server-driven swaps take the limit from server parameters, and the client-built transactions already set 200_000.

The stable swapper program dropped its address whitelist and moved to
role-based authorities (coinbase/stable-swapper#20). The server side
landed in code-payments/ocp-server#257; this brings the client's
instruction and account parsing in line.

Swap instruction: the `whitelist` account after `user` is gone, so the
instruction now carries 15 accounts. The `address_whitelist` PDA
derivation and its tests go with it. Every client-built swap (stateful,
stateless sweep, USDC->USDF onramp, USDF deposit) used the same
`CoinbaseStableSwapperProgram_Swap`, so all four pick this up.

Pool account: `operations_authority` was replaced by `pause`, `unpause`,
`treasury` and `configure` authorities, which pushes `fee_recipient`
from byte 72 to byte 136. The onramp reads this field from chain to
pick the fee recipient for USDC->USDF and USDF deposit transactions;
at the old offset it would read `treasury_authority` instead. The
parser now checks the account discriminator and is covered by the same
mainnet fixture ocp-server uses (pool
CrDL9SoCyW1tBgn8k7rgGSpWhnszneWDbvKvqPAU4PL9 after the 2026-09-08
MigrateAuthorities instruction).

Compute unit limits are unchanged here: the server-driven swaps take
the limit from server parameters, and the client-built transactions
already set 200_000.
@bmc08gt bmc08gt self-assigned this Sep 9, 2026
@github-actions github-actions Bot added type: fix Bug fix area: crypto Solana, keys, encryption, signing area: network gRPC, connectivity, API, exchange rates and removed type: fix Bug fix labels Sep 9, 2026
@bmc08gt
bmc08gt merged commit 7f75c0d into code/cash Sep 10, 2026
3 checks passed
bmc08gt added a commit that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: crypto Solana, keys, encryption, signing area: network gRPC, connectivity, API, exchange rates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant