Overview
TumblerV3 is a simplified version of the GaugeV3 contract that allows configurators to set quota rates directly without requiring voting. Instead of relying on user votes to determine quota rates, TumblerV3 provides direct admin control with configurable epoch lengths. This contract is useful for pools where centralized rate management is preferred over decentralized governance, offering a more streamlined approach to quota rate adjustments.Unlike GaugeV3 which uses community voting, TumblerV3 allows configurators to set rates directly, making it ideal for pools that require quick rate adjustments or don’t need decentralized governance.
Contract Details
Version and Type
Immutable Properties
Pool whose quota rates are set by this contract
Pool’s underlying token
Pool’s quota keeper. Stored as immutable because replacing the tumbler is simple since there are no user votes to migrate
Epoch length in seconds. Minimum time that must pass between rate updates
Constructor
Pool whose rates to set by this contract
Epoch length in seconds. Must not exceed
MAX_SANE_EPOCH_LENGTHView Functions
getTokens
- Array of token addresses
getRates
Array of token addresses to get rates for
- Array of rates corresponding to the input tokens
isTokenAdded
Token address to check
trueif token is added,falseotherwise
serialize
- ABI-encoded tuple of
(epochLength, tokens, rates)
State-Changing Functions
addToken
Token address to add
ZeroAddressExceptionif token is zero addressTokenNotAllowedExceptionif token is the pool’s underlying or already added
setRate
Token address to set rate for
New quota rate (must be non-zero)
TokenIsNotQuotedExceptionif token is not addedIncorrectParameterExceptionif rate is zero
updateRates
This function silently returns if called before the epoch length has elapsed since the last update.
Events
AddToken
Address of the added token
SetRate
Address of the token
New quota rate
Tumbler vs Gauge
When deciding between TumblerV3 and GaugeV3, consider the following:Use Tumbler When:
- You need centralized control over quota rates
- Quick rate adjustments are important
- The pool doesn’t require decentralized governance
- You want to avoid the complexity of vote management
- Migration scenarios are expected (no user votes to move)
Use Gauge When:
- Community governance is preferred
- Token holders should influence quota rates
- Decentralized decision-making aligns with your protocol’s values
- You want to distribute control among stakeholders
TumblerV3’s quota keeper is immutable, unlike GaugeV3. This design choice is intentional because replacing a tumbler is simple when there are no user votes to migrate.