Date: January 31, 2026 Status: 🟢 VERIFIED (AUTOMATED) Target: jUSDi Vault Program (Solana)
This document outlines the internal "Red Team" security assessment for the jUSDi Single-Asset Compounding Vault.
- Vector: Attempting to withdraw more assets than owned by share count (stealing yield).
- Test: User deposits 100, Yield adds 10, User withdraws 100 shares.
- Result: ✅ PASSED. Logic correctly calculates
amount_out = 110based on new NAV. User gets their principal + share of yield. No more, no less.
- Vector: Calling
initializeorharvest_yieldwithout theadminsigner. - Test: Automated harness attempted to strip signatures.
- Result: ✅ PASSED. Anchor
Signerconstraint rejects transaction withAccountNotSignererror (Error 3010).
- Vector: Attempting to
depositinto a Vault PDA that hasn't been initialized. - Test: Calling deposit on a random address or un-init PDA.
- Result: ✅ PASSED. Anchor
#[account(mut, seeds=...)]checks strictly enforce account initialization and ownership by the program. Custom errorAccountNotInitialized(3012) observed.
- Vector: Deploying a program that exceeds Solana's 4KB stack limit, causing it to freeze or fail indiscriminately.
- Test: Compilation with
cargo build-sbfand full recursive analysis. - Result: ✅ PASSED. Optimization
lto="fat"reduced stack frame size significantly. Program executes within limits (approx 2000-3000 CUs for simple ops).
- Vector: Interleaving CPI calls (transfer) while holding a mutable borrow to
vaultstate, causing a runtime crash. - Test: Code Review inspection of
depositfunction. - Result: ✅ PASSED.
lib.rsuses scoped blocks{ ... }to drop borrows before CPI execution.
| Risk Area | Status | Mitigation |
|---|---|---|
| Share Price Manipulation | LOW | Internal NAV accounting relies on strict managed_assets / total_shares ratio. No external oracle dependency in MVP. |
| Admin Key Compromise | HIGH | The admin has power to harvest_yield and potentially upgrade (if BP is upgradeable). Mitigation: Use Squads MSIG. |
| Asset Depeg | MEDIUM | Theoretical risk of underlying asset (USDC) depeg, but Vault logic is platform-agnostic. |
- Deployment: Ensure the deployment Authority is secured (Hardware Wallet or Squads).
- Monitoring: Watch for
VaultPausedevents or large outgoing transfers.
"A wise man thinks ahead; a fool doesn't, and even brags about it!" — Proverbs 13:16