BullaFeeData

Documentation for eth_defi.erc_4626.vault_protocol.bulla.vault.BullaFeeData Python class.

class BullaFeeData

Bases: object

Bulla 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 spreadBps deliberately does not appear here: it is selected per approved invoice, rather than configured as a pool-wide getter. Use BullaInvoiceFeeData for that native invoice record. Likewise, target_yield_bps is an investment return target, not a fee. It is retained so applications cannot confuse it with the administrator or underwriter charge.

Attributes summary

block_identifier

Block at which every value in this snapshot was read.

protocol_fee_bps

Protocol fee rate in basis points from protocolFeeBps().

admin_fee_bps

Administrator fee rate in basis points from adminFeeBps().

protocol_fee_balance

Amount currently accrued for the protocol in denomination-token units.

admin_fee_balance

Amount currently accrued for the administrator in denomination-token units.

target_yield_bps

Pool-wide target investor yield in basis points from targetYieldBps().

admin_fee

Return the time-prorated administrator fee as a fractional percentage.

protocol_fee

Return the one-off protocol fee as a fractional percentage.

target_yield

Return the pool's target yield as a fractional percentage.

Methods summary

__init__(block_identifier, protocol_fee_bps, ...)

as_generic_fee_data()

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.003 for a 30 basis point protocol fee.

property admin_fee: float

Return the time-prorated administrator fee as a fractional percentage.

Returns

For example, 0.01 for a 100 basis point annualised rate.

property target_yield: float

Return the pool’s target yield as a fractional percentage.

Returns

For example, 0.08 for an 800 basis point target yield.

as_generic_fee_data()

Map Bulla fees to the shared schema as internalised skimming.

adminFeeBps is 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’s spreadBps are 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 in FeeData.

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 to incrementProfitAndFeeBalances(). That helper records the admin fee and spread in adminFeeBalance but adds only the LP’s net interest to paidInvoicesGain. calculateCapitalAccount() then derives the capital account from deposits, paidInvoicesGain and withdrawals; ERC-4626 previewRedeem() and previewWithdraw() 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 in management; the unsupported performance, deposit and withdrawal fee fields are known to be zero. Call fetch_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

eth_defi.vault.fee.FeeData

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

eth_defi.erc_4626.vault_protocol.bulla.vault.BullaFeeData

__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