Expand description
The pallet module in each FRAME pallet hosts the most important items needed
to construct this pallet.
The main components of this pallet are:
- Pallet, which implements all of the dispatchable extrinsics of the pallet, among other public functions.- The subset of the functions that are dispatchable can be identified either in the
dispatchablesmodule or in theCallenum.
 
- The subset of the functions that are dispatchable can be identified either in the
- storage_types, which contains the list of all types that are representing a storage item. Otherwise, all storage items are listed among Type Definitions.
- Config, which contains the configuration trait of this pallet.
- Eventand- Error, which are listed among the Enums.
Modules
- Auto-generated docs-only module listing all defined dispatchables for this pallet.
- Auto-generated docs-only module listing all (public and private) defined storage types for this pallet.
Structs
- Can be used to configure the genesis state of this pallet.
- ThePalletstruct, the main type that implements traits and standalone functions within the pallet.
Enums
- Contains a variant per dispatchable extrinsic that this pallet has.
- TheErrorenum of this pallet.
- TheEventenum of this pallet
Traits
- Configuration trait of this pallet.
Type Definitions
- Mapping of account addresses to outstanding borrow balances CurrencyId -> Owner -> BorrowSnapshot
- Mapping of account addresses to collateral deposit details CollateralType -> Owner -> Collateral Deposits
- Accumulator of the total earned interest rate since the opening of the market CurrencyId -> u128
- Mapping of borrow rate to currency type
- The internal exchange rate from the associated lend token to the underlying currency.
- The timestamp of the last calculation of accrued interest
- Mapping of underlying currency id to its market
- The maximum allowed exchange rate for a market.
- The minimum allowed exchange rate for a market. This is the starting rate when a market is first set up.
- ModuleDeprecatedType alias toPallet, to be used byconstruct_runtime.
- The incentive reward accrued but not yet transferred to each user.
- Mapping of underlying currency id to borrow reward speed
- The Reward market borrow state for each market
- The incentive reward index for each market for each borrower as of the last time they accrued Reward
- The incentive reward index for each market for each supplier as of the last time they accrued Reward
- Mapping of underlying currency id to supply reward speed
- The Reward market supply state for each market
- Mapping of supply rate to currency type
- Total amount of outstanding borrows of the underlying in this market CurrencyId -> Balance
- Total amount of reserves of the underlying held in this market CurrencyId -> Balance
- Mapping of lend_token id to underlying currency idlend_token id: voucher token idasset id: underlying token id
- Borrow utilization ratio