Bridge Architecture
Purpose: Technical overview of the OASIS Universal Asset Bridge Audience: Developers and technical stakeholders Status: Active Development
What is the Universal Asset Bridge?
The Universal Asset Bridge enables cross-chain token swaps across 10+ blockchains using OASIS HyperDrive technology for enhanced security and reliability.
Key Features:
Multi-chain support (Ethereum, Solana, Polygon, Arbitrum, Base, etc.)
Atomic swaps with automatic rollback
Auto-failover across multiple providers
Real-time exchange rates
Order tracking and status management
Architecture Components
1. API Layer (REST Endpoints)
Location: /ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/BridgeController.cs
Endpoints:
POST /api/v1/orders - Create bridge order
GET /api/v1/orders/{id}/check-balance - Check order status
GET /api/v1/exchange-rate - Get current rate
GET /api/v1/networks - List supported chainsStatus: β Implemented
2. Service Layer
Location: /ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Services/BridgeService.cs
Responsibilities:
Wraps bridge manager functionality
Handles errors and logging
Manages Solana bridge initialization
Provides clean interface for controllers
Status: β Implemented (Solana only, Radix pending)
3. Bridge Manager (Core Logic)
Location: NextGenSoftware.OASIS.API.Core.Managers.Bridge/CrossChainBridgeManager.cs
Responsibilities:
Execute atomic swaps
Manage bridge order lifecycle
Coordinate between source and destination chains
Handle rollbacks on failure
Status: β³ Partially implemented (needs completion)
4. Provider Implementations
Interface: IOASISBridge
Implementations:
SolanaBridgeService: β Implemented
EthereumBridgeService: β Needs implementation
PolygonBridgeService: β Needs implementation
ArbitrumBridgeService: β Needs implementation
RadixBridgeService: β Needs implementation
Each provider implements:
public interface IOASISBridge
{
Task<OASISResult<string>> LockTokensAsync(...);
Task<OASISResult<string>> MintTokensAsync(...);
Task<OASISResult<string>> BurnTokensAsync(...);
Task<OASISResult<string>> ReleaseTokensAsync(...);
}5. Smart Contracts (On-Chain)
Location: /UniversalAssetBridge/contracts/
Required Contracts:
OASISBridge.sol(Ethereum/EVM chains) - β Not deployedsolana_bridge_program.rs(Solana) - β Not deployedradix_bridge.scrypto(Radix) - β Not deployed
Specifications: β
Created (bridge-specifications.json)
Functions:
function lockTokens(destinationChain, recipient, amount)
function mintTokens(orderId, recipient, amount, proof) onlyOracle
function burnTokens(amount, returnChain, returnAddress)
function releaseTokens(orderId, recipient, proof) onlyOracle6. Oracle Service (Background Worker)
Location: Needs to be created
Responsibilities:
Monitor all chains for TokensLocked events
Verify locks reached finality
Generate consensus proofs
Execute mints on destination chains
Update order statuses
Status: β Not implemented
7. Database
Tables Needed:
bridge_orders- Order trackingbridge_transactions- Transaction historybridge_events- Event log
Provider: MongoDB (configured) or PostgreSQL (recommended for financial data)
Status: β Not implemented
How a Swap Works
Current Flow (Solana Only)
1. User submits swap request
β
2. BridgeController.CreateOrder()
β
3. BridgeService.CreateOrderAsync()
β
4. CrossChainBridgeManager.CreateBridgeOrderAsync()
β
5. Return order IDCurrent Limitation: No actual token locking/minting happens yet (contracts not deployed).
Target Flow (Full Implementation)
1. User: POST /api/v1/orders {from: SOL, to: ETH, amount: 1}
β
2. API: Lock 1 SOL on Solana contract
β
3. Solana: Emit TokensLocked event
β
4. Oracle: Detect event, wait for finality (32 blocks)
β
5. Oracle: Generate merkle proof of lock
β
6. Oracle: Call mintTokens() on Ethereum contract
β
7. Ethereum: Verify proof, mint equivalent ETH
β
8. Database: Update order status to "completed"
β
9. User: Receives ETH in their walletTime: 2-5 minutes (depends on block finality)
What Needs to Be Built
Priority 1: Smart Contracts (Critical)
Without these, the bridge cannot function.
Generate contracts using SmartContractGenerator API
Deploy to testnets (Sepolia, Devnet, Stokenet)
Deploy to additional EVM chains (Polygon, Arbitrum, Base)
Test lock/mint/burn/release functions
Verify oracle authorization works
Timeline: 1 week Complexity: Medium (using generator API)
Priority 2: Oracle Service (Critical)
Without this, swaps never complete.
Create BridgeOracleService
Implement event monitoring (WebSocket subscriptions)
Implement consensus verification
Implement cross-chain execution
Add error handling and retries
Timeline: 2 weeks Complexity: High (complex logic)
Priority 3: Database Integration (Important)
Without this, order history is lost.
Design database schema
Create OrderRepository
Integrate with BridgeService
Add order status tracking
Build admin dashboard for monitoring
Timeline: 1 week Complexity: Low-Medium
Priority 4: Multi-Chain Providers (Important)
Without these, only Solana works.
Implement EthereumBridgeService
Implement PolygonBridgeService
Implement ArbitrumBridgeService
Test each implementation
Add to CrossChainBridgeManager
Timeline: 6 weeks (1 week per chain) Complexity: Medium (repetitive work)
Priority 5: Testing & Audit (Critical for Mainnet)
Without this, security risks are too high.
Comprehensive unit tests
Integration tests across chains
Chaos testing (simulate failures)
External security audit
Bug bounty program
Timeline: 4-5 months Complexity: High
Current Workaround
For Development/Testing:
The frontend can connect to the partially implemented API:
Exchange rates work (CoinGecko integration)
Order creation returns IDs
Status checks return mock data
Limitation: No actual token transfers happen until contracts are deployed.
For Production Swaps:
Until the full bridge is complete, users would need to:
Use existing DEX aggregators
Use traditional bridges (with known risks)
Wait for OASIS bridge completion
Success Metrics
MVP Success:
Production Success:
Additional Notes
Why This is Better Than Traditional Bridges
Traditional Bridge:
Single bridge contract holds all funds
If hacked, all funds lost ($2B+ lost to bridge hacks)
Single point of failure
OASIS Bridge with HyperDrive:
Multiple providers (MongoDB, Arbitrum, Ethereum)
If one fails, automatic failover to next
Distributed risk (no single honeypot)
Oracle requires multi-sig (3-of-5) for mints
Merkle proof verification
Still a bridge: Yes, it still uses lock-and-mint mechanism, but with better redundancy and security than traditional bridges.
Contact & Support
Questions: @maxgershfield on Telegram Repository: https://github.com/NextGenSoftwareUK/OASIS (max-build2 branch) API: https://api.oasisweb4.one
This document provides complete context for continuing the Universal Asset Bridge implementation.
Last Updated: November 6, 2025 Version: 2.0
Last updated