Skip to content

Step 4: Perform a deposit

A deposit on the Qredo network is a transaction that transfers Funds from a L1 blockchain address to a Qredochain (L2) address. You perform a deposit to a Wallet in your Fund using external Wallet services such as MetaMask, Exodus, Electrum, etc.

Now that you have a Fund with one or more Wallets, you can deposits assets.

Transaction types in this walkthrough

The transactions you will perform in this walkthrough are:

  • deposit - transfer assets from a Level 1 Wallet (outside Qredochain) to a Qredo Wallet: L1 to L2 transaction
  • transfer - transfer assets from one Qredo Wallet to another Qredo Wallet: L2 to L2 transaction
  • withdrawal - transfer assets from a Qredo Wallet to a L1 Wallet outside Qredochain: L2 to L1 transaction

Don't forget that approvers do not approve deposit transactions.

To complete this step, you must:

  1. Use the GET /deposit resource in this example to fetch Wallet information such as address, asset type and current (initial) balance of each. Obviously, the balance of a newly created Wallet equals 0.
  2. Perform a deposit transfer from an external Wallet (Metamask, Exodus, Electrum, or an exchange, etc.).
  3. Use the GET /deposit resource again to verify that your Wallet balance has reflected this deposit transaction on the Qredo network.

1. Retrieve address for deposit

Each Fund contains one or more deposit addresses for the different types of assets and you must make sure to get the right ones before you proceed.

Use Wallet L1 address for deposits

From a Qredo standpoint, your L2 Wallet has an ID and a L1 address. To deposit assets from a L1 Wallet, you must always identify the deposit Wallet on Qredo using its L1 address.

Example request: GET /deposit

This example retrieves details of all deposit Wallets in a Fund. With this API resource, you pass company_id and fund_id as URL parameters.

curl -X GET "{company_id}/fund/{fund id}/deposit" 

No body parameters are sent with this request.

Example response: GET /deposit

The response returns a list with all deposit Wallet addresses.

  "total_count": 1,
  "list": [
      "asset": "<L1 asset type: `BTC`, `ETH`, ETH-TESTNET, BTC-TESTNET, etc",
      "address": "<deposit Wallet address>",
      "balance": "<deposit Wallet balance in base unit per 'asset': satoshis, gweis, etc.>"

2. Make your deposit using external Wallet

Use your preferred external Wallet service to deposit assets from a Level 1 Wallet into your Qredo Wallet address you just retrieved. Note that this guide does not include instructions on services external to Qredo.

3. Verify deposit success

When you submit the deposit amount, make sure the balance in the Qredo deposit Wallet reflects this transaction. Use GET /deposit once again to ensure the response returns the deposit Wallet balance updated with your deposit amount.

Once your balance reflects the transaction, you can proceed with the next step.

balance returned in base units per asset type

The value of your balance is returned denominated in smallest base units per asset: for example, 100000000 satoshis equals 1 BTC (scale of 100000000) and 1000000000 gweis with ETH (scale of 1000000000).

Last update: 2022-12-14