Skip to content

feat(buy-sol) PR 6: document native SOL buys for solvers and colocated drivers - #4994

Closed
squadgazzz wants to merge 1 commit into
solana-driver/be-330-settle-native-sol-buysfrom
solana-driver/document-native-sol-buys-for-solvers
Closed

squadgazzz wants to merge 1 commit into
solana-driver/be-330-settle-native-sol-buysfrom
solana-driver/document-native-sol-buys-for-solvers

Conversation

@squadgazzz

Copy link
Copy Markdown
Contributor

Description

Stacked on #4986.

Colocated drivers and external solvers learn the wire contract from the driver's openapi.yml and the solver DTOs, and neither covers native SOL buys. The openapi still describes buyTokenAccount as a token account the settlement never creates. For a native buy, buyToken is the System Program ID and buyTokenAccount is a wallet, which the payout creates when it's missing.

Solvers see a native buy as a wSOL buy into the taker's wSOL ATA (#4985). The route has to leave that ATA open, because the settlement closes it after the swap to unwrap the payouts (#4986). A route that unwraps on its own, like Jupiter with wrapAndUnwrapSol: true, closes the ATA first, and then the settlement's CloseAccount reverts. Our Jupiter solver sets wrap_and_unwrap_sol: false, so only external solvers can trip over this.

#4982 rewrites the same buyTokenAccount description, so whichever PR lands second gets one small conflict.

Changes

  • The driver's openapi describes native SOL buys in buyToken and buyTokenAccount
  • The buyDestination docs in both solver DTOs name the wSOL ATA and require the route to leave it open

How to test

Doc change only.

@github-actions

Copy link
Copy Markdown

Reminder: Please consider backward compatibility when modifying the API specification.
If breaking changes are unavoidable, ensure:

  • You explicitly pointed out breaking changes.
  • You communicate the changes to affected teams (at least Frontend team and SAFE team).
  • You provide proper versioning and migration mechanisms.

Caused by:

@squadgazzz squadgazzz closed this Sep 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2026
@squadgazzz
squadgazzz deleted the solana-driver/document-native-sol-buys-for-solvers branch September 29, 2026 11:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant