velocity-position

Installation
SKILL.md

Velocity position

Return a deployment-specific Velocity position assessment. Official migration guidance says the original Drift program is paused; Velocity has a new program, new account layouts and no transferred onchain state. A legacy Drift address is not a Velocity balance.

Verify program and source generation

Collect cluster, RPC, public owner/subaccount and market. Resolve the current Velocity program ID and SDK version from official deployment/source records, then verify the onchain account owner. Use @velocity-exchange/sdk with its matching account layout. Do not decode a Velocity account with archived Drift types because a discriminator happens to match.

If the user supplied a Drift account, identify its original program and observed legacy state first. Report migration as unresolved unless actual new-program account evidence exists. Do not describe a program rename as automatic asset migration or create new funded accounts as setup.

Read fresh subscriptions and risk

Use the existing read client or version-matched account decoding in reads. SDK subscribe() can return false; check it explicitly. Record slot, market/oracle freshness and subscription health, then read positions, collateral, orders and margin with official SDK math. A connected RPC with a failed subscription is not current market evidence.

Keep BN integer precision for quote, base, price and funding calculations; convert only for display. Separate oracle price, vAMM bid/ask and order-book depth. Evaluate stale oracle, open-order margin, funding, liquidation and reduce-only behavior under the deployed program's actual limits.

Return and reconcile

An unsigned plan names program, subaccount, market index, side, base amount, limit, reduce-only flag, fees and margin before/after. SDK methods such as placePerpOrder send transactions; do not invoke them as read checks. Current delegate/Swift permissions must be inspected rather than assumed harmless.

Installs
3
GitHub Stars
11
First Seen
Oct 31, 2026