Back to Documentation

On-Chain ETF Guide

Create decentralized index funds backed by a basket of crypto assets. Each ETF is a standard ERC-20 token whose value is derived from the underlying assets held in the smart contract vault.

How It Works

A Magneta ETF follows four stages: creation, bootstrapping, live trading, and optional rebalancing. The diagram below shows the full lifecycle.

ETF Lifecycle — from creation to redemption

What Is an On-Chain ETF?

A traditional ETF (Exchange-Traded Fund) is a fund that holds a basket of assets — stocks, bonds, commodities — and issues shares that represent a proportional claim on those assets. A Magneta on-chain ETF works the same way, but entirely on the blockchain.

Example

You create an ETF called "Magneta Blue Chip" with 50% BTC, 30% ETH, and 20% SOL. When someone mints 100 tokens of your ETF, they deposit the proportional amount of BTC, ETH, and SOL into the vault. When they redeem, they burn their ETF tokens and receive their share of the underlying assets back.

Creating an ETF — Step by Step

1

Configure Basic Info

Choose a name, symbol (3-10 uppercase characters), decimals (recommended: 18 for EVM, 9 for Solana), and total supply for your ETF token.

2

Select Your Basket

Pick 2 to 20 crypto assets and assign a target weight (in %) to each. Weights must total exactly 100%. Available assets include BTC, ETH, SOL, AVAX, LINK, UNI, and more.

3

Choose Bootstrap Mode

Decide how the ETF gets its initial capital: you fund it yourself (Creator mode) or let the first buyer fund it (Community mode). See below for details.

4

Set Lifecycle Options

Configure rugpull protection (lock duration), rebalancing frequency (manual, weekly, monthly), and whether the ETF can be closed.

5

Select Chains & Pay Fee

Deploy on one or more of our 30+ supported blockchains. The first chain is included in the $2,000 creation fee; additional chains have a per-chain cost.

Bootstrap Modes

Creator Funds

You deposit the underlying assets before anyone else can mint. This proves you have skin in the game and builds trust. You receive the full initial supply of ETF tokens.

Best for:

Fund managers, DAOs, and projects that want to demonstrate commitment.

Community Mint

No initial deposit required from you. The first buyer deposits the proportional assets to bootstrap the vault and receives the initial supply. Anyone can be the first minter.

Best for:

Community-driven funds, meme index funds, and decentralized strategies.

Minting & Redeeming

Once the ETF is bootstrapped, anyone can mint new tokens or redeem existing ones against the vault.

Mint (Buy In)

Deposit the proportional amount of each underlying asset into the vault. You receive newly minted ETF tokens in return. The required amounts scale with the current vault composition and total supply.

Redeem (Cash Out)

Burn your ETF tokens and receive your proportional share of the underlying assets from the vault. The vault keeps any rounding dust to prevent being underfunded.

Rebalancing

Over time, market movements cause the actual asset proportions to drift from the target weights. Rebalancing updates the target weights on-chain. The actual portfolio rebalancing (swapping assets) is performed via the Magneta DEX module.

Manual

Owner triggers rebalancing at any time

Weekly

At most once every 7 days

Monthly

At most once every 30 days

Important: All weight changes go through a 24-hour timelock. The owner queues the new weights, and they can only be executed after the delay. This gives holders time to review and exit before the change applies.

Security Protections

Magneta ETFs are built with multiple layers of protection to prevent exploits and protect holders.

Timelock mechanism — queue, wait, execute

Rugpull Protection

The creator's ETF tokens are locked for a configurable duration (30 days, 90 days, or permanently). During the lock, the creator cannot transfer or redeem their tokens, preventing a rug pull.

Governance Timelock

Critical admin actions (weight changes, ETF closure, treasury updates) require a mandatory waiting period. Weight updates: 24h. ETF closure: 48h. Factory admin ops: 24h. This prevents surprise changes and gives holders time to react.

2-Step Ownership (Ownable2Step)

Transferring ownership of the ETF requires the new owner to explicitly accept the transfer. This prevents accidental transfers to wrong addresses and protects against social engineering attacks.

Emergency Pause

The owner can immediately pause all minting, redeeming, and transfers if a vulnerability is discovered. Unlike other admin actions, pause/unpause is NOT timelocked — it executes instantly to protect users.

Reentrancy Guard

All state-changing functions (bootstrap, mint, redeem) are protected against reentrancy attacks using OpenZeppelin's ReentrancyGuard. Transfers use SafeERC20 to handle non-standard token implementations.

ETF Closure

If closure is enabled at creation, the owner can wind down the ETF. Closure goes through a 48-hour timelock:

  1. The owner queues the closure (queueCloseETF).
  2. A 48-hour waiting period begins. Holders see the queued action on-chain.
  3. After 48 hours, the owner confirms (executeCloseETF).
  4. No more minting is allowed. Holders can still redeem their share of the vault indefinitely.

Holders are always protected: even after closure, you can redeem your ETF tokens and receive your proportional share of the underlying assets. Nothing is lost.

FAQ

How many assets can an ETF hold?

Between 2 and 20 different ERC-20 tokens. The weights must always add up to exactly 100%.

What happens if the owner changes the weights unfairly?

All weight changes go through a 24-hour timelock. When a change is queued, it's visible on-chain. You have 24 hours to redeem your tokens before the new weights take effect. The owner can also cancel a queued change.

Can the owner steal the underlying assets?

No. Rugpull protection locks the creator's tokens for a configurable duration (up to permanent). The vault can only be accessed via mint/redeem operations that are proportional and trustless. There is no admin function to drain the vault.

What's the creation fee?

$2,000 USD, paid in the native token of your deployment chain. The price is calculated on-chain using a Chainlink price feed. A 2% tolerance is applied to account for price movements between the frontend quote and on-chain execution.

Can I deploy on multiple chains?

Yes. You can deploy on up to 30+ supported blockchains. The first chain is included in the fee; additional chains have a per-chain cost in native currency.

What if there's a security incident?

The owner can immediately pause all operations (no timelock on emergency pause). This stops all minting, redeeming, and transfers until the situation is resolved and the owner unpauses.

Ready to create your ETF?

Configure your asset basket, set your protections, and deploy across multiple chains.

Go to ETF Manager