Skip to main content

IFlashloanAggregator

Git Source

The interface for the flashloan aggregator.

Functions

requestFlashloan

The function to request a flashloan.

function requestFlashloan(FlashloanRequest calldata request) external;

Parameters

NameTypeDescription
requestFlashloanRequestThe request for the flashloan.

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();

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 flashloan.

struct FlashloanRequest {
FlashloanProvider provider;
ICaliber.Instruction instruction;
address token;
uint256 amount;
}

Properties

NameTypeDescription
providerFlashloanProviderThe provider of the flashloan.
instructionICaliber.InstructionThe instruction to execute.
tokenaddressThe token to borrow.
amountuint256The amount to borrow.

Enums

FlashloanProvider

The enum for the flashloan providers.

enum FlashloanProvider {
AAVE_V3,
BALANCER_V2,
BALANCER_V3,
MORPHO,
DSS_FLASH
}