services
Get a key

library / Blockchain ideas

Swap-powered apps

Swap-powered apps in the Carbium Library: 5 working Solana examples, among them Realizable value calculator and Swap quote freshness check.

  • Realizable value calculator BI0072

    Quote SOL to USDC at three sizes, set each against listed price times amount, and print the gap in basis points, for a typed amount or wallet too.

  • Swap quote freshness check BI0071

    Spec and runnable code that samples one SOL to USDC quote against the slot clock and counts how often the answer moves, so you can judge a quote source.

  • Token liquidity depth chart BI0048

    Spec and code for a token liquidity depth chart: price impact at five quote sizes, plus vault balances for the pools you name, from one key.

  • Stablecoin depeg monitor BI0047

    Quote USDC to USDT and back at two sizes through Carbium, take the 5 bps router fee out, and print OK or DRIFT per direction in basis points from 1.00.

  • Token price alerts BI0025

    Runnable code for a Solana price alert that reads a pool's two vaults over RPC, fires on a ceiling, a floor or a move, and fits the Free plan's rate limit.