FeeData

Documentation for eth_defi.vault.fee.FeeData Python class.

class FeeData

Bases: object

Track vault fee parameters

  • Offer methods to calculate gross/net fees based on the vault fee mode

  • None means fee unknown: protocol not recognized, or fee data not available

How fees are presented:

  • Gross fees are what vaults track internally. They are not exposed to an investor, and only useful for internal profit calculations of the vault. Gross fees have already been deducted when the vault share price is updated.

  • Net fees are deduced at a redemption. A vault investor receives less than the value of their shares back.

  • For comparing the profitability of vaults, you need to reduce the net fees of an investment period from the vault share price.

  • Common vault fee mechanisms implementations are: externalised (net fees, deducted from an investor at a redemption),

    skimming (redirected from profits at the time of trade) and minting (new shares minted to the vault owner at the time of trade).

Attributes summary

internalised

fee_mode

Determines is the vault share price is fees-net or fees-gross

management

Fee for this class

performance

Fee for this class

deposit

Fee for this class

withdraw

Fee for this class

Methods summary

__init__(fee_mode, management, performance, ...)

can_calculate_investor_net_performance()

Check whether fee data is sufficient for investor net-return calculations.

get_net_fees()

Get net fees paid by the user on deposit/withdraw.

fee_mode: Optional[eth_defi.vault.fee.VaultFeeMode]

Determines is the vault share price is fees-net or fees-gross

management: Optional[float]

Fee for this class

performance: Optional[float]

Fee for this class

deposit: Optional[float]

Fee for this class

withdraw: Optional[float]

Fee for this class

get_net_fees()

Get net fees paid by the user on deposit/withdraw.

  • Determined by the vault fee mode

Return type

eth_defi.vault.fee.FeeData

can_calculate_investor_net_performance()

Check whether fee data is sufficient for investor net-return calculations.

Net return calculations require a known fee mode and every fee that can affect an investor’s deposit-to-redemption return. In particular, unknown values must not be treated as zero fees.

Returns

True when the fee mode and all investor-facing fees are known.

Return type

bool

__init__(fee_mode, management, performance, deposit, withdraw)
Parameters
Return type

None