UTXO Assets and Cosmos Swap

Unizen extends support to UTXO-based assets like Bitcoin, Bitcoin Cash, Cosmos, and Dogecoin—a feature that sets Unizen apart from most DEX aggregators that typically focus on account-based assets.

UTXO vs. Account-Based Trading

  • UTXO Model: In a UTXO-based system (e.g., Bitcoin), the amount available for a transaction is derived from "unspent transaction outputs" rather than balances stored in accounts.

  • Account-Based Model: In systems like Ethereum, tokens are stored in accounts, making transactions simpler to manage.

This document provides an overview of the Unizen API for UTXO Assets and Cosmos trade via the Unizen DEX aggregator and Thorchain.

For UTXO Assets and Cosmos trade, currently we only support trading:

  • All currencies on Ethereum, Avax, Binance Smart Chain networks -> UTXO Assets and Cosmos

  • UTXO Assets and Cosmos -> Native Currency on Ethereum, Avax, Binance Smart Chain

  • UTXO Assets and Cosmos -> UTXO Assets and Cosmos

Available Endpoints

The Unizen API for cross-chain transactions also includes UTXO Assets and Cosmos trade, but it differs from EVM cross-chain trade.

GET /trade/v1/{chainId}/quote/cross: Fetches the UTXO Assets and Cosmos trade data.

GET /trade/v1/{chainId}/swap/cross: Generates transaction data for UTXO Assets and Cosmos trade via Thorchain.

How it works. Using the Unizen API for native UTXO assets and Cosmos trade

  1. Call GET /trade/v1/{chainId}/quote/cross to retrieve all available quotes for a cross-chain trade via the Unizen DEX aggregator.

  2. Call GET /trade/v1/{chainId}/swap/cross to generate transaction data for a cross-chain trade via the Unizen DEX aggregator.

  3. Send the transaction with the user fund to the Unizen DEX aggregator contract.

You can test it here: https://github.com/unizen-io/unizen-dex-aggregator-example. This example project also includes all steps for the integration.

Last updated