Cashflows & accruals
One accrual formula, reused everywhere a per-period cashflow is shown — forecasts, statements, and settlement history alike.
Per-period accrualCanonical form
accrual = floor(notional × rate × periodSeconds / (secondsPerYear × WAD))
Actual/365used in forecasts, statements, settlementquote/forecast.ts:52
Realized P&L
Summed from on-chain settlement events; direction flips sign depending on who paid whom.
quote/realized.ts
Coverage & blended rate
coverage % = hedged / debtblended fixed rate = notional-weighted mean across swapsquote/position.ts
Daily leg displaySimplified estimate
"Leaves your wallet every settlement" on the positions screen — a simple Actual/365 approximation for readability, not the exact bigint figure the contract actually settles.
fixedLegOut = notional × fixedRate / 365 floatingLegIn = notional × floatingNow / 365
pay-fixed/screens.tsx:819