Skip to content
LitVMSwapDocs
Open app
Developers / Overview
Developers

Build on LitVMSwap

LitVMSwap is the DEX on LitVM. Swaps, pools, a token launchpad, and a router that finds the best path across all of it. These docs show you how to plug into it, from a single HTTP call to talking to the pools directly.

What's under the hood

Here's the short version, so the rest of the docs make sense:

  • V2 pools. Classic constant-product pairs. Full range liquidity, LP tokens, the usual x * y = k.
  • V3 pools. Concentrated liquidity. LPs pick a price range and get an NFT for their position.
  • The aggregator. One entrypoint contract that takes a swap, routes it through whichever V2 or V3 pools give the best price, and checks the user gets at least the minimum they agreed to.
  • The launchpad. New tokens start on a bonding curve and graduate into a normal pool once the curve fills. After that they're just regular ERC-20s that trade like anything else.

The V2 and V3 contracts speak the standard Uniswap V2 and V3 interfaces, so the ABIs and math you already know work here too.

Pick how deep you want to go

I want to...Use thisEffort
Put a swap box on my site, no codeSwap widget2 minutes
Let my app or bot swap at the best priceSwap APIAn afternoon
Show token names and logosToken List APIMinutes
Swap or LP against one specific poolV2 or V3A day
Count swaps, run a quest, build analyticsEvents and indexingDepends on your stack

Good to know before you start

  • Chain id is 4441. The gas token is zkLTC. Full details on Network setup.
  • Native vs wrapped. Pools hold wzkLTC (wrapped zkLTC). The APIs use the placeholder address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE when they mean native zkLTC.
  • API amounts are human numbers. Send "1.5", not "1500000000000000000". On chain everything is in base units as usual.
  • No API keys. The HTTP APIs are open and CORS is on, so you can call them straight from a browser.
  • Be kind to the APIs. There's no published rate limit, so please cache what you can (the token list changes rarely) and don't poll quotes faster than your UI needs.
  • Decimals vary. Always read decimals() from the token. Don't assume 6 for anything that looks like a dollar token.
Stuck?

Say hi in the builders Telegram. Tell us what you're building and paste the request or transaction hash that's giving you trouble.