Core Concepts in Aspens Cross-Chain Trading¶
This document covers the fundamental concepts behind the Aspens Markets Stack and how it enables trading across different blockchains.
Blockchain Basics¶
Different blockchains store and process transactions in unique ways. This creates challenges when trying to trade assets between them. Some key points:
- Blockchain Networks like Ethereum, Solana, and Hedera have different speeds, costs, and capabilities
- Smart Contracts are programs that run on blockchains, automating trades without middlemen
- Digital Assets include:
- Regular tokens like ETH or HBAR
- Stablecoins like USDC or USDT
- Wrapped tokens that represent assets from other chains (like WBTC on Ethereum)
How Aspens Trading Works¶
Orderbook System¶
Unlike centralized exchanges that control your assets, Aspens uses an orderbook that:
- Matches buyers and sellers across different chains
- Enables limit orders with specific prices
- Maintains order history for verification
- Settles trades only when both sides are confirmed
For example, when trading USDC on Ethereum for USDT on Hedera, the orderbook matches compatible orders and coordinates the transaction on both chains.
Your Assets, Your Control¶
Aspens never takes custody of your funds. Here's how it works:
- Your assets remain in your wallet until you place an order
- When you place an order, assets are secured in a smart contract on their native chain
- Assets move directly between traders when both sides of a trade are confirmed
- You can cancel orders anytime and get your assets back
This means you don't have to trust a central exchange with your assets.
Multi-Wallet Setup¶
To trade across chains, you'll need:
- Wallets for each blockchain you want to trade on
- Enough tokens for transaction fees on each network
- Connection to these wallets when trading
For example, trading between Ethereum and Solana requires both an Ethereum wallet (like MetaMask) and a Solana wallet (like Phantom).
Trading Details¶
Order Types¶
Aspens supports different ways to trade:
- Limit Orders: "I want to sell 500 USDC on Ethereum for at least 495 USDT on Hedera"
- Market Orders: "I want to buy USDC on Ethereum with my USDT on Hedera at the current best price"
You can also choose: - Specific Counterparty: Trade only with certain addresses - Open Market: Let the system find the best price
Trading Terms¶
When using Aspens, you'll encounter these terms:
- Bid: You're buying on one chain by selling on another
- Ask: You're selling on one chain by buying on another
- Trading Pair: Written as CHAIN_1:TOKEN::CHAIN_2:TOKEN (e.g., ETH_MAINNET:USDT::HEDERA:USDC)
- Exchange Rate: The price ratio between tokens (1.0000 means equal value)
How Your Assets Move During Trading¶
Your assets can be in three states:
- In Your Wallet: Fully under your control
- Available in Contract: Deposited but not committed to a specific trade
- Frozen in Order: Locked in a contract while waiting for a match
For instance, if you deposit 1000 USDT to the Ethereum contract and place an order for 800 USDT, you'll have 200 USDT available in the contract and 800 USDT frozen in your order.
Liquidity Sources¶
Trading requires available assets on both chains. This liquidity comes from:
- Individual traders placing orders
- Market makers providing continuous quotes
- Automated systems like AMMs
- Yield-generating vaults that allocate tokens for trading
Security Aspects¶
Verifying Transactions¶
Aspens ensures trade security through:
- Waiting for multiple block confirmations before finalizing trades
- Verifying transactions on both blockchains
- Using cryptographic proofs to validate asset transfers
Potential Risks and Protections¶
Common trading risks include:
- Front-Running: Someone seeing your pending trade and jumping ahead
- Price Manipulation: Artificially affecting prices before a trade
- Smart Contract Bugs: Code vulnerabilities that could affect funds
Aspens mitigates these through security audits, economic design, and transaction batching.
Economic Considerations¶
When trading across chains, you'll encounter various fees:
- Network Fees: Gas costs on each blockchain (e.g., ETH gas fees)
- Trading Fees: Small percentage paid to use the Aspens platform
- Slippage: Price changes between order submission and execution
As more people use Aspens, you'll generally see: - More trading pairs available - Better prices and tighter spreads - Faster trade matching
Real-World Example: Cross-Chain Trade¶
Let's walk through a realistic trading scenario between Alice and Bob.
Starting Positions¶
User | USDT (Ethereum) | USDC (Hedera) |
---|---|---|
Alice | 1300 in wallet | 0 in wallet |
Bob | 0 in wallet | 600 in wallet |
Step 1: Alice Creates a Sell Order¶
Alice wants to sell Ethereum USDT for Hedera USDC.
- Alice connects both her Ethereum and Hedera wallets
- She creates an order: "Sell 1000 USDT on Ethereum for USDC on Hedera at 1:1 rate"
- Alice approves the transaction to send 1000 USDT to Aspens' Ethereum contract
- Her 1000 USDT is now frozen in the order
User | USDT (Ethereum) | USDC (Hedera) |
---|---|---|
Alice | 300 in wallet / 1000 frozen in contract | 0 in wallet |
Bob | 0 in wallet | 600 in wallet |
Step 2: Bob Matches the Order¶
Bob wants some Ethereum USDT and has Hedera USDC.
- Bob sees Alice's order in the orderbook
- He decides to take part of it: "Buy 500 USDT on Ethereum with my USDC on Hedera"
- Bob sends 500 USDC directly to Alice's Hedera address, including the order's ID
- This transaction is recorded on the Hedera blockchain
User | USDT (Ethereum) | USDC (Hedera) |
---|---|---|
Alice | 300 in wallet / 1000 frozen in contract | 500 in wallet |
Bob | 0 in wallet | 100 in wallet |
Step 3: The Trade Settles¶
The Aspens system monitors both blockchains.
- It sees Bob's USDC transfer to Alice on Hedera
- The system releases 500 USDT from Alice's frozen order:
- 499.9 USDT goes to Bob
- 0.1 USDT (0.02%) goes as a trading fee
User | USDT (Ethereum) | USDC (Hedera) |
---|---|---|
Alice | 300 in wallet / 500 frozen in contract | 500 in wallet |
Bob | 499.9 in contract | 100 in wallet |
Step 4: What Happens Next¶
Alice can now: - Keep her remaining 500 USDT in the order - Cancel the order but keep USDT in the contract - Cancel and withdraw the USDT to her wallet
Bob can: - Use his new 499.9 USDT for trading - Withdraw it to his Ethereum wallet
This example shows how Aspens enables direct trading between chains without ever taking custody of user funds.