Flash Basket
This product buys several tokens with one asset in single transaction, each within the slippage limits you sign.
On this page
- On the roadmap
- V3 Expansion
- Pays with
- One asset
- Bounds
- The minimum amount accepted per token
- Who signs
- For your own wallet
- Transactions
- 1
Buy multiple tokens in one transaction instead of swapping each separately. If one swap fails, none of the purchases go through.
- Spread a deposit: Buy WETH, WBTC and two other tokens with $5,000 USDC, using chosen allocations.
- Treasury that diversifies: A DAO converts part of its stablecoin holdings into multiple assets in one transaction approved by its signers.
- Buy tokenized stocks: Purchase several tokenized stocks in one transaction, with a minimum amount set for each.
One asset to a full basket
- You choose the input: Select the token you want to pay with and the amount.
- Build your basket: Select the tokens and allocate a percentage to each, totaling 100%.
- Set your limits: Choose the minimum amount of each token you’ll accept.
- Approve and submit to the Flash Basket contract, and submit the transaction.
- Receive your tokens: Each swap must meet its minimum before the entire basket is sent to your wallet. If any swap fails, the transaction reverts.
$1,000 USDC split in 60 and 40
60% goes into WETH and 40% into Xtoken.
- You pay
- $1,000 USDC
- Fee (0.20%)
- $2 USDC
- 60% into WETH
- $598.80 USDC
- 40% into Xtoken
- $399.20 USDC
- You receive
- Both tokens, each above its minimum
- Transactions
- 1
At $3,000 per WETH, $598.80 buys approximately 0.1996 WETH. With 0.5% slippage, your minimum is 0.1986 WETH. The Xtoken allocation has its own minimum, calculated the same way.
What a basket guarantees
- The whole basket, or your asset back: If any swap fails or falls below its minimum, the entire transaction reverts and your funds stay in your wallet.
- Each token at its minimum or better: Every token must meet or exceed the minimum amount you set.
- Straight to your wallet. Every token of the basket goes to the address that sent the purchase.
- The amount you approved: The contract spends only the approved purchase amount.