Ramps are the mechanisms that allow users with Bitcoin to onboard and exit from Arkade with its own built-in mechanisms. They are designed to provide a seamless experience for users, allowing them to move funds in and out of Arkade. There are two types of ramps: Boarding (onboarding) and Exiting (offboarding).

Boarding

Boarding is the process of swapping an on-chain UTXO for an off-chain VTXO. The preferred method for onboarding funds into Arkade is by sending Bitcoin to a boarding address.

1. Generate a boarding address

First, get a boarding address from your wallet. This is a specialized 2-of-2 multisig Taproot address.

// Get a boarding address
const addresses = await wallet.getAddress()
console.log('Boarding Address:', addresses.boarding)

2. Send Bitcoin to the boarding address

Send Bitcoin to this address using any standard Bitcoin wallet. This creates an on-chain UTXO that will be used for boarding.

3. Check for boarding UTXOs and settle them to your wallet

Once the transaction is confirmed, check for available boarding UTXOs and settle them to your Arkade wallet.

// Settle all VTXOs and boarding UTXOs to your own address
const settleTxid = await wallet.settle()

console.log('Settlement transaction ID:', settleTxid)

4. Operator includes the UTXO in a Commitment Transaction

The Arkade Operator processes the registration and includes the UTXO in a Commitment Transaction.

5. Receive a VTXO

Once the Commitment Transaction is confirmed, you now have a VTXO (Virtual UTXO) within a Batch Output that you can spend off-chain.

Boarding addresses resemble VTXOs but typically use longer timelocks to reduce risk.

While any UTXO can be used as an input, a boarding address is the preferred way as it removes the risk of a malicious user double-spending the UTXO and replacing or failing the commitment transaction.

Exiting

Exiting is the process of swapping a VTXO (off-chain) for a UTXO (on-chain). The collaborative exit process is the most efficient way to exit Arkade when the Operator is available.

1. Gather available inputs

First, collect all available inputs, including both VTXOs and boarding UTXOs.

// Get all available inputs (both VTXOs and boarding UTXOs)
const inputs = (await Promise.all([
  wallet.getVtxos(),
  wallet.getBoardingUtxos()
])).flat()

2. Specify destination and amount

Specify the destination address and amount for the on-chain UTXO.

// Specify destination address and amount
const destinationAddress = "bc1q..." // Your on-chain Bitcoin address
const amount = 50000 // Amount in sats

3. Request settlement

Request the Arkade Operator to settle your VTXO to an on-chain UTXO.

// Settle to an on-chain address
const settleTxid = await wallet.settle({
  inputs,
  outputs: [{
    address: destinationAddress,
    amount: BigInt(amount)
  }]
})

console.log('Settlement transaction ID:', settleTxid)

4. Operator processes and broadcasts

The Operator includes this request in a new Commitment Transaction and broadcasts it to the Bitcoin network.

5. Receive on-chain funds

Once confirmed, your funds are available as a standard on-chain Bitcoin UTXO.

This method offers immediate withdrawal with lower delay and is operationally simpler than unilateral exits.

Unilateral Exit

Unilateral exit is the process of exiting a VTXO to an on-chain address without the Operator’s involvement. This is a more complex and expensivie process and should only be done if the Operator is not available.

// Unilateral exit all vtxos
await wallet.exit();

// Unilateral exit a specific vtxo
await wallet.exit([{ txid: vtxo.txid, vout: vtxo.vout }]);