Yield Pools
Learn how to transfer funds to and from yield pools.
Before You Begin
Make sure to read more about Crypto Yield Accounts to learn how you can provide interest-bearing accounts for your users.
Deposit to Yield Pool
Sandbox Pools
In our Sandbox, you'll see fake pools that are not tied to any real protocols.
List Pools
Let's start by getting a list of the pools available in the Conduit system.
1. Make a GET
request to https://sandbox.conduit.financial/pools
2. If successful, you will see a similar response from the API:
TIP
Make sure to note down the pool id
for the fake_compound_usdc
pool to be used in the deposit exercise below.
{
"data": [
{
"id": "id:pool:2KpCwkP1FUzWV68LcpSt1dwR2KE",
"type": "pool",
"attributes": {
"name": "Test",
"description": "Test",
"poolType": "simple"
},
"relationships": {
"allocations": {
"links": {
"first": "/pools/id:pool:2KpCwkP1FUzWV68LcpSt1dwR2KE/relationships/allocations",
"self": "/pools/id:pool:2KpCwkP1FUzWV68LcpSt1dwR2KE/relationships/allocations",
"related": "/pools/id:pool:2KpCwkP1FUzWV68LcpSt1dwR2KE/allocations",
"next": null
},
"data": []
}
}
},
{
"id": "id:pool:2KjORK0XIQlKoESrJPOQMIu2U5S",
"type": "pool",
"attributes": {
"name": "fake_usgov_usdc",
"description": "Sandbox version of tokenized US Government Treasuries ETF pool",
"poolType": "simple"
},
"relationships": {
"allocations": {
"links": {
"first": "/pools/id:pool:2KjORK0XIQlKoESrJPOQMIu2U5S/relationships/allocations",
"self": "/pools/id:pool:2KjORK0XIQlKoESrJPOQMIu2U5S/relationships/allocations",
"related": "/pools/id:pool:2KjORK0XIQlKoESrJPOQMIu2U5S/allocations",
"next": "/pools/id:pool:2KjORK0XIQlKoESrJPOQMIu2U5S/relationships/allocations?page[after]=id:allc:2LYPZOxydn0FydTl1a6JAiqiSaM"
},
"data": [
{
"id": "id:allc:2LZCqPM5fgNaBiDTgDw75zRqF9f",
"type": "allocation"
},
{
"id": "id:allc:2LYZZydNHYaJcwqhJsohSAoVq5P",
"type": "allocation"
},
{
"id": "id:allc:2LYWWj0h5I9mA6X5B5gJq3lVxNO",
"type": "allocation"
},
{
"id": "id:allc:2LYwFYRqKcR6XPwsoi02LnTcls1",
"type": "allocation"
},
{
"id": "id:allc:2LYPZOxydn0FydTl1a6JAiqiSaM",
"type": "allocation"
}
]
}
}
},
{
"id": "id:pool:2KjMVhOhmA3A1324xs5Tw9wNvqT",
"type": "pool",
"attributes": {
"name": "fake_yearn_usdc",
"description": "Sandbox version of Yearn USDC pool",
"poolType": "simple"
},
"relationships": {
"allocations": {
"links": {
"first": "/pools/id:pool:2KjMVhOhmA3A1324xs5Tw9wNvqT/relationships/allocations",
"self": "/pools/id:pool:2KjMVhOhmA3A1324xs5Tw9wNvqT/relationships/allocations",
"related": "/pools/id:pool:2KjMVhOhmA3A1324xs5Tw9wNvqT/allocations",
"next": null
},
"data": []
}
}
},
{
"id": "id:pool:2KjM5JraBl8DPxBawp9PgDfpoCc",
"type": "pool",
"attributes": {
"name": "fake_euler_usdc",
"description": "Sandbox version of Euler USDC pool\n",
"poolType": "simple"
},
"relationships": {
"allocations": {
"links": {
"first": "/pools/id:pool:2KjM5JraBl8DPxBawp9PgDfpoCc/relationships/allocations",
"self": "/pools/id:pool:2KjM5JraBl8DPxBawp9PgDfpoCc/relationships/allocations",
"related": "/pools/id:pool:2KjM5JraBl8DPxBawp9PgDfpoCc/allocations",
"next": null
},
"data": []
}
}
},
{
"id": "id:pool:2KjLeDXZxwMmh3vkR8e7mzH0pIC",
"type": "pool",
"attributes": {
"name": "fake_aave_usdc",
"description": "Sandbox version of AAVE USDC pool",
"poolType": "simple"
},
"relationships": {
"allocations": {
"links": {
"first": "/pools/id:pool:2KjLeDXZxwMmh3vkR8e7mzH0pIC/relationships/allocations",
"self": "/pools/id:pool:2KjLeDXZxwMmh3vkR8e7mzH0pIC/relationships/allocations",
"related": "/pools/id:pool:2KjLeDXZxwMmh3vkR8e7mzH0pIC/allocations",
"next": null
},
"data": []
}
}
},
{
"id": "id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI",
"type": "pool",
"attributes": {
"name": "fake_compound_usdc",
"description": "Sandbox version of Compound USDC pool",
"poolType": "simple"
},
"relationships": {
"allocations": {
"links": {
"first": "/pools/id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI/relationships/allocations",
"self": "/pools/id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI/relationships/allocations",
"related": "/pools/id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI/allocations",
"next": null
},
"data": []
}
}
},
{
"id": "id:pool:2H1E3EPxcafvzFKOyoLUwO2PfcK",
"type": "pool",
"attributes": {
"name": "default_pool_usdc",
"description": "Default Pool: USDC",
"poolType": "simple"
},
"relationships": {
"allocations": {
"links": {
"first": "/pools/id:pool:2H1E3EPxcafvzFKOyoLUwO2PfcK/relationships/allocations",
"self": "/pools/id:pool:2H1E3EPxcafvzFKOyoLUwO2PfcK/relationships/allocations",
"related": "/pools/id:pool:2H1E3EPxcafvzFKOyoLUwO2PfcK/allocations",
"next": "/pools/id:pool:2H1E3EPxcafvzFKOyoLUwO2PfcK/relationships/allocations?page[after]=id:allc:2L8pm2pCyBa7vx1wsgY2Ce8PfKm"
},
"data": [
{
"id": "id:allc:2LVUdSHLNXNBBmPMz9rRW2EiuSF",
"type": "allocation"
},
{
"id": "id:allc:2LNwRgcOdh41qam6xVezWA1GZpE",
"type": "allocation"
},
{
"id": "id:allc:2LNrtmk0vtOkYELOHbmiNrAB2yI",
"type": "allocation"
},
{
"id": "id:allc:2L9lmQUAy9dYrmOI4UY4pIxaGZC",
"type": "allocation"
},
{
"id": "id:allc:2L8pm2pCyBa7vx1wsgY2Ce8PfKm",
"type": "allocation"
}
]
}
}
}
],
"links": {
"self": "/pools",
"first": "/pools",
"next": null,
"prev": null
}
}
Deposit 100 USDC to Fake Compound Pool
In the example below, we'll be simulating a transfer from a Conduit account to a Yield pool.
1. Make a POST
request to https://sandbox.conduit.financial/transactions
with the following body but replace the source
with the account allocation id
you want to transfer from and the destination
with the pool id
you want to transfer to:
{
"data": {
"attributes": {
"assetType": "asset:eth:USDC",
"amount": "100000000",
"source": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"destination": "id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI"
}
}
}
2. If successful, you will see a similar response from the API:
{
"data": {
"id": "id:trxn:2Lk6BXDqZXWaKM7gIEp1I8eDkAx",
"type": "transaction",
"attributes": {
"createdAt": "2023-02-14T19:23:17.940Z",
"createdBy": "client",
"effectiveDate": "2023-02-14",
"amount": "100000000",
"source": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"destination": "id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI",
"status": "pending",
"assetType": "asset:eth:USDC"
},
"relationships": {
"source": {
"links": {
"self": "/transactions/id:trxn:2Lk6BXDqZXWaKM7gIEp1I8eDkAx/relationships/source",
"related": "/transactions/id:trxn:2Lk6BXDqZXWaKM7gIEp1I8eDkAx/source"
},
"data": {
"id": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"type": "allocation"
}
},
"destination": {
"links": {
"self": "/transactions/id:trxn:2Lk6BXDqZXWaKM7gIEp1I8eDkAx/relationships/destination",
"related": "/transactions/id:trxn:2Lk6BXDqZXWaKM7gIEp1I8eDkAx/destination"
},
"data": {
"id": "id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI",
"type": "pool"
}
},
"quote": {
"links": {
"self": "/transactions/id:trxn:2Lk6BXDqZXWaKM7gIEp1I8eDkAx/relationships/quote",
"related": "/transactions/id:trxn:2Lk6BXDqZXWaKM7gIEp1I8eDkAx/quote"
},
"data": null
}
}
}
}
Check Account
Now that you've successfully transferred funds to the pool, you'll be able to query your account to see the updates.
Yield Accrual
You will not see any yield accrue yet because a deposit needs to have been made at least 24 hours prior to that day's accrual cutoff of 3pm ET.
Example:
- Deposits before 3pm ET on 02-13 will accrue yield starting on 02-14
- Deposits at or after 3pm ET on 02-13 will accrue yield starting on 02-15
1. Make a GET
request to https://sandbox.conduit.financial/accounts/id:acct:{your_account_id}
with your account id
.
2. If successful, you will see a response from the API that shows a new pool called fake_compound_usdc
added, the balance of that pool increased by your transferred amount, and the default_pool_usdc
decreased by that same amount.
TIP
Make sure to note down the allocation id
for the fake_compound_usdc
pool to be used in the withdrawal exercise below.
{
"data": {
"id": "id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao",
"type": "account",
"attributes": {
"balances": {
"available": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "5000000000000"
}
],
"pending": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
]
}
},
"relationships": {
"account-holders": {
"links": {
"self": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/relationships/account-holders",
"related": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/account-holders"
},
"data": [
{
"id": "id:ahl:2Lk4JynavffsZLROgaFDEtQIghr",
"type": "account-holder"
}
]
},
"allocations": {
"links": {
"self": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/relationships/allocations",
"first": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/relationships/allocations",
"next": null,
"related": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/allocations"
},
"data": [
{
"id": "id:allc:2Lk6BULuJbywUzTgl5ALiNxY4RK",
"type": "allocation"
},
{
"id": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"type": "allocation"
}
]
},
"wallets": {
"links": {
"self": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/relationships/wallets",
"related": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/wallets"
},
"data": [
{
"id": "id:wlt:2Lk4Qfki8Su5WwdceWZYp5HgQ9D",
"type": "wallet"
}
]
}
}
},
"included": [
{
"id": "id:allc:2Lk6BULuJbywUzTgl5ALiNxY4RK",
"type": "allocation",
"attributes": {
"effectiveYieldRate": "148",
"conduitTakeRate": "16",
"clientTakeRate": "0",
"poolId": "id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI",
"poolYieldRate": "164",
"accountId": "id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao",
"poolName": "fake_compound_usdc",
"balances": {
"available": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "100000000"
}
],
"pending": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
],
"accruedYield": [
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
]
}
}
},
{
"id": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"type": "allocation",
"attributes": {
"effectiveYieldRate": "0",
"conduitTakeRate": "20",
"clientTakeRate": "0",
"poolId": "id:pool:2H1E3EPxcafvzFKOyoLUwO2PfcK",
"poolYieldRate": "0",
"accountId": "id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao",
"poolName": "default_pool_usdc",
"balances": {
"available": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "4999900000000"
}
],
"pending": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
],
"accruedYield": [
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
]
}
}
},
{
"id": "id:wlt:2Lk4Qfki8Su5WwdceWZYp5HgQ9D",
"type": "wallet",
"attributes": {
"address": "wlt:eth:0x2cc69b52e2820893160d99ebef68adf217ecbed1",
"assetType": "asset:eth:USDC",
"networkId": "net:eth:ropsten",
"function": "deposit"
}
}
]
}
Withdraw From Yield Pool
Withdraw 50 USDC from Fake Compound Pool
In the example below, we'll be simulating a withdrawal from a Yield pool.
1. Make a POST
request to https://sandbox.conduit.financial/transactions
with the following body but replace the source
with the pool allocation id
you want to transfer from and the destination
with the account allocation id
you want to transfer to:
{
"data": {
"attributes": {
"assetType": "asset:eth:USDC",
"amount": "50000000",
"source": "id:allc:2Lk6BULuJbywUzTgl5ALiNxY4RK",
"destination": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr"
}
}
}
2. If successful, you will see a similar response from the API:
{
"data": {
"id": "id:trxn:2LkBeEA4hrJzIZOloKfh1vdO7zI",
"type": "transaction",
"attributes": {
"createdAt": "2023-02-14T20:08:14.251Z",
"createdBy": "client",
"effectiveDate": "2023-02-15",
"amount": "50000000",
"source": "id:allc:2Lk6BULuJbywUzTgl5ALiNxY4RK",
"destination": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"status": "pending",
"assetType": "asset:eth:USDC"
},
"relationships": {
"source": {
"links": {
"self": "/transactions/id:trxn:2LkBeEA4hrJzIZOloKfh1vdO7zI/relationships/source",
"related": "/transactions/id:trxn:2LkBeEA4hrJzIZOloKfh1vdO7zI/source"
},
"data": {
"id": "id:allc:2Lk6BULuJbywUzTgl5ALiNxY4RK",
"type": "allocation"
}
},
"destination": {
"links": {
"self": "/transactions/id:trxn:2LkBeEA4hrJzIZOloKfh1vdO7zI/relationships/destination",
"related": "/transactions/id:trxn:2LkBeEA4hrJzIZOloKfh1vdO7zI/destination"
},
"data": {
"id": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"type": "allocation"
}
},
"quote": {
"links": {
"self": "/transactions/id:trxn:2LkBeEA4hrJzIZOloKfh1vdO7zI/relationships/quote",
"related": "/transactions/id:trxn:2LkBeEA4hrJzIZOloKfh1vdO7zI/quote"
},
"data": null
}
}
}
}
Check Account
Now that you've successfully withdrawn funds from the pool, you'll be able to query your account to see the updates.
1. Make a GET
request to https://sandbox.conduit.financial/accounts/id:acct:{your_account_id}
with your account id
.
2. If successful, you will see a response from the API that shows the fake_compound_usdc
decreased by the withdrawn amount and the balance of the default_pool_usdc
increased by that same amount.
{
"data": {
"id": "id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao",
"type": "account",
"attributes": {
"balances": {
"available": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "5000000000000"
}
],
"pending": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
]
}
},
"relationships": {
"account-holders": {
"links": {
"self": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/relationships/account-holders",
"related": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/account-holders"
},
"data": [
{
"id": "id:ahl:2Lk4JynavffsZLROgaFDEtQIghr",
"type": "account-holder"
}
]
},
"allocations": {
"links": {
"self": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/relationships/allocations",
"first": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/relationships/allocations",
"next": null,
"related": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/allocations"
},
"data": [
{
"id": "id:allc:2Lk6BULuJbywUzTgl5ALiNxY4RK",
"type": "allocation"
},
{
"id": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"type": "allocation"
}
]
},
"wallets": {
"links": {
"self": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/relationships/wallets",
"related": "/accounts/id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao/wallets"
},
"data": [
{
"id": "id:wlt:2Lk4Qfki8Su5WwdceWZYp5HgQ9D",
"type": "wallet"
}
]
}
}
},
"included": [
{
"id": "id:allc:2Lk6BULuJbywUzTgl5ALiNxY4RK",
"type": "allocation",
"attributes": {
"effectiveYieldRate": "148",
"conduitTakeRate": "16",
"clientTakeRate": "0",
"poolId": "id:pool:2KYg17dERdA0gSkXh8sG8DPhfEI",
"poolYieldRate": "164",
"accountId": "id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao",
"poolName": "fake_compound_usdc",
"balances": {
"available": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "50000000"
}
],
"pending": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
],
"accruedYield": [
{
"assetType": "asset:eth:USDC",
"amount": "6132"
}
]
}
}
},
{
"id": "id:allc:2Lk4LkfA0D7510YTlQgOXRdJkVr",
"type": "allocation",
"attributes": {
"effectiveYieldRate": "0",
"conduitTakeRate": "20",
"clientTakeRate": "0",
"poolId": "id:pool:2H1E3EPxcafvzFKOyoLUwO2PfcK",
"poolYieldRate": "0",
"accountId": "id:acct:2Lk4Lcb4TznKfArqEsFf0yDV2ao",
"poolName": "default_pool_usdc",
"balances": {
"available": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "4999950000000"
}
],
"pending": [
{
"assetType": "asset:eth:ETH",
"amount": "0"
},
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
],
"accruedYield": [
{
"assetType": "asset:eth:USDC",
"amount": "0"
}
]
}
}
},
{
"id": "id:wlt:2Lk4Qfki8Su5WwdceWZYp5HgQ9D",
"type": "wallet",
"attributes": {
"address": "wlt:eth:0x2cc69b52e2820893160d99ebef68adf217ecbed1",
"assetType": "asset:eth:USDC",
"networkId": "net:eth:ropsten",
"function": "deposit"
}
}
]
}