IAerodromeStandardModulePrivate
Author: Arrakis Finance
Aerodrome Module interface, modules able to interact with aerodrome dex.
Functions
initialize
initialize function to delegate call onced the beacon proxy is deployed, for initializing the aerodrome module.
function initialize(
IOracleWrapper oracle_,
uint24 maxSlippage_,
address aeroReceiver_,
int24 tickSpacing_,
address metaVault_
) external;
Parameters
Name | Type | Description |
---|---|---|
oracle_ | IOracleWrapper | oracle that will be the price reference. |
maxSlippage_ | uint24 | maximum slippage allowed during swap, mint and burn. |
aeroReceiver_ | address | recevier of aero token belonging to manager. |
tickSpacing_ | int24 | tickSpacing of the aero pool to interact with. |
metaVault_ | address | address of the meta vault |
rebalance
function used to rebalance the inventory of the module.
function rebalance(
RebalanceParams calldata params_
) external;
Parameters
Name | Type | Description |
---|---|---|
params_ | RebalanceParams | params including decrease positions, swap, increase positions and mint datas. |
claimRewards
function used by user to claim the aero rewards.
function claimRewards(
address receiver_
) external;
Parameters
Name | Type | Description |
---|---|---|
receiver_ | address | address that will receive the aero rewards. |
claimManager
function used by executor to claim the manager aero rewards.
function claimManager() external;
approve
function used to approve a spender to use the left over of the module.
function approve(
address spender_,
uint256 amount0_,
uint256 amount1_
) external;
Parameters
Name | Type | Description |
---|---|---|
spender_ | address | address that will be allowed to use left over. |
amount0_ | uint256 | amount of token0 allowed to be used by spender. |
amount1_ | uint256 | amount of token1 allowed to be used by spender. |
setReceiver
function used to set the receiver of aero rewards.
function setReceiver(
address newReceiver_
) external;
Parameters
Name | Type | Description |
---|---|---|
newReceiver_ | address | new address that will receive the aero token. |
nftPositionManager
function used to get the NonFungiblePositionManager of aerodrome.
function nftPositionManager()
external
view
returns (INonfungiblePositionManager);
factory
function used to get the factory of aerodrome.
function factory() external view returns (IUniswapV3Factory);
voter
function used to get the voter of aerodrome.
function voter() external view returns (IVoter);
tokenIds
function used to get the list of tokenIds of non fungible position.
function tokenIds() external view returns (uint256[] memory);
maxSlippage
function used to get the maximum slippage.
function maxSlippage() external view returns (uint24);
aeroReceiver
function used to get aero token receiver.
function aeroReceiver() external view returns (address);
pool
function used to get aero pool the module is interacting with.
function pool() external view returns (address);
gauge
function used to get aero gauge associated to pool the module is interacting with.
function gauge() external view returns (address);
aeroManagerBalance
function used to get aero balance due to manager.
function aeroManagerBalance() external view returns (uint256);
oracle
function used to get the oracle that will be used to proctect rebalances.
function oracle() external view returns (IOracleWrapper);
AERO
function used to get aero token address.
function AERO() external view returns (address);
Events
LogApproval
Event describing an approval of left overs to an address.
event LogApproval(
address indexed spender, uint256 amount0, uint256 amount1
);
Parameters
Name | Type | Description |
---|---|---|
spender | address | the address that will get the allowance. |
amount0 | uint256 | the amount of token0 allowed to spender. |
amount1 | uint256 | the amount of token1 allowed to spender. |
LogRebalance
Event describing an rebalance results on underlying.
event LogRebalance(
uint256 burn0, uint256 burn1, uint256 mint0, uint256 mint1
);
Parameters
Name | Type | Description |
---|---|---|
burn0 | uint256 | the amount of token0 burned during rebalance. |
burn1 | uint256 | the amount of token1 burned during rebalance. |
mint0 | uint256 | the amount of token0 minted during rebalance. |
mint1 | uint256 | the amount of token1 minted during rebalance. |
LogClaim
Event describing an claim by user of aero token.
event LogClaim(address indexed receiver, uint256 aeroAmount);
Parameters
Name | Type | Description |
---|---|---|
receiver | address | the receiver of aero token. |
aeroAmount | uint256 | the amount of aero token claimed. |
LogManagerClaim
Event describing an claim by manager of aero token.
event LogManagerClaim(address indexed receiver, uint256 aeroAmount);
Parameters
Name | Type | Description |
---|---|---|
receiver | address | the receiver of aero token. |
aeroAmount | uint256 | the amount of aero token claimed. |
LogSetReceiver
Event describing the update of receiver of manager aero reward.
event LogSetReceiver(address oldReceiver, address newReceiver);
Parameters
Name | Type | Description |
---|---|---|
oldReceiver | address | previous receiver of aero token. |
newReceiver | address | new receiver of aero token. |
Errors
MaxSlippageGtTenPercent
triggered when the max slippage variable is set to greater than 10%.
error MaxSlippageGtTenPercent();
OnlyMetaVaultOwner
triggered when the caller is different than the meta vault owner.
error OnlyMetaVaultOwner();
NativeCoinNotSupported
triggered when token pair contain native coin.
error NativeCoinNotSupported();
BurnToken0
triggered when burn of token0 is smaller than expected.
error BurnToken0();
BurnToken1
triggered when burn of token1 is smaller than expected.
error BurnToken1();
MintToken0
triggered when mint of token0 is smaller than expected.
error MintToken0();
MintToken1
triggered when mint of token1 is smaller than expected.
error MintToken1();
TokenIdNotFound
triggered when tokenId of position is unknown from the module.
error TokenIdNotFound();
Token0Mismatch
triggered when token0 of mintParams is different than module token0.
error Token0Mismatch();
Token1Mismatch
triggered when token1 of mintParams is different than module token1.
error Token1Mismatch();
TickSpacingMismatch
triggered when tick spacing of mintParams is different than the pool module.
error TickSpacingMismatch();
ExpectedMinReturnTooLow
triggered when min return of rebalance swap is too low.
error ExpectedMinReturnTooLow();
WrongRouter
triggered when swap router of the rebalance payload is unauthorized address.
error WrongRouter();
SlippageTooHigh
triggered when amount received from rebalance swap is too low.
error SlippageTooHigh();
OverMaxDeviation
triggered when deviation of pool price from oracle price is greater than max allowed value.
error OverMaxDeviation();
SameReceiver
triggered when new aero receiver is equal to old aero receiver.
error SameReceiver();
PoolNotFound
triggered when pool has not been created on factory.
error PoolNotFound();
AmountsZero
triggered when funded amounts are equals to zero.
error AmountsZero();
OnlyManagerOwner
triggered when caller is not the owner of the manager.
error OnlyManagerOwner();
AEROTokenNotSupported
triggered when aero token is one of the token of the module token pair.
error AEROTokenNotSupported();
GaugeKilled
triggered when gauge returned by voter is not alive.
error GaugeKilled();