API Reference

Get Kelp Effective Balances

Method Name

public/get_kelp_effective_balances

Get all effective rsETH balances for a specific block number for a given number of addresses.

Here is the flow of rsETH:
1. Users deposit rsETH into one of several bridges (ARB, ETH)
2. This rsETH is minted to a single contract on the Derive chain
3. A socket bridge hook deposits this rsETH into a Derive Vault which mints shares
4. Those shares are bridged back to the source chain in the form of rsETH-C

To calculate the effective rsETH balances that users have in our vaults, we need to:
1. total_deposits: the total amount of rsETH deposited by users across all chains
2. user_shares: count how many rsETH-C shares are held across chains
3. Filter out users that have not registered with the orderbook
4. effective_balance: user_shares / total_shares * total_deposits

If no addresses are provided, returns all effective balances for all addresses.
NOTE: only users who have registered via derive.xyz are elligible to be tracked.
NOTE: This route cannot be tested locally

Parameters

mainnet_blocknumber integer required
The mainnet blocknumber to get the effective balances for. Effective balances on both mainnet and arbitrum will be returned.
wallets array of strings
Specify list of EOA accounts to query

Response

id string or integer required
result object required
result.mainnet_timestamp_sec integer required
The mainnet timestamp in seconds
result.blocknumbers object required
The block number used for each chain
result.effective_balances object required
The effective balance for each wallet address
result.total_deposits object required
The total deposits for each chain

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}