Overview
TheITumblerV3 interface provides functionality for managing quota interest rates for multiple tokens. It serves as a rate keeper that can update rates periodically based on epochs and communicates with the pool quota keeper to apply these rates.
View Functions
underlying
The underlying token address
poolQuotaKeeper
The pool quota keeper contract address
epochLength
The epoch length in seconds
Epochs are used to determine when rate updates should occur.
getTokens
Array of token addresses
getRates
Array of token addresses to query
Array of quota interest rates in basis points per year, corresponding to the input tokens
State-Changing Functions
setRate
The address of the token
The new quota interest rate in basis points per year
This function is typically restricted to authorized administrators.
updateRates
This function is typically called periodically at the end of each epoch to synchronize rates with the pool quota keeper.
Events
AddToken
The address of the newly added token
SetRate
The address of the token
The new quota interest rate in basis points per year
Inherited Interfaces
IRateKeeper
The tumbler implements theIRateKeeper interface, which provides the core rate management functionality.
IACLTrait
The tumbler implements theIACLTrait interface for access control, ensuring only authorized addresses can modify rates and configuration.
Usage Example
The tumbler is typically used in the following workflow:- Administrator sets quota rates for tokens using
setRate - At the end of each epoch,
updateRatesis called to synchronize rates with the pool quota keeper - The pool quota keeper applies these rates when calculating quota interest for credit accounts
Rates are expressed in basis points per year. For example, a rate of 500 represents 5% annual interest.