Aiken smart contracts for the Top 5 Index (whitepaper §5 and §9). Testnet only: not audited, holds no real money.
| Validator | What it does |
|---|---|
index (mint + spend) |
The vault and the share token in one script, so the share token’s policy ID is the vault’s own hash. Init creates the vault once from a seed UTxO. Shares are minted or burned only while the vault is spent, at a fair price: depositing mints at most ADA added × shares ÷ ADA in vault, and redeeming takes at most shares burned × ADA in vault ÷ shares. Rounding always favors the vault. ADA may flow in without new shares (staking rewards). |
request |
Deposit and redemption requests. Any batcher can fill one, but only in the same transaction as a vault settlement and only by paying the owner at least min_out. Each payment is tagged with its request, so one payment can’t fill two requests. The owner can cancel at any time. |
Escape hatch: settling the vault needs no one’s permission. If every batcher stops, a user can burn shares and take their part of the vault directly.
The basket assets, price sources and pause, staking delegation, and the off-chain code are not built yet. See docs/contracts-plan.md.
aiken check # 22 tests
aiken build # writes plutus.json