Protocol

Pool, NAV & tranches

totalAssets = freeUsdc
            + Σ tokenBalance_i × mid_i              // marked inventory
            + max(hedgeEquityUsdE6, 0)              // last reported HL account value
sharePriceE18 = 1e18 × totalAssets / totalSupply    // 1e18 when supply is 0

tLP is an ERC-4626-style share with OpenZeppelin's virtual-offset protection (_decimalsOffset = 12, so 1 USDC ≈ 1e18 shares at genesis). Deposits and withdrawals:

  • deposit(assets) — USDC in, shares = previewDeposit(assets).
  • depositToken(token, amount) — in-kind deposit of any market token (WHYPE, UBTC, UETH, USOL, PURR), valued at mid × (1 − baseSpread) so depositors pay the same half-spread a seller would.
  • withdraw(assets) / redeem(shares) — USDC out, bounded by maxWithdraw(owner) = min(ownerAssets, freeUsdc). If much of NAV sits in inventory or HL margin, you may need to withdraw in pieces while the hedger recycles capital.

The pool page estimates APR from recent Swap events: LP share of spread revenue over the sampled window ÷ NAV × 365 / days. It is a backward-looking approximation and ignores funding paid or earned on the hedge.

Senior / junior tranches

TangentTranche holds tLP on behalf of two ERC-20 claims, tSR (Tangent Senior) and tJR (Tangent Junior), both 18 decimals. All accounting is in USD E6 via pool.convertToAssets(tLP balance):

totalValue        = pool.convertToAssets(pool.balanceOf(tranche))
seniorEntitlement += seniorEntitlement × seniorRateBps × dt / (365 days × 1e4)   // on every state change
seniorValue       = min(seniorEntitlement, totalValue)
juniorValue       = totalValue − seniorValue
sharePrice        = value / supply                                                 // 1e18 when supply is 0
  • Senior gets its target rate first. The entitlement accrues linearly at seniorRateBps (default 800 = 8% APR, max 30%); senior deposits add principal, senior withdrawals subtract pro-rata.
  • Junior takes the rest and absorbs the first losses. If pool NAV falls, junior value shrinks before senior is touched; if NAV outperforms the senior rate, junior keeps the excess.
  • Buffer rule. After any senior deposit or junior withdrawal juniorValue × 1e4 / totalValue must stay ≥ minJuniorBps (default 2000 = 20%), otherwise the call reverts JuniorTooThin(juniorBpsAfter, minJuniorBps).
  • Flows. depositSenior/Junior(assets, receiver) pull USDC, deposit into the pool and mint assets × supply / value shares (floor). withdrawSenior/Junior(shares, receiver) pay shares × value / supply USDC by redeeming tLP; they revert InsufficientLiquidity when the pool has no free USDC — the same bound as maxWithdraw.

The Pool page shows LP (tLP), Senior and Junior tabs with share prices, the senior target APR, the junior buffer versus its minimum and your balances; /api/tranche and the MCP tranche / tranche_calldata tools expose the same data. The tabs are hidden on chains where TangentTranche is not deployed.

Fees & treasury

  • No deposit or withdrawal fees. The only revenue is the spread.
  • protocolShareBps (default 2000 = 20%) of every spread is credited to protocolFeesAccrued inside the pool and excluded from NAV.
  • Anyone may call claimProtocolFees() to send the accrued USDC to TangentTreasury. The treasury address and its USDC balance are shown on the Transparency page and returned by /api/pool.
  • The remaining 80% of every spread stays in the pool for LPs.