Buy with SOL
A buyer with only SOL buys any coin in one transaction: SOL buys the card token on its CARD/SOL pool, and the card token buys the coin. Every write in the app is simulated on mainnet first, so you see the balance changes before your wallet signs.
On this page
The route
- SOLWrapped in the same transaction.
- CARDBought on the class's CARD/SOL DAMM v2 pool, with a minimum out.
- COINExactly that minimum of CARD buys the coin on its curve, or on its COIN/CARD pool after graduation.
The transaction is a legacy Solana transaction with no lookup table:
- Create the wrapped SOL account, move the SOL in, and sync it.
- Create the card token and coin accounts, if they do not exist.
- Swap SOL for the card token on the class's CARD/SOL DAMM v2 pool, with a minimum out.
- Swap exactly that minimum of card tokens for the coin on its curve. After graduation this leg goes through the coin's COIN/CARD DAMM v2 pool instead.
Any card tokens the first leg returns above its minimum stay in your wallet as change. The app shows them as "back to you (est.)".
| Measured | Value |
|---|---|
| Size | 1,005 to 1,057 bytes, under the 1,232-byte limit of a legacy transaction |
| Compute | about 80k to 140k compute units |
Selling goes the other way: the coin for card tokens on the curve, then card tokens for SOL on the pool.
The CARD/SOL pool
Each card token has one DAMM v2 customizable pool against SOL.
| Property | Value |
|---|---|
| Pair | Card token / wrapped SOL |
| Price range | Full range |
| Fee | 0.25% base fee |
| Starting price | The card's value in SOL divided by 1,000, chosen by whoever seeds it |
| Position | The pool's position NFT goes to whoever created the pool; it is not locked |
Buying with the card token
If you already hold card tokens, you can buy a coin with them directly. The app does it with DBC's swap2 in partial-fill mode, which is also the only way to make the last buy of a curve: an exact-in buy past the end of the curve fails with Meteora error 6033 (InsufficientLiquidity), while a partial fill takes what is left and returns the rest.
What the app checks before you sign
- Simulation. Every write is simulated on mainnet whenever its inputs change and again right before signing. The panel shows the simulated balance changes, compute units and size, or the decoded program error.
- Price impact. Every quote shows the cost of size alone. Above 2% the panel warns, above 10% it warns strongly. The SOL route shows the combined impact of both legs.
- Fill limits. A pool swap that would leave the pool's price range is blocked. A curve buy past the end of the curve is blocked on exact-in routes and explained as a partial fill when buying with the card token. A sell larger than the curve can pay back is blocked.
- Slippage. Max slippage defaults to 1%, with 0.5%, 1%, 3% and 10% to choose from.
- Fees on Solana. The compute limit is set to the simulated use plus 20%, with a priority fee of 20,000 micro-lamports per compute unit. Max keeps 0.01 SOL back for fees and rent.
The rest of this path
Written from the protocol, security and card documents of the pokedex repository and from its code (card-vault, card-launch, cp-ix). Every figure on these pages comes from there.