IAaveVault
Author: Quantillon Labs - Nicolas Bellengé - @chewbaccoin
Interface for the AaveVault (Aave V3 USDC yield vault)
Mirrors the external/public API of src/core/vaults/AaveVault.sol
Note: security-contact: team@quantillon.money
Functions
initialize
Initializes the Aave vault
Initializes the AaveVault contract with required addresses
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function initialize(
address admin,
address _usdc,
address _aaveProvider,
address _rewardsController,
address _yieldShift,
address _timelock,
address _treasury
) external;
Parameters
| Name | Type | Description |
|---|---|---|
admin | address | Admin address |
_usdc | address | USDC token address |
_aaveProvider | address | Aave PoolAddressesProvider |
_rewardsController | address | Aave RewardsController address |
_yieldShift | address | YieldShift contract address |
_timelock | address | Timelock contract address |
_treasury | address | Treasury address |
deployToAave
Deploy USDC to Aave V3 pool to earn yield
Deploys USDC to Aave V3 pool to earn yield
Notes:
-
security: Validates oracle price freshness, enforces exposure limits
-
validation: Validates amount > 0, checks max exposure limits
-
state-changes: Updates principalDeposited, transfers USDC, receives aUSDC
-
events: Emits DeployedToAave with operation details
-
errors: Throws WouldExceedLimit if exceeds maxAaveExposure
-
reentrancy: Protected by nonReentrant modifier
-
access: Restricted to VAULT_MANAGER_ROLE
-
oracle: Requires fresh EUR/USD price for health validation
function deployToAave(uint256 amount) external returns (uint256 aTokensReceived);
Parameters
| Name | Type | Description |
|---|---|---|
amount | uint256 | USDC amount to supply (6 decimals) |
Returns
| Name | Type | Description |
|---|---|---|
aTokensReceived | uint256 | Amount of aUSDC received (6 decimals) |
withdrawFromAave
Withdraw USDC from Aave V3 pool
Withdraws USDC from Aave V3 pool
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function withdrawFromAave(uint256 amount) external returns (uint256 usdcWithdrawn);
Parameters
| Name | Type | Description |
|---|---|---|
amount | uint256 | Amount of aUSDC to withdraw (use type(uint256).max for all) |
Returns
| Name | Type | Description |
|---|---|---|
usdcWithdrawn | uint256 | Amount of USDC actually withdrawn |
claimAaveRewards
Claim Aave rewards (if any)
Claims Aave rewards if any are available
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function claimAaveRewards() external returns (uint256 rewardsClaimed);
Returns
| Name | Type | Description |
|---|---|---|
rewardsClaimed | uint256 | Claimed reward amount |
harvestAaveYield
Harvest Aave yield and distribute via YieldShift
This function calls YieldShift.harvestAndDistributeAaveYield() to handle distribution
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function harvestAaveYield() external returns (uint256 yieldHarvested);
Returns
| Name | Type | Description |
|---|---|---|
yieldHarvested | uint256 | Amount harvested |
getAvailableYield
Calculate available yield for harvest
Calculates the amount of yield available for harvest
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getAvailableYield() external view returns (uint256 available);
Returns
| Name | Type | Description |
|---|---|---|
available | uint256 | Amount of yield available |
getYieldDistribution
Get yield distribution breakdown for current state
Returns the breakdown of yield distribution for current state
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getYieldDistribution()
external
view
returns (uint256 protocolYield, uint256 userYield, uint256 hedgerYield);
Returns
| Name | Type | Description |
|---|---|---|
protocolYield | uint256 | Protocol fee portion |
userYield | uint256 | Allocation to users |
hedgerYield | uint256 | Allocation to hedgers |
getAaveBalance
Current aUSDC balance of the vault
Returns the current aUSDC balance of the vault
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getAaveBalance() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The current aUSDC balance |
getAccruedInterest
Accrued interest (same as available yield)
Returns the accrued interest (same as available yield)
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getAccruedInterest() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The accrued interest amount |
getAaveAPY
Current Aave APY in basis points
Returns the current Aave APY in basis points
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getAaveAPY() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 Current APY in basis points |
getAavePositionDetails
Aave position details snapshot
Returns a snapshot of Aave position details
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getAavePositionDetails()
external
view
returns (uint256 principalDeposited_, uint256 currentBalance, uint256 aTokenBalance, uint256 lastUpdateTime);
Returns
| Name | Type | Description |
|---|---|---|
principalDeposited_ | uint256 | Principal USDC supplied |
currentBalance | uint256 | Current aUSDC balance (1:1 underlying + interest) |
aTokenBalance | uint256 | Alias for aUSDC balance |
lastUpdateTime | uint256 | Timestamp of last harvest |
getAaveMarketData
Aave market data snapshot
Returns Aave market data snapshot
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getAaveMarketData()
external
view
returns (uint256 supplyRate, uint256 utilizationRate, uint256 totalSupply, uint256 availableLiquidity);
Returns
| Name | Type | Description |
|---|---|---|
supplyRate | uint256 | Current supply rate (bps) |
utilizationRate | uint256 | Utilization rate (bps) |
totalSupply | uint256 | USDC total supply |
availableLiquidity | uint256 | Available USDC liquidity in Aave pool |
checkAaveHealth
Basic Aave pool health and pause state
Returns basic Aave pool health and pause state
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function checkAaveHealth() external view returns (bool isHealthy, bool pauseStatus, uint256 lastUpdate);
Returns
| Name | Type | Description |
|---|---|---|
isHealthy | bool | True if pool considered healthy |
pauseStatus | bool | Whether vault is paused |
lastUpdate | uint256 | Last harvest time |
autoRebalance
Attempt auto-rebalancing allocation
Automatically rebalances allocation based on current market conditions and yield opportunities
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function autoRebalance() external returns (bool rebalanced, uint256 newAllocation);
Returns
| Name | Type | Description |
|---|---|---|
rebalanced | bool | Whether a rebalance decision was made |
newAllocation | uint256 | New target allocation (bps) |
calculateOptimalAllocation
Compute optimal allocation and expected yield
Calculates the optimal allocation percentage and expected yield based on current market conditions
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function calculateOptimalAllocation() external view returns (uint256 optimalAllocation, uint256 expectedYield);
Returns
| Name | Type | Description |
|---|---|---|
optimalAllocation | uint256 | Target allocation (bps) |
expectedYield | uint256 | Expected yield proxy |
setMaxAaveExposure
Update max exposure to Aave
Sets the maximum USDC exposure limit for Aave protocol interactions
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function setMaxAaveExposure(uint256 _maxExposure) external;
Parameters
| Name | Type | Description |
|---|---|---|
_maxExposure | uint256 | New max USDC exposure |
emergencyWithdrawFromAave
Emergency: withdraw all from Aave
Emergency function to withdraw all funds from Aave protocol in case of emergency
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function emergencyWithdrawFromAave() external returns (uint256 amountWithdrawn);
Returns
| Name | Type | Description |
|---|---|---|
amountWithdrawn | uint256 | Amount withdrawn |
getRiskMetrics
Risk metrics snapshot
Returns current risk metrics including exposure ratio and risk scores
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getRiskMetrics()
external
view
returns (uint256 exposureRatio, uint256 concentrationRisk, uint256 liquidityRisk);
Returns
| Name | Type | Description |
|---|---|---|
exposureRatio | uint256 | % of assets in Aave (bps) |
concentrationRisk | uint256 | Heuristic risk score (1-3) |
liquidityRisk | uint256 | Heuristic risk score (1-3) |
updateAaveParameters
Update vault parameters
Updates key vault parameters including harvest threshold, yield fee, and rebalance threshold
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function updateAaveParameters(uint256 newHarvestThreshold, uint256 newYieldFee, uint256 newRebalanceThreshold)
external;
Parameters
| Name | Type | Description |
|---|---|---|
newHarvestThreshold | uint256 | Min yield to harvest |
newYieldFee | uint256 | Protocol fee on yield (bps) |
newRebalanceThreshold | uint256 | Rebalance threshold (bps) |
getAaveConfig
Aave config snapshot
Returns current Aave configuration including pool address, token address, and key parameters
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getAaveConfig()
external
view
returns (address aavePool_, address aUSDC_, uint256 harvestThreshold_, uint256 yieldFee_, uint256 maxExposure_);
Returns
| Name | Type | Description |
|---|---|---|
aavePool_ | address | Aave Pool address |
aUSDC_ | address | aUSDC token address |
harvestThreshold_ | uint256 | Current harvest threshold |
yieldFee_ | uint256 | Current yield fee (bps) |
maxExposure_ | uint256 | Max Aave exposure |
toggleEmergencyMode
Toggle emergency mode
Enables or disables emergency mode with a reason for the action
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function toggleEmergencyMode(bool enabled, string calldata reason) external;
Parameters
| Name | Type | Description |
|---|---|---|
enabled | bool | New emergency flag |
reason | string | Reason string |
pause
Pause the vault
Pauses all vault operations for emergency situations
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function pause() external;
unpause
Unpause the vault
Resumes vault operations after being paused
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function unpause() external;
recoverToken
Recover ERC20 tokens sent by mistake
Allows recovery of ERC20 tokens accidentally sent to the contract
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function recoverToken(address token, uint256 amount) external;
Parameters
| Name | Type | Description |
|---|---|---|
token | address | Token address |
amount | uint256 | Amount to transfer |
recoverETH
Recover ETH sent by mistake
Allows recovery of ETH accidentally sent to the contract
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function recoverETH() external;
hasRole
Check if an account has a specific role
Returns true if the account has the specified role
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function hasRole(bytes32 role, address account) external view returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
role | bytes32 | The role to check |
account | address | The account to check |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | bool True if the account has the role, false otherwise |
getRoleAdmin
Get the admin role for a specific role
Returns the admin role that controls the specified role
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function getRoleAdmin(bytes32 role) external view returns (bytes32);
Parameters
| Name | Type | Description |
|---|---|---|
role | bytes32 | The role to get the admin for |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | bytes32 The admin role |
grantRole
Grant a role to an account
Grants the specified role to the account
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function grantRole(bytes32 role, address account) external;
Parameters
| Name | Type | Description |
|---|---|---|
role | bytes32 | The role to grant |
account | address | The account to grant the role to |
revokeRole
Revoke a role from an account
Revokes the specified role from the account
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function revokeRole(bytes32 role, address account) external;
Parameters
| Name | Type | Description |
|---|---|---|
role | bytes32 | The role to revoke |
account | address | The account to revoke the role from |
renounceRole
Renounce a role
Renounces the specified role from the caller
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function renounceRole(bytes32 role, address callerConfirmation) external;
Parameters
| Name | Type | Description |
|---|---|---|
role | bytes32 | The role to renounce |
callerConfirmation | address | Confirmation that the caller is renouncing the role |
paused
Check if the contract is paused
Returns true if the contract is paused, false otherwise
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function paused() external view returns (bool);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | bool True if paused, false otherwise |
upgradeTo
Upgrade the contract implementation
Upgrades the contract to a new implementation
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function upgradeTo(address newImplementation) external;
Parameters
| Name | Type | Description |
|---|---|---|
newImplementation | address | Address of the new implementation |
upgradeToAndCall
Upgrade the contract implementation and call a function
Upgrades the contract to a new implementation and calls a function
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function upgradeToAndCall(address newImplementation, bytes memory data) external payable;
Parameters
| Name | Type | Description |
|---|---|---|
newImplementation | address | Address of the new implementation |
data | bytes | Data to call on the new implementation |
GOVERNANCE_ROLE
Get the governance role identifier
Returns the governance role identifier
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function GOVERNANCE_ROLE() external view returns (bytes32);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | bytes32 The governance role identifier |
VAULT_MANAGER_ROLE
Get the vault manager role identifier
Returns the vault manager role identifier
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function VAULT_MANAGER_ROLE() external view returns (bytes32);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | bytes32 The vault manager role identifier |
EMERGENCY_ROLE
Get the emergency role identifier
Returns the emergency role identifier
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function EMERGENCY_ROLE() external view returns (bytes32);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | bytes32 The emergency role identifier |
UPGRADER_ROLE
Get the upgrader role identifier
Returns the upgrader role identifier
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function UPGRADER_ROLE() external view returns (bytes32);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | bytes32 The upgrader role identifier |
usdc
Get the USDC token address
Returns the address of the USDC token contract
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function usdc() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | address The USDC token address |
aUSDC
Get the aUSDC token address
Returns the address of the aUSDC token contract
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function aUSDC() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | address The aUSDC token address |
aavePool
Get the Aave pool address
Returns the address of the Aave pool contract
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function aavePool() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | address The Aave pool address |
aaveProvider
Get the Aave provider address
Returns the address of the Aave provider contract
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function aaveProvider() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | address The Aave provider address |
rewardsController
Get the rewards controller address
Returns the address of the rewards controller contract
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function rewardsController() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | address The rewards controller address |
yieldShift
Get the yield shift address
Returns the address of the yield shift contract
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function yieldShift() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | address The yield shift address |
maxAaveExposure
Get the maximum Aave exposure
Returns the maximum amount that can be deposited to Aave
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function maxAaveExposure() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The maximum Aave exposure |
harvestThreshold
Get the harvest threshold
Returns the minimum amount required to trigger a harvest
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function harvestThreshold() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The harvest threshold |
yieldFee
Get the yield fee
Returns the fee percentage charged on harvested yield
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function yieldFee() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The yield fee in basis points |
rebalanceThreshold
Get the rebalance threshold
Returns the threshold for triggering rebalancing
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function rebalanceThreshold() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The rebalance threshold |
principalDeposited
Get the principal deposited amount
Returns the total amount of principal deposited to Aave
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function principalDeposited() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The principal deposited amount |
lastHarvestTime
Get the last harvest time
Returns the timestamp of the last harvest
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function lastHarvestTime() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The last harvest time |
totalYieldHarvested
Get the total yield harvested
Returns the total amount of yield harvested from Aave
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function totalYieldHarvested() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The total yield harvested |
totalFeesCollected
Get the total fees collected
Returns the total amount of fees collected
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function totalFeesCollected() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The total fees collected |
utilizationLimit
Get the utilization limit
Returns the maximum utilization rate allowed
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function utilizationLimit() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The utilization limit |
emergencyExitThreshold
Get the emergency exit threshold
Returns the threshold for triggering emergency exit
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function emergencyExitThreshold() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | uint256 The emergency exit threshold |
emergencyMode
Get the emergency mode status
Returns true if the contract is in emergency mode
Notes:
-
security: Validates input parameters and enforces security checks
-
validation: Validates input parameters and business logic constraints
-
state-changes: Updates contract state variables
-
events: Emits relevant events for state changes
-
errors: Throws custom errors for invalid conditions
-
reentrancy: Protected by reentrancy guard
-
access: Restricted to authorized roles
-
oracle: Requires fresh oracle price data
function emergencyMode() external view returns (bool);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | bool True if in emergency mode, false otherwise |