Skip to content

Migrate to the velocity program (Anchor 1.0)#78

Open
jordy25519 wants to merge 1 commit into
masterfrom
chore/migrate-to-velocity
Open

Migrate to the velocity program (Anchor 1.0)#78
jordy25519 wants to merge 1 commit into
masterfrom
chore/migrate-to-velocity

Conversation

@jordy25519

Copy link
Copy Markdown
Contributor

Why

This repo was built against the old drift program (protocol-v2, Anchor 0.29, Solana 1.16). Drift was renamed/restructured into velocity (Anchor 1.0, Solana 3, program vELoC1…), so nothing here builds or targets the live program anymore. This migrates the on-chain program and the TS SDK onto velocity.

Note: the program and clients are also being absorbed into the velocity-v1 monorepo (velocity-exchange/velocity-v1#208), which is now the source of truth for the JIT clients. This PR brings the standalone repo current; once the monorepo absorption lands it can be archived.

Approach

The program depends on velocity by git rev (same pattern as the old drift dep) and the instruction interface — program id J1TnP8z…, discriminators, account layouts — is unchanged, so the vendored TS IDL stays valid. The Anchor 0.29 → 1.0 jump is the bulk of the program diff: Context collapses to a single lifetime and CpiContext::new now takes the program id (not its AccountInfo). Velocity also moved amm.min_order_size to market_stats and flattened order_tick_size onto the market.

The TS SDK becomes @velocity-exchange/jit-proxy on @velocity-exchange/sdk + Anchor 1.0, mirroring the vendored copy in the monorepo (drops the perp amm.minOrderSize dust guard velocity removed, and the removed quoteAssetAmount on the synthetic order).

Notes

  • Spot JIT is removed — velocity has no spot order matching (place_and_make_spot_order is gone); spot takers return SpotOrdersNotSupported.
  • The Python SDK is deleted — it depended on upstream driftpy (drift program id, PDA seeds, account layouts) and there is no velocity equivalent.
  • Dropped two workflows: the python-only release.yml, and on-sdk-update.yml (auto-republished on @drift-labs/sdk updates and would collide with the monorepo publishing @velocity-exchange/jit-proxy). The verifiable-build in main.yml is bumped to velocity's toolchain image.

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.

1 participant