IDL: target/idl/keystone_finance.json — regenerated to match latest source
TS types: target/types/keystone_finance.ts — derived from the IDL
Initialize the devnet vault
Creates the vault PDA at seeds [b"vault"]
Generates a fresh ksUSD mint keypair
Calls initialize with default risk parameters:
10% liquidity buffer
+2% / −12% funding thresholds
20% perf fee · 5% reserve skim
$1M deposit cap
Round-trip test
Exercises the user flow end-to-end against the deployed vault:
Verifies the vault exists; mints test USDC to the wallet if the wallet holds USDC mint authority.
deposit — USDC in, ksUSD out at $1.00 share price on first deposit.
withdraw_instant — partial redemption from the liquidity buffer.
request_withdrawal + process_withdrawal — queued path; verifies the request PDA is closed and rent refunded.
Strategy paths (open_position, open_reverse, settle) are not exercised here — they require Drift devnet account scaffolding. Covered by the keeper bot: Keeper bot.