Struct port_variable_rate_lending_instructions::state::ReserveFees[][src]

pub struct ReserveFees {
    pub borrow_fee_wad: u64,
    pub flash_loan_fee_wad: u64,
    pub host_fee_percentage: u8,
}
Expand description

Additional fee information on a reserve

These exist separately from interest accrual fees, and are specifically for the program owner and frontend host. The fees are paid out as a percentage of liquidity token amounts during repayments and liquidations.

Fields

borrow_fee_wad: u64

Fee assessed on BorrowObligationLiquidity, expressed as a Wad. Must be between 0 and 10^18, such that 10^18 = 1. A few examples for clarity: 1% = 10_000_000_000_000_000 0.01% (1 basis point) = 100_000_000_000_000 0.00001% (Aave borrow fee) = 100_000_000_000

flash_loan_fee_wad: u64

Fee for flash loan, expressed as a Wad.

host_fee_percentage: u8

Amount of fee going to host account, if provided in liquidate and repay

Implementations

Calculate the owner and host fees on borrow

Calculate the owner and host fees on flash loan

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.