Boost RPCs
RPC Parameters
Fee Tier
A 16-bit integer representing the fee in basis points charged by a boost pool.
RPC Methods
cf_boost_pools_depth
Returns a list of available (i.e. ready to be used) amounts for each boost pool.
Parameters:
at
: Block Hash (Optional) - rpc will be executed against the state of the blockchain at this block; defaults to the hash of the most recent block.
Returns:
A list of items for all existing boost pools, each with the following fields:
chain
: Chainasset
: Assettier
: Fee Tieravailable_amount
: Amount - max amount ofasset
that the pool can boost at the moment
Example
Requesting available amounts in all boost pools at latest block.
Request:
curl -H "Content-Type: application/json" -d '{
"id":1,
"jsonrpc":"2.0",
"method": "cf_boost_pools_depth",
"params": []
}' http://localhost:9944
Response:
[
{
"chain": "Ethereum",
"asset": "FLIP",
"tier": 10,
"available_amount": "0x33b2e3c9fd0803ce8000000"
},
{
"chain": "Ethereum",
"asset": "FLIP",
"tier": 30,
"available_amount": "0x0"
}
]
cf_boost_pool_details
Provides a more detailed (compared to cf_boost_pools_depth
) information about boost pools.
Specifically, in addition to the available amounts (that are broken down by accounts that
contributed to it), it exposes a list of all pending (i.e. awaiting deposit's finalisation)
boosts that the pool participated in, along with the amounts owed to each individual account
(the amount they contributed plus fee) from these boosts.
Additionally, the response exposes the accounts that no longer wish to continue boosting
and the ids of pending deposits boosted by each of them.
Parameters:
asset
: Asset (Optional): allows filtering the response by pool's asset; returns results for every asset if not provided.at
: Block Hash (Optional): rpc will be executed against the state of the blockchain at this block; defaults to the hash of the most recent block.
Returns:
A list of items for each of the queried pools, each containing the following fields:
chain
: Chainasset
: Assetfee_tier
: Fee Tieravailable_amounts
- funds contributed by each account that are available for boosting (i.e. not currently used in a pending boost), represented by a list of items containing:deposits_pending_finalization
- a list of deposits currently awaiting finalisation that the pool contributed to, each containing:pending_withdrawals
- accounts that have requested to "stop boosting", along with the deposits awaiting finalisation they have contributed to, represented by a list of items containing:account_id
: account - identifies boost pool's contributorpending_deposits
: a list of ids of pending deposits (each represented bynumber
) thataccount_id
contributed to.
Example
Requesting detailed state of each Bitcoin boost pool as of the latest block.
Request:
curl -H "Content-Type: application/json" -d '{
"id":1,
"jsonrpc":"2.0",
"method": "cf_boost_pool_details",
"params": ["BTC"]
}' http://localhost:9944
Response:
[
{
"fee_tier": 10,
"chain": "Bitcoin",
"asset": "BTC",
"available_amounts": [
{
"account_id": "5C62Ck4UrFPiBtoCmeSrgF7x9yv9mn38446dhCpsi2mLHiFT",
"amount": "0x2710"
}
],
"deposits_pending_finalization": [
{
"deposit_id": 0,
"owed_amounts": [
{
"account_id": "5C62Ck4UrFPiBtoCmeSrgF7x9yv9mn38446dhCpsi2mLHiFT",
"amount": "0xc8"
},
{
"account_id": "5C7LYpP2ZH3tpKbvVvwiVe54AapxErdPBbvkYhe6y9ZBkqWt",
"amount": "0x7d0"
}
]
},
{
"deposit_id": 1,
"owed_amounts": [
{
"account_id": "5C62Ck4UrFPiBtoCmeSrgF7x9yv9mn38446dhCpsi2mLHiFT",
"amount": "0x3e8"
}
]
}
],
"pending_withdrawals": []
},
{
"fee_tier": 30,
"chain": "Bitcoin",
"asset": "BTC",
"available_amounts": [],
"deposits_pending_finalization": [
{
"deposit_id": 0,
"owed_amounts": [
{
"account_id": "5C62Ck4UrFPiBtoCmeSrgF7x9yv9mn38446dhCpsi2mLHiFT",
"amount": "0x3e8"
},
{
"account_id": "5C7LYpP2ZH3tpKbvVvwiVe54AapxErdPBbvkYhe6y9ZBkqWt",
"amount": "0x7d0"
}
]
}
],
"pending_withdrawals": [
{
"account_id": "5C62Ck4UrFPiBtoCmeSrgF7x9yv9mn38446dhCpsi2mLHiFT",
"pending_deposits": [
0
]
},
{
"account_id": "5C7LYpP2ZH3tpKbvVvwiVe54AapxErdPBbvkYhe6y9ZBkqWt",
"pending_deposits": [
0
]
}
]
}
]
cf_boost_pool_pending_fees
Provides the amounts that each account will earn in fees from each of the currently pending boosts provided the corresponding deposits get finalised.
Parameters:
asset
: Asset (Optional): allows filtering the response by pool's asset; returns results for every asset if not provided.at
: Block Hash (Optional): rpc will be executed against the state of the blockchain at this block; defaults to the hash of the most recent block.
Returns:
A list of items each containing the following fields:
Example
Requesting fees of pending boosts from all pools as of the latest block.
Request:
curl -H "Content-Type: application/json" -d '{
"id":1,
"jsonrpc":"2.0",
"method": "cf_boost_pool_pending_fees",
"params": []
}' http://localhost:9944
Response:
[
{
"fee_tier": 10,
"chain": "Bitcoin",
"asset": "BTC",
"pending_fees": [
{
"deposit_id": 0,
"fees": [
{
"account_id": "5C62Ck4UrFPiBtoCmeSrgF7x9yv9mn38446dhCpsi2mLHiFT",
"amount": "0xa"
},
{
"account_id": "5C7LYpP2ZH3tpKbvVvwiVe54AapxErdPBbvkYhe6y9ZBkqWt",
"amount": "0x64"
}
]
},
{
"deposit_id": 1,
"fees": [
{
"account_id": "5C62Ck4UrFPiBtoCmeSrgF7x9yv9mn38446dhCpsi2mLHiFT",
"amount": "0x32"
}
]
}
]
}
]