BullaFeeData
Documentation for eth_defi.erc_4626.vault_protocol.bulla.vault.BullaFeeData Python class.
- class BullaFeeData
Bases:
objectBulla Factoring pool fees in the protocol’s native representation.
Bulla has two pool-wide fee rates and two corresponding accrued token balances. The protocol rate is withheld when an invoice is funded, while the administrator rate is time-prorated as part of the invoice fee calculation. The public source explains that calculation in FeeCalculations.sol.
The underwriter’s
spreadBpsdeliberately does not appear here: it is selected per approved invoice, rather than configured as a pool-wide getter. UseBullaInvoiceFeeDatafor that native invoice record. Likewise,target_yield_bpsis an investment return target, not a fee. It is retained so applications cannot confuse it with the administrator or underwriter charge.Attributes summary
Block at which every value in this snapshot was read.
Protocol fee rate in basis points from
protocolFeeBps().Administrator fee rate in basis points from
adminFeeBps().Amount currently accrued for the protocol in denomination-token units.
Amount currently accrued for the administrator in denomination-token units.
Pool-wide target investor yield in basis points from
targetYieldBps().Return the time-prorated administrator fee as a fractional percentage.
Return the one-off protocol fee as a fractional percentage.
Return the pool's target yield as a fractional percentage.
Methods summary
__init__(block_identifier, protocol_fee_bps, ...)Map Bulla fees to the shared schema as internalised skimming.
fetch(vault, block_identifier)Fetch every pool-wide Bulla V2.1 fee value in one coherent snapshot.
- 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 every value in this snapshot was read.
- protocol_fee_bps: int
Protocol fee rate in basis points from
protocolFeeBps().The contract takes this amount off the top when it funds an invoice and earmarks it for the Bulla DAO; it is not an annual management fee.
- admin_fee_bps: int
Administrator fee rate in basis points from
adminFeeBps().FeeCalculations.calculateFees()prorates this rate over an invoice’s financing period. It is therefore the closest available counterpart to the shared annual management-fee field.
- protocol_fee_balance: decimal.Decimal
Amount currently accrued for the protocol in denomination-token units.
This is
protocolFeeBalance()after token-decimal conversion, not a fee rate and not necessarily an amount immediately withdrawable by a LP.
- admin_fee_balance: decimal.Decimal
Amount currently accrued for the administrator in denomination-token units.
Bulla adds realised administrator fees and invoice-level underwriter spreads to this balance, so it must not be interpreted as admin fees alone.
- target_yield_bps: int
Pool-wide target investor yield in basis points from
targetYieldBps().This is included as Bulla-native fee context only; it does not map to a generic fee field because it is a target return for liquidity providers.
- property protocol_fee: float
Return the one-off protocol fee as a fractional percentage.
- Returns
For example,
0.003for a 30 basis point protocol fee.
- property admin_fee: float
Return the time-prorated administrator fee as a fractional percentage.
- Returns
For example,
0.01for a 100 basis point annualised rate.
- property target_yield: float
Return the pool’s target yield as a fractional percentage.
- Returns
For example,
0.08for an 800 basis point target yield.
- as_generic_fee_data()
Map Bulla fees to the shared schema as internalised skimming.
adminFeeBpsis time-prorated over invoice financing and is the only pool-level rate with the same shape as a generic management fee. The protocol fee and the underwriter’sspreadBpsare financing terms, not LP entry, exit or vault performance fees. The spread is also set separately for each approved invoice, so it has no truthful pool-wide percentage to place inFeeData.Bulla accounts for these charges before calculating the value backing LP shares. In the verified V2.1 implementation,
reconcileSingleInvoice()passes realised interest, admin fee and underwriter spread toincrementProfitAndFeeBalances(). That helper records the admin fee and spread inadminFeeBalancebut adds only the LP’s net interest topaidInvoicesGain.calculateCapitalAccount()then derives the capital account from deposits,paidInvoicesGainand withdrawals; ERC-4626previewRedeem()andpreviewWithdraw()use that capital account. Thus the fee amounts are already excluded from the amount supporting shares, rather than deducted at redemption.The protocol fee follows the same investor-facing pattern: Bulla reserves it when funding an invoice and tracks it in
protocolFeeBalance. It is not an ERC-4626 deposit or withdrawal charge. See the verified BullaFactoringV2_1 source and FeeCalculations.sol.Therefore the generic record uses
internalised_skimming. The known administrator rate remains inmanagement; the unsupported performance, deposit and withdrawal fee fields are known to be zero. Callfetch_bulla_invoice_fee_data()when native protocol-fee or invoice-spread detail is required.- Returns
Generic fee record for Bulla’s fees-net share value.
- Return type
- classmethod fetch(vault, block_identifier)
Fetch every pool-wide Bulla V2.1 fee value in one coherent snapshot.
Only stable, zero-argument view selectors are used instead of copying the large explorer ABI. The verified V2.1 source declares the five getters used here: BullaFactoringV2_1 on Arbiscan.
- Parameters
vault (eth_defi.erc_4626.vault_protocol.bulla.vault.BullaVault) – Bulla vault from which to read the configuration.
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) – Block tag or number shared by all calls.
- Returns
Pool-wide Bulla rates, balances and yield target.
- Return type
- __init__(block_identifier, protocol_fee_bps, admin_fee_bps, protocol_fee_balance, admin_fee_balance, target_yield_bps)
- Parameters
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) –
protocol_fee_bps (int) –
admin_fee_bps (int) –
protocol_fee_balance (decimal.Decimal) –
admin_fee_balance (decimal.Decimal) –
target_yield_bps (int) –
- Return type
None