Cross-Chain Stablecoin Swaps
How do I swap stablecoins between chains?
Overview
Swap stablecoins from one chain to another by creating a trade between the two assets. Supported pairs:
USDC_SOL-USDCUSDC_NPL-USDCUSDC_STE-USDCUSDC_SOL-USDC_NPLUSDC_STE-USDC_NPLUSDC_STE-USDC_SOL
Feature enablement requiredContact support to enable this feature on your bank. Cybrid needs to set up a fee account for the counter asset of your swap pair.
Example: Swap USDC on Polygon for USDC on Ethereum
This example uses the USDC_NPL-USDC trading symbol.
Step 1: Create trading accounts
Ensure the customer has both USDC_NPL and USDC
trading accounts. If not, create them via
POST /api/accounts:
{
"type": "trading",
"asset": "USDC_NPL",
"name": "Customer USDC_NPL Trading",
"customer_guid": "customer_guid"
}{
"type": "trading",
"asset": "USDC",
"name": "Customer USDC Trading",
"customer_guid": "customer_guid"
}
Required assets and trading symbolThe
USDC_NPLandUSDCassets, plus theUSDC_NPL-USDCtrading symbol, must be enabled on your bank before creating these accounts.
Step 2: Create a swap quote
Create the quote via POST /api/quotes:
{
"product_type": "trading",
"customer_guid": "customer_guid",
"symbol": "USDC_NPL-USDC",
"side": "buy",
"deliver_amount": 1000000
}
deliver_amountvsreceive_amount
deliver_amountfixes what you send; fees come out of what the recipient gets.receive_amountfixes what the recipient gets; you pay fees on top. See Create and execute a trade for the canonical explanation.
Step 3: Execute the trade
Execute the trade via POST /api/trades using the quote guid from Step 2:
{
"trade_type": "platform",
"quote_guid": "quote_guid"
}Poll GET /api/trades/{trade_guid} to monitor the trade state. See
Create and execute a trade for the full trade
lifecycle.
Fees
Trade fees are collected in the counter asset of the swap pair. For example, a
USDC_SOL-USDC_NPL swap collects fees in USDC_NPL. The aggregated fee appears in the fee
field on the quote response, denominated in counter-asset base units.
See Trade fees for fee math.
Updated 10 days ago
