Quantillon Protocol

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IAaveVault

Git Source

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

NameTypeDescription
adminaddressAdmin address
_usdcaddressUSDC token address
_aaveProvideraddressAave PoolAddressesProvider
_rewardsControlleraddressAave RewardsController address
_yieldShiftaddressYieldShift contract address
_timelockaddressTimelock contract address
_treasuryaddressTreasury 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

NameTypeDescription
amountuint256USDC amount to supply (6 decimals)

Returns

NameTypeDescription
aTokensReceiveduint256Amount 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

NameTypeDescription
amountuint256Amount of aUSDC to withdraw (use type(uint256).max for all)

Returns

NameTypeDescription
usdcWithdrawnuint256Amount 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

NameTypeDescription
rewardsClaimeduint256Claimed 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

NameTypeDescription
yieldHarvesteduint256Amount 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

NameTypeDescription
availableuint256Amount 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

NameTypeDescription
protocolYielduint256Protocol fee portion
userYielduint256Allocation to users
hedgerYielduint256Allocation 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
principalDeposited_uint256Principal USDC supplied
currentBalanceuint256Current aUSDC balance (1:1 underlying + interest)
aTokenBalanceuint256Alias for aUSDC balance
lastUpdateTimeuint256Timestamp 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

NameTypeDescription
supplyRateuint256Current supply rate (bps)
utilizationRateuint256Utilization rate (bps)
totalSupplyuint256USDC total supply
availableLiquidityuint256Available 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

NameTypeDescription
isHealthyboolTrue if pool considered healthy
pauseStatusboolWhether vault is paused
lastUpdateuint256Last 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

NameTypeDescription
rebalancedboolWhether a rebalance decision was made
newAllocationuint256New 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

NameTypeDescription
optimalAllocationuint256Target allocation (bps)
expectedYielduint256Expected 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

NameTypeDescription
_maxExposureuint256New 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

NameTypeDescription
amountWithdrawnuint256Amount 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

NameTypeDescription
exposureRatiouint256% of assets in Aave (bps)
concentrationRiskuint256Heuristic risk score (1-3)
liquidityRiskuint256Heuristic 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

NameTypeDescription
newHarvestThresholduint256Min yield to harvest
newYieldFeeuint256Protocol fee on yield (bps)
newRebalanceThresholduint256Rebalance 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

NameTypeDescription
aavePool_addressAave Pool address
aUSDC_addressaUSDC token address
harvestThreshold_uint256Current harvest threshold
yieldFee_uint256Current yield fee (bps)
maxExposure_uint256Max 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

NameTypeDescription
enabledboolNew emergency flag
reasonstringReason 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

NameTypeDescription
tokenaddressToken address
amountuint256Amount 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

NameTypeDescription
rolebytes32The role to check
accountaddressThe account to check

Returns

NameTypeDescription
<none>boolbool 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

NameTypeDescription
rolebytes32The role to get the admin for

Returns

NameTypeDescription
<none>bytes32bytes32 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

NameTypeDescription
rolebytes32The role to grant
accountaddressThe 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

NameTypeDescription
rolebytes32The role to revoke
accountaddressThe 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

NameTypeDescription
rolebytes32The role to renounce
callerConfirmationaddressConfirmation 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

NameTypeDescription
<none>boolbool 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

NameTypeDescription
newImplementationaddressAddress 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

NameTypeDescription
newImplementationaddressAddress of the new implementation
databytesData 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

NameTypeDescription
<none>bytes32bytes32 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

NameTypeDescription
<none>bytes32bytes32 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

NameTypeDescription
<none>bytes32bytes32 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

NameTypeDescription
<none>bytes32bytes32 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

NameTypeDescription
<none>addressaddress 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

NameTypeDescription
<none>addressaddress 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

NameTypeDescription
<none>addressaddress 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

NameTypeDescription
<none>addressaddress 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

NameTypeDescription
<none>addressaddress 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

NameTypeDescription
<none>addressaddress 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>uint256uint256 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

NameTypeDescription
<none>boolbool True if in emergency mode, false otherwise