fetch_fraxlend_protocol_fee
Documentation for eth_defi.erc_4626.vault_protocol.frax.vault.fetch_fraxlend_protocol_fee function.
- fetch_fraxlend_protocol_fee(web3, vault_address, block_identifier)
Read a Fraxlend pair’s active share of borrower interest.
Fraxlend stores the per-pair fee in the second ABI word returned by
currentRateInfo(). The timelock may change this value independently for each pair, so callers must not substitute a protocol-wide default.https://github.com/FraxFinance/fraxlend/blob/main/src/contracts/FraxlendPairCore.sol
https://github.com/FraxFinance/fraxlend/blob/main/src/contracts/FraxlendPair.sol#L437-L451
- Parameters
web3 (web3.main.Web3) – Web3 connection for the pair’s chain.
vault_address (Union[eth_typing.evm.HexAddress, str]) – Fraxlend pair contract address.
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) – Block at which to read the active fee.
- Returns
Protocol share of borrower interest as a fraction, such as
0.09.- Raises
ValueError – If the return data does not match the reviewed Fraxlend ABI or exceeds the contract’s 50% maximum.
- Return type