HomeDocumentationAPI Reference
Log In

Get Etherfi Effective Balances

Method Name

public/get_etherfi_effective_balances

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

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

To calculate the effective weETH balances that users have in our vaults, we need to:
1. total_deposits: the total amount of weETH deposited by users across all chains
2. user_shares: count how many weETH-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

Lastly, must take into account pooling that occurs in Swell L2.

If no addresses are provided, returns all effective balances for all addresses.
NOTE: only users who have registered via lyra.finance 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}