Cardano

Overview

Cardano (ADA) is the native asset of the Cardano blockchain. It utilizes:

  • UTXO model
  • EdDSA signature algorithm

Cardano is a decentralized, public blockchain that uses a proof-of-stake consensus mechanism.

Explorer

https://cardanoscan.io/

Wallets Types

BitGo enables holding Cardano in the following wallet types:

Multisig ColdMultisig HotMPC ColdMPC Hot
Custody
Self-Custody

Ticker Symbols

MainnetTestnet
adatada

Faucet

You can use a faucet to obtain free testnet Cardano for development and testing purposes.

Faucet: https://docs.cardano.org/cardano-testnets/tools/faucet

For testnet faucet, you have the option for Preprod or Preview testnet faucet assets. Preview refers to the time before the Vasil hard-fork, and Preprod refers to the most recent testnet. For the current testnet, use Preprod assets.

Note: Don't attempt to withdraw ADA from a BitGo wallet to a Byron address. BitGo wallets don't support withdrawing to Byron addresses. You can identify Byron addresses by their prefix DdzFFz.

Units

Cardano is divisible by 10-6 and the base unit is a Lovelace:

  • 1 Cardano = 1,000,000 lovelace
  • 1 lovelace = 0.000001 Cardano

Cardano balances can be in either integer or string format. However, BitGo recommends using string format to ensure values don't exceed the programmable number limit.

Create Wallet

  • cURL
  • JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>" export COIN="tada" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export LABEL="<WALLET_NAME>" export WALLET_PASSPHRASE="<BITGO_LOGIN_PASSPHRASE>" export ENTERPRISE="<ENTERPRISE_ID>" curl -X POST \ http://$BITGO_EXPRESS_HOST:3080/api/v2/$COIN/wallet/generate \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "label": "'"$LABEL"'", "passphrase": "'"$WALLET_PASSPHRASE"'", "type": "hot", "walletVersion": 3, "multisigType": "tss", "enterprise": "'"$ENTERPRISE"'" }'

Create Address

BitGo supports a variety of address types for Cardano. To learn more, see Reference: Address Types. BitGo doesn't support creating Byron addresses.

  • cURL
  • JavaScript
1 2 3 4 5 6 7 8 export COIN="tada" export WALLET_ID="<YOUR_WALLET_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" curl -X POST \ https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID/address \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN"

Consolidate Balance

Despite being a UTXO asset, Cardano uses MPC wallets and therefore requires consolidating to the base address in order to use the maximum spendable amount.

  • cURL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>" export COIN="tada" export WALLET_ID="<YOUR_WALLET_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export ADDRESS_1="<DESTINATION_ADDRESS_1>" export ADDRESS_2="<DESTINATION_ADDRESS_2>" export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>" curl -X POST \ http://$BITGO_EXPRESS_HOST:3080/api/v2/$COIN/wallet/$WALLET_ID/consolidateAccount \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "consolidateAddresses": [ { "address": "'"$ADDRESS_1"'" }, { "address": "'"$ADDRESS_2"'" } ], "walletPassphrase": "'"$WALLET_PASSPHRASE"'" }'

Estimate Fee

Cardano's fee rate depends on the size of the transaction in bytes. The formula for determining the minimum fee required to cover the transaction is based on two protocol parameters, a and b. The formula for determining the minimum fee is (a * size(tx)) + b.

  • cURL
  • JavaScript
1 2 3 4 5 6 7 export COIN="tada" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" curl -X GET \ https://app.bitgo-test.com/api/v2/$COIN/tx/fee \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN"

Transact

Cardano uses a UTXO model, which supports multiple inputs and multiple outputs of a transaction.

Transactions on Cardano have a minimum UTXO amount of 1 ADA. This means that in your transaction unspents, you cannot have any value less than 1 UTXO.

You can use the sendMany() function to send ADA to multiple receive addresses.

  • JavaScript
  • JavaScript (send to many)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 import * as dotenv from "dotenv"; import {EnvironmentName} from "bitgo"; import {BitGoAPI} from "@bitgo/sdk-api"; import {Tada} from "@bitgo/sdk-coin-ada"; dotenv.config(); const config = { USERNAME: process.env.USERNAME as string, PASSWORD: process.env.PASSWORD as string, ENV: process.env.ENV as EnvironmentName, OTP: process.env.OTP as string, ENTERPRISE_ID: process.env.ENTERPRISE_ID as string, WALLET_ID: process.env.WALLET_ID as string, WALLET_PASS_PHRASE: process.env.WALLET_PASS_PHRASE as string }; const bitgo = new BitGoAPI({env: config.ENV}); bitgo.register("tada", Tada.createInstance); const coin = bitgo.coin("tada"); async function auth() { await bitgo.authenticate({ username: config.USERNAME, password: config.PASSWORD, otp: config.OTP, }); await bitgo.lock(); await bitgo.unlock({otp: "000000", duration: 3600}); } async function main() { await auth(); const destinatonAddress = "0x1037c88b10fbd0754b9fbd3ba7be41fe7cb61f59"; const wallet = await coin.wallets().get({id: config.WALLET_ID}); const sendAmount = wallet.balanceString() ?? 0; const res = await wallet.sendMany({ walletPassphrase: config.WALLET_PASS_PHRASE, recipients: [{address: destinatonAddress, amount: sendAmount}], type: "transfer", }); console.log(res); } main().catch((err) => console.error(err));

Stake

The staking transaction fee is 2 ADA, and is in addition to regular transaction fee. You can increase your stake by depositing Cardano in the staked wallet - no additional staking transaction is required. Staking Cardano occurs in epochs (5 day periods) and takes 15–20 days before you receive your first rewards. Here’s how it works:

  • Epoch 0: You delegate your ADA to a stake pool.
  • Epoch 1: Your delegation is registered.
  • Epoch 2: Your stake becomes active.
  • Epoch 3: Rewards for Epoch 2 are calculated.
  • Epoch 4: You receive your first rewards (after approximately 15–20 days).
  • After this initial warm-up, rewards continue every 5 days (each epoch).

To learn more about staking assets with BitGo, see Staking Overview.

  • cURL
  • JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 export COIN="tada" export WALLET_ID="<YOUR_WALLET_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export CLIENT_ID="<CLIENT_ID>" export AMOUNT="<AMOUNT_IN_BASE_UNITS>" export GAS_PRICE="<GAS_PRICE>" curl -X POST \ http://api/staking/v1/$COIN/wallets/$WALLET_ID/requests \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "clientId": "'$CLIENT_ID'", "amount": "'$AMOUNT'", "gasPrice": "'$GAS_PRICE'", "type": "STAKE" }'

You can view more example scripts to stake, unstake, and withdraw rewards in the BitGoJS GitHub repo.

See Also