OnBORD.xyz

Technical Overview - OnBord.xyz

System Overview

OnBord.xyz’s Ordinals and Runes System enables cross-chain asset management for Bitcoin and Base networks. It supports NFT-like Ordinals and fungible Runes using cbBTC as a bridge, with IPFS for decentralized metadata storage and multisig wallets, ZKPs, and time-locks for security.

Security Features

OnBord.xyz's security system includes:

  • Multisig Wallets: Require multiple signatures to authorize transactions, reducing the risk of fraud.
  • Zero-Knowledge Proofs (ZKPs): Allow parties to prove the validity of a transaction without revealing underlying sensitive information.
  • Time-Locks: Enforce waiting periods before assets can be transferred, preventing premature asset movements.

Metadata and IPFS Integration

Metadata for each Ordinal and Rune is securely stored on IPFS, ensuring decentralized management of asset details. IPFS hashes are linked directly in the smart contracts, providing a reliable way to store and retrieve data like descriptions, images, and associated information.

How to Lock, Unlock, Wrap, and Unwrap Bitcoin Ordinals and Runes

Ordinals are inscriptions on individual satoshis (the smallest unit of Bitcoin), representing NFTs, while Runes are fungible tokens that can be transferred on the Bitcoin network.

Locking Ordinals and Runes

To lock a Bitcoin Ordinal or Rune, you need to initiate a transaction that moves the satoshi or tokens to a smart contract that holds them in a locked state. This process involves:

  • Step 1: Connect your Bitcoin wallet to the system (use a Taproot-enabled wallet for Ordinals).
  • Step 2: Specify the Ordinal ID or Rune amount you wish to lock.
  • Step 3: Provide an IPFS hash (if metadata is involved).
  • Step 4: Confirm the transaction, which will lock the assets on the Bitcoin network.

Unlocking Ordinals and Runes

Unlocking a locked Ordinal or Rune means releasing it from the lock contract and returning it to your wallet:

  • Step 1: Access the lock contract via OnBord.xyz, where your assets are held.
  • Step 2: Enter the Ordinal ID or Rune details.
  • Step 3: Confirm the unlock transaction, releasing the assets back to your Bitcoin wallet.

Wrapping Ordinals and Runes for Base Network

Wrapping Ordinals and Runes allows them to be transferred and used on the Base network as ERC-721 and ERC-20 tokens, respectively:

  • Step 1: Lock the Ordinal or Rune on the Bitcoin network.
  • Step 2: Initiate the wrapping transaction, which creates a wrapped version of the asset on Base.
  • Step 3: The wrapped Ordinal (ERC-721) or Rune (ERC-20) is now available on Base for further interactions.

Unwrapping Ordinals and Runes

Unwrapping Ordinals or Runes on Base means converting them back to their original Bitcoin form:

  • Step 1: Access the OnBord.xyz platform and locate the wrapped asset back on Base, where you’ll see your wrapped Ordinal (ERC-721) or Rune (ERC-20).
  • Step 2: Initiate the unwrap transaction, which burns the wrapped token on the Base network.
  • Step 3: The corresponding Ordinal or Rune is released from the lock contract on the Bitcoin network and sent back to your Bitcoin wallet.

Important Notes for Ordinals and Runes Wrapping/Unwrapping

  • Compatibility: Ensure that your wallet supports both the Bitcoin network (for Ordinals) and the Base network (for wrapped assets). For Bitcoin, use wallets with Taproot support for Ordinals.
  • IPFS Metadata: When wrapping Ordinals, metadata is stored on IPFS and linked to the ERC-721 representation on Base. Always retain your IPFS hash for future reference.
  • Transaction Fees: Fees for locking/unlocking on Bitcoin and wrapping/unwrapping on Base apply, so ensure sufficient funds in both networks.
  • Multisig Wallets: For high-value assets, use multisig wallets to secure the transactions.

Runes Workflow Example

Below is a detailed example demonstrating the complete workflow for managing Runes within the OnBord.xyz system.

Example 1: Locking Runes

Follow these steps to lock your Runes securely:

