How Stak works
A launchpad for index funds of tokenized equities. This page is the short version; the contracts in packages/contracts are the long one.
Overview
An index on Stak is an ERC-20 whose supply is backed by a basket of tokenized stocks held in a fund contract. Buying a share buys a proportional slice of every constituent in one transaction; redeeming sells that slice back into USDG.
Anyone can launch one. There is no application, no allowlist and no token gate — the only requirement is enough seed capital to open the positions.
Architecture
IndexFundFactory
Deploys funds as EIP-1167 clones with CREATE2, so launch cost stays flat and the fund address is known before it exists. Also the protocol's configuration hub: fee schedule, asset and router allow-lists, pause switch and the quote signer.
IndexFund
Holds the basket, mints and burns shares, tracks each holder's cost basis and enforces the redemption cooldown. Shares are 6-decimal, matching USDG, so one share is worth one dollar of NAV at inception.
Quote signer
Prices the basket, builds the router calldata and computes mint and burn amounts off-chain, then authorises the result with an EIP-712 signature that expires within a few blocks. The chain enforces authorisation and the accounting invariants.
Indexer
Reads fund events into a read model so listing, sorting and charting thousands of funds never fans out into RPC calls. NAV is snapshotted daily; every performance number on the site is derived from that series.
Fund lifecycle
- Launch. The manager signs an initial deposit. The factory clones a fund, forwards the seed capital, buys the opening basket and mints the founding position — atomically.
- Deposits. Investors buy at live NAV. The ticket is split across the basket by target weight, so existing holders are never diluted.
- Rebalancing. The manager can trade the fund back onto its targets at any time. With a cadence configured, a protocol keeper may also do it once the interval elapses — which is what makes a scheduled index actually track its policy.
- Redemption. Holders burn shares and receive USDG. The performance fee applies only to realised profit above their cost basis.
- Closing. The manager can liquidate the basket into USDG. Holders then have a 180-day grace period to redeem with no swaps at all.
Fees
Every ceiling above is a constant in IndexFundFactory. The protocol owner can lower the protocol's own share but can never raise a fund past those limits.
Security
- Allow-lists Baskets may only hold curated tokenized equities, and funds may only call allow-listed routers.
- Slippage floors Every routed leg carries a
minAmountOutthe contract checks against the realised output. - Replay protection Signed quotes consume a protocol-wide nonce and expire within a few blocks.
- Stale-quote guard Deposits are pinned to the basket nonce, so a rebalance invalidates any in-flight order rather than executing it against stale routing.
- No trapped capital Redemptions stay open while the protocol is paused, and failed payouts are booked as claimable credit instead of reverting the whole action.
- Trust assumption Pricing and routing are produced off-chain by the protocol signer. A compromised signer could route trades poorly within the slippage bounds; it cannot mint shares to itself or move the basket out of the fund.
$STAK
A share of every launch fee, deposit fee and swap fee is routed to the burner contract, which buys $STAK on the open market and burns it. Protocol revenue is therefore a function of volume, and supply only ever shrinks.
The token is not required to use the protocol. There is no gating, staking requirement or fee discount tied to holding it.