Tokens· Governance

Swap RAIL on Ethereum

Railgun on Ethereum, swapped natively to and from BTC, ETH, SOL, stablecoins and thousands of other assets. Try it below, or add it to your app with one API call.

About Railgun

RAIL is the governance token of RAILGUN, a smart-contract system that uses zk-SNARK zero-knowledge proofs to give users private balances, transfers and DeFi interactions directly on Ethereum, without a separate chain or layer 2. RAIL holders who stake can vote in the RAILGUN DAO on protocol changes and receive a share of the fees the protocol collects.

RAIL is an ERC-20 token on Ethereum. RAILGUN's privacy system is also deployed on other EVM networks, but governance through RAIL takes place on Ethereum.

Official website →

Token details

Use the identifier for the chain your user holds RAIL on as sellAsset or buyAsset.

ChainSwapKit identifier
Ethereum18 decimals ETH.RAIL-0xe76c6c83af64e4c60245d8c7de953df673a7a33d

Popular RAIL swaps

What SwapKit users most often swap RAIL with, in either direction.

Add RAIL swaps to your app

Three ways in. The examples use RAIL on Ethereum; swap in another chain's identifier from the table above, and any asset as the other side.

REST API

Terminal
curl -X POST "https://api.swapkit.dev/v3/quote" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $SWAPKIT_API_KEY" \
  -d '{"sellAsset":"ETH.RAIL-0xe76c6c83af64e4c60245d8c7de953df673a7a33d","buyAsset":"ETH.USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7","sellAmount":"1","slippage":3}'

TypeScript SDK

TypeScript
import { createSwapKit, SwapKitApi } from "@swapkit/sdk";

const swapKit = createSwapKit({ config: { apiKeys: { swapKit: apiKey } } });
// …connect the user's wallet, then:

const { routes } = await SwapKitApi.getSwapQuote({
  sellAsset: "ETH.RAIL-0xe76c6c83af64e4c60245d8c7de953df673a7a33d",
  buyAsset: "ETH.USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7",
  sellAmount: "1",
  sourceAddress: "USER_SOURCE_ADDRESS",
  destinationAddress: "USER_DESTINATION_ADDRESS",
});

const txHash = await swapKit.swap({ route: routes[0] });

Swap widget

HTML
<script type="module" src="https://cdn.swapkit.dev/widget/latest/swapkit-widget.js"></script>

<swapkit-widget
  widget-id="YOUR_WIDGET_ID"
  widget-key="YOUR_WIDGET_KEY"
  input-asset="ETH.RAIL-0xe76c6c83af64e4c60245d8c7de953df673a7a33d"
  output-asset="ETH.USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7"
></swapkit-widget>

Questions

How do I swap RAIL to USDT?

Request a quote with ETH.RAIL-0xe76c6c83af64e4c60245d8c7de953df673a7a33d as sellAsset and ETH.USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7 as buyAsset, pick a route, then build the transaction with /v3/swap and have the user sign it in their own wallet.

Can I swap RAIL to native Bitcoin?

Yes. Quote RAIL to BTC.BTC and the user receives native BTC on the Bitcoin network, not a wrapped token.

Does SwapKit hold my RAIL?

No. SwapKit is non-custodial: the user signs every transaction in their own wallet and the payout goes straight to their address.

Ship cross-chain swaps this week.

One integration for 10,000+ assets across 30+ chains, with limit orders and Hyperliquid deposits included. Non-custodial by design.