Buying and Selling Baskets
Last updated
Last updated
Buying (Minting)
Your SOL is swapped into the basketโs component tokens via Raydium and Jupiter, according to target weights
The tokens are locked in a vault
You receive a newly minted basket token representing your position
Selling (Redeeming)
Your basket token is burned
The underlying tokens are unlocked
Theyโre swapped back into SOL
Your SOL is returned to your wallet
Basket tokens are tradable assets with a dynamic supply.
We integrated Jupiter and Raydium for deep DEX liquidity, so any token tradable onchain can be included in a basket โ whether itโs zBTC, JLP, memecoins, LSTs, or LRTs.
We designed pie.fun to have zero limitations when it comes to basket creation.
Buying a basket involves multiple token swaps executed atomically; all swaps either succeed toghether or fail toghether.
But Solana limits transaction size and compute, allowing only 2 swaps per transaction.
We solve this with Jito Bundles, which let us group multiple transactions into a single atomic unit.
2 swaps ร 5 bundled txs = 10 token swaps in one atomic flow
This enables large, multi-token baskets โ in one seamless user action.
pie.fun uses on-demand minting. When a user swaps into a basket, basket token is minted on the spot.
This design ensures:
โ 100% collateralized baskets
โ Infinite number of baskets without liquidity constraints
Other index protocols often rely on:
โ DEX-listed baskets โ each basket needs its own liquidity pool โ limits the number of baskets and kills flexibility
โ Synthetic baskets โ dependent on external oracles โ introduces risk and complexity