drift-labs / protocol-v2
On-chain perpetuals dex with multiple liquidity mechanisms
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing drift-labs/protocol-v2 in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewDrift Protocol v2 Drift Protocol v2 This repository provides open source access to Drift V2's Typescript SDK, Solana Programs, and more. Integrating Drift? Go here SDK Guide SDK docs can be found here Example Bot Implementations Example bots (makers, liquidators, fillers, etc) can be found here Building Locally Note: If you are running the build on an Apple computer with an M1 chip, please set the default rust toolchain to Compiling Programs Running Rust Test Running Javascript Tests Development (with devcontainer) We've provided a devcontainer to help you spin up a dev environment with the correct versions of Rust, Solana, and Anchor for program development. Build the container and tag it : Open a shell to the container: Alternatively use an extension provided by your IDE to make use of the dev container. For example on vscode/cursor: Use the dev container as you would a local build environment: Bug Bounty Information about the Bug Bounty can be found here