Step-by-Step Guide:

  1. Connect Your Wallet: Click on the "Connect Wallet" button and authorize the connection through your wallet provider.
  2. Specify Runes: Enter the number of Runes you wish to lock in the "Rune Amount" field.
  3. Provide Metadata: If applicable, upload metadata files related to the Runes and obtain the IPFS hash.
  4. Initiate Locking: Click the "Lock Runes" button to begin the transaction.
  5. Confirm Transaction: Review the transaction details in your wallet and confirm to proceed.
  6. Transaction Status: Monitor the transaction status in real-time under the "Transaction Status" section.
  7. Completion: Once confirmed, your Runes are securely locked in the smart contract.

Example 2: Unlocking Runes

To unlock your previously locked Runes, follow these steps:

Step-by-Step Guide:

  1. Access Lock Contract: Navigate to the "Unlock Runes" section within your dashboard.
  2. Enter Details: Input the specific Rune ID or details associated with your locked Runes.
  3. Initiate Unlocking: Click the "Unlock Runes" button to start the unlocking process.
  4. Confirm Transaction: Approve the transaction in your wallet to proceed.
  5. Transaction Status: Track the unlocking process in the "Transaction Status" section.
  6. Completion: Upon confirmation, the Runes are returned to your wallet.

Example 3: Wrapping Runes for Base Network

To utilize your Runes on the Base network, you need to wrap them as ERC-20 tokens:

Step-by-Step Guide:

  1. Ensure Runes are Locked: Confirm that your Runes are currently locked in the smart contract.
  2. Initiate Wrapping: Enter the Rune ID you wish to wrap in the "Wrap Runes" section.
  3. Execute Transaction: Click the "Wrap Runes" button to start the wrapping process.
  4. Confirm in Wallet: Approve the wrapping transaction in your wallet.
  5. Monitor Status: View the wrapping progress under "Transaction Status."
  6. Completion: Your Runes are now available as ERC-20 tokens on the Base network.

Example 4: Unwrapping Runes from Base Network

To revert your wrapped Runes back to their original form on the Bitcoin network:

Step-by-Step Guide:

  1. Access Wrapped Runes: Locate your wrapped Runes (ERC-20 tokens) on the Base network via your wallet.
  2. Initiate Unwrapping: Enter the Rune ID in the "Unwrap Runes" section.
  3. Execute Transaction: Click the "Unwrap Runes" button to start the unwrapping process.
  4. Confirm in Wallet: Approve the unwrapping transaction in your wallet.
  5. Monitor Status: Track the unwrapping process in the "Transaction Status" section.
  6. Completion: Your Runes are now returned to your Bitcoin wallet.

Code Example: Locking Runes

Below is a simulated JavaScript snippet demonstrating how you might programmatically lock Runes using Web3.js:


    // Import Web3 library
    const Web3 = require('web3');
    const web3 = new Web3(Web3.givenProvider || 'https://base.network/rpc');
    
    // Smart contract ABI and address
    const contractABI = [/* ABI Array */];
    const contractAddress = '0xYourContractAddress';
    
    // Initialize contract
    const contract = new web3.eth.Contract(contractABI, contractAddress);
    
    // Function to lock Runes
    async function lockRunes(runeAmount, ipfsHash) {
        const accounts = await web3.eth.getAccounts();
        const account = accounts[0];
    
        try {
            const receipt = await contract.methods.lockRunes(runeAmount, ipfsHash)
                .send({ from: account });
            console.log('Runes locked successfully:', receipt);
        } catch (error) {
            console.error('Error locking Runes:', error);
        }
    }
    
    // Usage
    const runeAmount = 1000; // Number of Runes to lock
    const ipfsHash = 'QmYourIpfsHash';
    lockRunes(runeAmount, ipfsHash);
                    

Workflow Diagram

Visual representation of the Runes locking and wrapping workflow:

Runes Workflow Diagram

Ordinals Workflow Example

Below is a detailed example demonstrating the complete workflow for managing Ordinals within the OnBord.xyz system.

Example 1: Locking Ordinals

Follow these steps to lock your Ordinals securely:

