Deposit Flow

How a USDC deposit flows through the Harmonix protocol

── shared contracts ── USER USDC Depositor ASSET VAULT USDC AssetVault asset = USDC (6 decimals) SHARED · FUND VAULT FundVault holds all idle assets SHARED · ERC-20 ShareToken shared across all asset vaults ① deposit(assets, receiver) ② USDC safeTransferFrom ③ mint(receiver, shares) ③ shares to receiver 1 2 3
User function call
Asset transfer (USDC tokens)
Share transfer / mint (ShareToken)
Step Action Effect
User calls AssetVault.deposit(assets, receiver) Entry point
USDC transferred from user directly to FundVault balanceOf(fundVault) ↑
ShareToken.mint(receiver, shares) — shares sent to receiver totalSupply ↑

PPS remains stable — NAV and effective supply both grow proportionally.

Numeric Examples

shares minted = deposit ÷ PPS  |  PPS = effNAV ÷ effectiveSupply

Scenario PPS before totalSupply before Deposit (USDC) Shares minted balanceOf(FundVault) after totalSupply after PPS after
Genesis deposit
first ever deposit, PPS starts at 1.0
1.000 0 1,000 1,000 1,000 1,000 1.000 ✓
Second deposit
no yield yet, PPS = 1.0
1.000 1,000 500 500 1,500 1,500 1.000 ✓
Deposit after yield
strategy earned, PPS = 1.2
1.200 1,000 600 500 1,800 (+600 idle) 1,500 1.200 ✓
Deposit after loss
strategy lost value, PPS = 0.8
0.800 1,000 400 500 1,200 (+400 idle) 1,500 0.800 ✓
Key insight: A deposit never changes PPS. The new USDC increases balanceOf(fundVault) (NAV ↑) and the minted shares increase totalSupply (supply ↑) by the exact same proportion. In row 3: NAV goes from 1,200 → 1,800 (+50%), supply goes from 1,000 → 1,500 (+50%) — ratio unchanged.