Third-Party Integration

This page provides a comprehensive guide for third-party integrators to correctly query and compute Renzo Protocol’s Total Value Locked (TVL) and ezETH exchange rate on-chain. Renzo’s TVL spans multiple layers including assets held in protocol contracts, value staked in EigenLayer, and validator balances on the Beacon Chain.

Fetching Protocol TVL

The RestakeManager Contract contains the logic to calculate all TVL of the protocol. This includes all value residing in contracts on chain, all value staked in EigenLayer, and all value on the Beacon Chain.

The main function to query is “calculateTVLs()”. This function returns Individual Operator Delegator TVLs, split by token, total TVL per Operator Delegator, and total TVL in the protocol. The 3 parameter returned is the full protocol TVL, denominated in ETH value.

This total TVL can then be used to derive the Exchange Rate of ezETH by querying the ezETH totalSupply() from the token contract and dividing it.

Exchange Rate = Total TVL / ezETH Total Supply

Note: The calculateTVLs() function is not guaranteed to succeed. Under low probability scenarios, this function could revert. Third parties should ensure integrations do not catch an error and continue logic with invalid data.

Last updated