vault-accounting-engine
Off-chain accounting reconciliation engine for ERC-4626 vault share pricing.
📄 Product Preview
Try the interactive reader and demo tools below, or get the full product with all content unlocked.
📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample📁 File Structure 21 files
📖 Documentation Preview README excerpt
vault-accounting-engine
Off-chain accounting reconciliation engine for ERC-4626 vault share pricing.
Price: $12.99 | Store: vault-forge | Product #9
Overview
vault-accounting-engine is a Python tool that independently verifies vault share pricing by comparing on-chain state against calculated expected values. It detects accounting anomalies — share price deviations, incorrect fee accrual, unexpected TVL changes — before they become exploitable.
Why You Need This
Vault share price bugs are the #1 cause of DeFi exploits. A share price manipulation (inflation attack, rounding error, fee miscalculation) can drain a vault in a single transaction. Off-chain reconciliation catches these issues early.
Features
| Feature | Description |
|---|---|
| Share price reconciliation | Compares on-chain share price vs independently calculated value |
| Fee accrual validation | Verifies management + performance fee shares match expected amounts |
| Invariant checking | Validates 7 vault invariants (positive supply, fee caps, etc.) |
| Time-series snapshots | Stores periodic vault state for trend analysis |
| Anomaly detection | Configurable thresholds with severity classification |
| Multi-format reports | CSV, JSON, and HTML (dark themed) audit reports |
| Continuous monitoring | Long-running monitor with configurable check interval |
Anomaly Severity Levels
| Severity | Description | Example |
|---|---|---|
| LOW | Informational | Minor rounding differences |
| MEDIUM | Investigate | TVL changed > 10%, fee deviation > 0.1% |
| HIGH | Action needed | Share price decreased, fee exceeds cap |
| CRITICAL | Emergency | Negative totalAssets, zero share price with supply |
Installation
# Install from source
pip install -e .
# Or install dependencies manually
pip install click web3 pandas rich pyyaml jinja2 python-dotenv
Prerequisites
- Python 3.10+
- An RPC endpoint (Alchemy, Infura, or self-hosted)
Quick Start
1. Configure
... continues with setup instructions, usage examples, and more.