Step-by-Step Guide:

  1. Connect Your Wallet: Click on the "Connect Wallet" button and authorize the connection through your wallet provider.
  2. Specify Ordinals: Enter the specific Ordinal IDs you wish to lock in the "Ordinal ID" field.
  3. Provide Metadata: If applicable, upload metadata files related to the Ordinals and obtain the IPFS hash.
  4. Initiate Locking: Click the "Lock Ordinal" button to begin the transaction.
  5. Confirm Transaction: Review the transaction details in your wallet and confirm to proceed.
  6. Transaction Status: Monitor the transaction status in real-time under the "Transaction Status" section.
  7. Completion: Once confirmed, your Ordinals are securely locked in the smart contract.

Example 2: Unlocking Ordinals

To unlock your previously locked Ordinals, follow these steps:

Step-by-Step Guide:

  1. Access Lock Contract: Navigate to the "Unlock Ordinals" section within your dashboard.
  2. Enter Details: Input the specific Ordinal ID associated with your locked Ordinals.
  3. Initiate Unlocking: Click the "Unlock Ordinal" button to start the unlocking process.
  4. Confirm Transaction: Approve the transaction in your wallet to proceed.
  5. Transaction Status: Track the unlocking process in the "Transaction Status" section.
  6. Completion: Upon confirmation, the Ordinals are returned to your wallet.

Example 3: Wrapping Ordinals for Base Network

To utilize your Ordinals on the Base network, you need to wrap them as ERC-721 tokens:

Step-by-Step Guide:

  1. Ensure Ordinals are Locked: Confirm that your Ordinals are currently locked in the smart contract.
  2. Initiate Wrapping: Enter the Ordinal ID you wish to wrap in the "Wrap Ordinal" section.
  3. Execute Transaction: Click the "Wrap Ordinal" button to start the wrapping process.
  4. Confirm in Wallet: Approve the wrapping transaction in your wallet.
  5. Monitor Status: View the wrapping progress under "Transaction Status."
  6. Completion: Your Ordinals are now available as ERC-721 tokens on the Base network.

Example 4: Unwrapping Ordinals from Base Network

To revert your wrapped Ordinals back to their original form on the Bitcoin network:

Step-by-Step Guide:

  1. Access Wrapped Ordinals: Locate your wrapped Ordinals (ERC-721 tokens) on the Base network via your wallet.
  2. Initiate Unwrapping: Enter the Ordinal ID in the "Unwrap Ordinal" section.
  3. Execute Transaction: Click the "Unwrap Ordinal" button to start the unwrapping process.
  4. Confirm in Wallet: Approve the unwrapping transaction in your wallet.
  5. Monitor Status: Track the unwrapping process in the "Transaction Status" section.
  6. Completion: Your Ordinals are now returned to your Bitcoin wallet.

Code Example: Locking Ordinals

Below is a simulated JavaScript snippet demonstrating how you might programmatically lock Ordinals using Web3.js:


    // Import Web3 library
    const Web3 = require('web3');
    const web3 = new Web3(Web3.givenProvider || 'https://base.network/rpc');
    
    // Smart contract ABI and address
    const contractABI = [/* ABI Array */];
    const contractAddress = '0xYourContractAddress';
    
    // Initialize contract
    const contract = new web3.eth.Contract(contractABI, contractAddress);
    
    // Function to lock Ordinals
    async function lockOrdinals(ordinalId, ipfsHash) {
        const accounts = await web3.eth.getAccounts();
        const account = accounts[0];
    
        try {
            const receipt = await contract.methods.lockOrdinals(ordinalId, ipfsHash)
                .send({ from: account });
            console.log('Ordinals locked successfully:', receipt);
        } catch (error) {
            console.error('Error locking Ordinals:', error);
        }
    }
    
    // Usage
    const ordinalId = 'ordinal12345'; // Specific Ordinal ID to lock
    const ipfsHash = 'QmYourIpfsHash';
    lockOrdinals(ordinalId, ipfsHash);
                    

Workflow Diagram

Visual representation of the Ordinals locking and wrapping workflow:

Ordinals Workflow Diagram

Step 1: Connect Your Wallet

To begin interacting with the OnBord.xyz Ordinals and Runes System, please connect your wallet.