Overview

Navio supports advanced atomic swaps between NAV, private tokens, and private NFTs using a unique approach based on incomplete transactions and BLS signature aggregation. Unlike traditional hash-locked atomic swaps, this protocol enables trustless non-interactive exchanges within the Navio ecosystem.

Key Concepts

Incomplete Transaction Mechanism

Navio's internal atomic swaps are built with the use of incomplete transactions. These are transactions that are intentionally unbalanced - they have inputs and outputs that do not match in value, making them invalid for normal blockchain processing. However, they serve as a foundation for order creation and matching.

When Alice wants to sell 100 Token A for 10 NAV, she creates a transaction that: - Spends 100 Token A from her wallet - Sends 10 NAV to herself - Is signed with her BLS private keys

This transaction will not be validated by the network because it's trying to spend more tokens than it's receiving in return. However, it represents Alice's intent to trade and serves as an order in the marketplace.

Non-Interactive Order Filling

Counterparties can non-interactively fill these incomplete transactions. When Bob wants to buy 100 Token A for 10 NAV, he can:

  1. Take Alice's incomplete transaction
  2. Add his own inputs (10 NAV from his wallet)
  3. Add his own outputs (100 Token A to himself)
  4. Sign the completed transaction with his BLS private key
  5. Aggregate his signature with Alice's original signature

The result is a perfectly balanced transaction that can be broadcast to the network and executed atomically.

BLS Signature Aggregation

Navio's BLS signature system enables efficient multi-party transactions. When multiple parties sign a transaction, their individual signatures can be mathematically combined into a single aggregated signature. This means that:

  • Alice signs the incomplete transaction with her private key
  • Bob signs the completed transaction with his private key
  • The two signatures are combined into one aggregated signature
  • The final transaction contains only one signature that proves both parties agreed

This aggregation process is computationally efficient and maintains the security properties of individual signatures.

Advanced Features

Multi-Asset Swaps

The system supports complex trades involving multiple assets. For example, Alice could offer to trade 100 Token A and 50 Token B for 15 NAV. Bob could then fill this order by providing the 15 NAV and receiving both tokens in return.

NFT Trading

NFTs work seamlessly with this system. Instead of trading fungible tokens, users can trade unique digital assets. The process is identical - an incomplete transaction is created for the NFT, and a counterparty fills it by providing the required payment.

Conditional Execution

Advanced users can add conditions to their trades, such as time conditions.

Privacy Preservation

All transactions use Navio's confidential transaction technology, meaning: - Transaction amounts are hidden from public view - Only the parties involved know the exact trade details