Skip to content

Step 4: Perform a deposit

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

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

Do not forget that custodians 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 current balances 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 "https://api.qredo.network/api/v1/p/company/{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 in to your Qredo wallet address yu just retrieved. Note that this documentation does not include instructions on services external to Qredo.

3. Verify deposit success

When you submit the deposit amount from the Level 1 wallet service, you must make sure the balance in the deposit wallet reflects this transaction. Use the GET /deposit resource once again to ensure the response body 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: 2021-12-17