IFlashloanAggregator
Functions
requestFlashloan
The function to request a flash loan.
function requestFlashloan(FlashloanRequest calldata request) external;Parameters
| Name | Type | Description |
|---|---|---|
| request | FlashloanRequest | The request for the flash loan. |
balancerV3FlashloanCallback
Callback handler for Balancer V3 flashloan.
function balancerV3FlashloanCallback(
address caliber,
ICaliber.Instruction calldata instruction,
address token,
uint256 amount
) external;Parameters
| Name | Type | Description |
|---|---|---|
| caliber | address | The address of the Caliber contract that initiated the flashloan. |
| instruction | ICaliber.Instruction | The instruction to execute. |
| token | address | The token borrowed. |
| amount | uint256 | The amount borrowed. |
Errors
NotCaliber
Error thrown when the caller is not a Caliber.
error NotCaliber();NotRequested
Error thrown when the initiator is not the requested contract.
error NotRequested();InvalidToken
Error thrown when the token is invalid.
error InvalidToken();InvalidParamsLength
Error thrown when params length is invalid.
error InvalidParamsLength();InvalidFeeAmount
Error thrown when the fee amount is invalid.
error InvalidFeeAmount();NotBalancerV2Pool
Error thrown when the caller is not the Balancer V2 pool.
error NotBalancerV2Pool();NotBalancerV3Pool
Error thrown when the caller is not the Balancer V3 pool.
error NotBalancerV3Pool();NotMorpho
Error thrown when the caller is not the Morpho pool.
error NotMorpho();NotDssFlash
Error thrown when the caller is not the Maker DSS Flash.
error NotDssFlash();NotAaveV3Pool
Error thrown when the caller is not the Aave V3 pool.
error NotAaveV3Pool();BalancerV2PoolNotSet
Error thrown when the Balancer V2 pool is not set.
error BalancerV2PoolNotSet();BalancerV3PoolNotSet
Error thrown when the Balancer V3 pool is not set.
error BalancerV3PoolNotSet();MorphoPoolNotSet
Error thrown when the Morpho pool is not set.
error MorphoPoolNotSet();DaiNotSet
Error thrown when the DAI token is not set.
error DaiNotSet();DssFlashNotSet
Error thrown when the Maker DSS Flash is not set.
error DssFlashNotSet();AaveV3PoolNotSet
Error thrown when the Aave V3 pool is not set.
error AaveV3PoolNotSet();InvalidUserDataHash
Error thrown when the user data hash is invalid.
error InvalidUserDataHash();Structs
FlashloanRequest
The struct for requesting a flash loan.
struct FlashloanRequest {
FlashloanProvider provider;
ICaliber.Instruction instruction;
address token;
uint256 amount;
}Properties
| Name | Type | Description |
|---|---|---|
| provider | FlashloanProvider | The provider of the flash loan. |
| instruction | ICaliber.Instruction | The instruction to execute. |
| token | address | The token to borrow. |
| amount | uint256 | The amount to borrow. |
Enums
FlashloanProvider
The enum for the flash loan providers.
enum FlashloanProvider {
/// Aave V3
AAVE_V3,
/// Balancer V2
BALANCER_V2,
/// Balancer V3
BALANCER_V3,
/// Morpho
MORPHO,
/// Maker DSS Flash
DSS_FLASH
}Variants
| Name | Description |
|---|---|
| AAVE_V3 | |
| BALANCER_V2 | |
| BALANCER_V3 | |
| MORPHO | |
| DSS_FLASH |