jagnani73P.03
[the record]STATUS: NTU SINGAPORE - MSC BLOCKCHAIN

Trident

MULTI-STRATEGY VAULT · SOLANA · 2026
a USDC vault on Solana that moves capital between lending, spread trades and basis capture, every thirty seconds
fig. 1: the SOL/ETH ratio, z-scored against a 2880-point windowz +1.20 · HOLD
±2σ · open the pairs trade±0.5σ · close it back out
01THE PROBLEMa lending-only vault is barely a vault

Drift's USDC pool pays six to eight percent, which is about the ceiling for anything a passive vault can safely promise. Reach past it and you inherit the opposite problem: basis bleeds the moment funding flips, and a pure spread book is far too violent to hand passive capital.

Trident composes three uncorrelated sources behind a single LP share. Lending is the floor, so capital is never sitting idle. A statistical pairs trade opens when the SOL/ETH or BTC/ETH oracle ratio sits two standard deviations off its rolling mean, on the bet that it converges back. Basis capture takes the paying side when funding runs past fifteen percent annualized. An off-chain bot re-scores all three on every tick and shifts the book between them. Built solo in one nineteen-hour session; the vault is live on Solana mainnet and was never funded.

02THE ARCHITECTUREfive stages, one tick

Every thirty seconds, one process walks five stages. Drift on-chain state becomes immutable snapshots, risk holds a veto over everything downstream, the allocator is a pure function that only proposes, and nothing but the executor is allowed to touch Voltr, the vault program the whole thing is deployed inside.

01

COLLECT

funding rates and oracle prices for three perps, snapshotted every tick

Drift SDK · BulkAccountLoader · Postgres

02

DETECT

z-score the pair ratio against a 2880-point window; annualize funding

SpreadDetector · FundingMonitor

03

GATE

drawdown, stop-loss, position age and allocation caps, with a veto

RiskManager

04

ALLOCATE

signals and risk into typed proposals; touches no chain

CapitalAllocator

05

EXECUTE

proposals into perp orders and vault strategy deposits

VersionedTransaction · Voltr SDK

STACK: TypeScript · Python · Solana · Drift · Voltr · PostgreSQL · Drizzle · Next.js
03THE HARD PARTthe plumbing nobody sees

Composing the strategies was the easy half. What actually took the day sat underneath: an adaptor interface with no documentation, an SDK that would not load, and a bot that had to be stopped from spending money it did not have. All of it runs behind DRY_RUN:

01

accounts nobody documents

depositing through the vault means handing the adaptor eight accounts in an exact order, several of them PDAs derived by hand from seed strings and little-endian byte widths; get one wrong and it fails on-chain with nothing useful in the log

02

tokens live at the PDA

Drift keeps spot-market tokens directly at the vault authority instead of an associated token account, so the ATA slot takes the authority itself; nothing says so anywhere, it had to be found by failing

03

an SDK that would not load

the Drift SDK pulls a gRPC binding with no Windows binary, so a require hook intercepts the resolve and hands back a stub; safe only because BulkAccountLoader polls over HTTP and the gRPC path is never taken

04

two gates, not one

execution is gated by capability rather than a single flag, so an unfunded Drift account cannot burn SOL on doomed transactions while vault operations stay separately blocked

05

degrade, do not fail

the dashboard reads a database snapshot first and overlays live vault and Drift data only when they answer, and says on screen when what you are looking at is cached

04BY THE NUMBERSdeployed, never funded
19

hours, first commit to last

3

strategies behind one LP share

2880

point window: 24 hours at a 30-second tick

8

accounts, in exact order, or the deposit fails

05IN THE WILDplates 01–04 · the manager's view, on seeded data
// @drift-labs/sdk pulls @triton-one/yellowstone-grpc, which ships no
// Windows binary. We never use gRPC: BulkAccountLoader polls over HTTP.
Module._resolveFilename = function (request, parent, isMain, options) {
    if (request.includes("yellowstone-grpc-napi")) {
        return __filename; // resolve to this stub file
    }
    return originalResolveFilename.call(this, request, parent, isMain, options);
};