All modules

Phase 1 · Financial primitives · Module 01

DeFi Accounting

Assets, shares, rounding, returns, fees, and reconciliation.

Build: Vault-accounting library Source code

Published notes

5 published
D01

DeFi Accounting From First Principles: Assets, Shares, Profit, and Loss

Deriving the accounting rules behind vault shares, fair deposits, redemptions, and proportional profit and loss.

D02

Fixed-Point Arithmetic and Rounding in DeFi Vaults

Why integer division moves value, how ERC-4626 chooses rounding directions, and how precision and slippage checks protect vault users.

D03

APR, APY, and Time-Based Interest Accrual

From simple and compound interest to a call-independent index that accrues yield without letting user activity choose the compounding schedule.

D04

Vault Fees and High-Water Marks

Management fees, performance fees, dilution-correct share minting, and high-water marks that charge each gain only once.

D05

Reconciliation and Adversarial Accounting

Closing Module 1 by reconciling every asset and share, testing complete operation sequences, and fixing a zero-share vault windfall.