BullaInvoiceFeeData

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

class BullaInvoiceFeeData

Bases: object

Bulla’s per-invoice fee terms, including the underwriter spread.

The verified V2.1 approvedInvoices(uint256) getter returns a nested FeeParams tuple containing the target-yield, spread, upfront, protocol and administrator rates. The struct is documented in the verified BullaFactoringV2_1 source.

This is intentionally separate from BullaFeeData: a pool can have many invoices with different underwriter spreads, so there is no truthful aggregate percentage to inject into generic vault fee metadata.

Attributes summary

invoice_id

Bulla Claim invoice identifier supplied to approvedInvoices.

approved

Whether the underwriter has approved this invoice for funding.

target_yield_bps

Base liquidity-provider return target in basis points; not a fee.

underwriter_spread_bps

Underwriter-selected invoice spread in basis points.

upfront_bps

Maximum creditor upfront funding percentage in basis points; not a fee.

protocol_fee_bps

Protocol fee copied into the immutable invoice approval in basis points.

admin_fee_bps

Administrator fee copied into the immutable invoice approval in basis points.

protocol_fee_amount

Protocol fee amount reserved when this invoice was funded, in asset units.

underwriter_spread

Return the invoice-specific spread as a fractional percentage.

Methods summary

__init__(invoice_id, approved, ...)

fetch(vault, invoice_id, block_identifier)

Fetch one invoice's native Bulla fee parameters.

invoice_id: int

Bulla Claim invoice identifier supplied to approvedInvoices.

approved: bool

Whether the underwriter has approved this invoice for funding.

target_yield_bps: int

Base liquidity-provider return target in basis points; not a fee.

underwriter_spread_bps: int

Underwriter-selected invoice spread in basis points.

upfront_bps: int

Maximum creditor upfront funding percentage in basis points; not a fee.

protocol_fee_bps: int

Protocol fee copied into the immutable invoice approval in basis points.

admin_fee_bps: int

Administrator fee copied into the immutable invoice approval in basis points.

protocol_fee_amount: decimal.Decimal

Protocol fee amount reserved when this invoice was funded, in asset units.

property underwriter_spread: float

Return the invoice-specific spread as a fractional percentage.

Returns

For example, 0.015 for a 150 basis point spread.

classmethod fetch(vault, invoice_id, block_identifier)

Fetch one invoice’s native Bulla fee parameters.

approvedInvoices is a Solidity public-mapping getter. Its return tuple is decoded from the verified V2.1 ABI rather than a hand-written contract ABI file. The field order below follows the explorer ABI: 11 scalar approval fields, a five-value FeeParams tuple, then the pre-calculated per-second interest rate. Only the fee-related values are retained in this focused data class.

Parameters
  • vault (eth_defi.erc_4626.vault_protocol.bulla.vault.BullaVault) – Bulla vault holding the invoice approval mapping.

  • invoice_id (int) – Bulla Claim invoice identifier.

  • 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 at which to read the record.

Returns

Invoice-level Bulla fee record, including the underwriter spread.

Return type

eth_defi.erc_4626.vault_protocol.bulla.vault.BullaInvoiceFeeData

__init__(invoice_id, approved, target_yield_bps, underwriter_spread_bps, upfront_bps, protocol_fee_bps, admin_fee_bps, protocol_fee_amount)
Parameters
  • invoice_id (int) –

  • approved (bool) –

  • target_yield_bps (int) –

  • underwriter_spread_bps (int) –

  • upfront_bps (int) –

  • protocol_fee_bps (int) –

  • admin_fee_bps (int) –

  • protocol_fee_amount (decimal.Decimal) –

Return type

None