IArrakisStandardManager

Git Source

Functions

initialize

function used to initialize standard manager proxy.

function initialize(
    address owner_,
    address defaultReceiver_,
    address factory_
) external;

Parameters

NameTypeDescription
owner_addressaddress of the owner of standard manager.
defaultReceiver_addressaddress of the receiver of tokens (by default).
factory_addressArrakisMetaVaultFactory contract address.

pause

function used to pause the manager.

only callable by guardian

function pause() external;

unpause

function used to unpause the manager.

only callable by guardian

function unpause() external;

setDefaultReceiver

function used to set the default receiver of tokens earned.

function setDefaultReceiver(address newDefaultReceiver_) external;

Parameters

NameTypeDescription
newDefaultReceiver_addressaddress of the new default receiver of tokens.

setReceiverByToken

function used to set receiver of a specific token.

function setReceiverByToken(
    address vault_,
    bool isSetReceiverToken0_,
    address receiver_
) external;

Parameters

NameTypeDescription
vault_addressaddress of the meta vault that contain the specific token.
isSetReceiverToken0_boolboolean if true means that receiver is for token0 if not it's for token1.
receiver_addressaddress of the receiver of this specific token.

decreaseManagerFeePIPS

function used to decrease the fees taken by manager for a specific managed vault.

function decreaseManagerFeePIPS(
    address vault_,
    uint24 newFeePIPS_
) external;

Parameters

NameTypeDescription
vault_addressaddress of the vault.
newFeePIPS_uint24fees in pips to set on the specific vault.

finalizeIncreaseManagerFeePIPS

function used to finalize a time lock fees increase on a vault.

function finalizeIncreaseManagerFeePIPS(address vault_) external;

Parameters

NameTypeDescription
vault_addressaddress of the vault where the fees increase will be applied.

submitIncreaseManagerFeePIPS

function used to submit a fees increase in a managed vault.

function submitIncreaseManagerFeePIPS(
    address vault_,
    uint24 newFeePIPS_
) external;

Parameters

NameTypeDescription
vault_addressaddress of the vault where fees will be increase after timeLock.
newFeePIPS_uint24fees in pips to set on the specific managed vault.

withdrawManagerBalance

function used by manager to get his balance of fees earned on a vault.

function withdrawManagerBalance(address vault_)
    external
    returns (uint256 amount0, uint256 amount1);

Parameters

NameTypeDescription
vault_addressfrom which fees will be collected.

Returns

NameTypeDescription
amount0uint256amount of token0 sent to receiver_
amount1uint256amount of token1 sent to receiver_

rebalance

function used to manage vault's strategy.

function rebalance(
    address vault_,
    bytes[] calldata payloads_
) external;

Parameters

NameTypeDescription
vault_addressaddress of the vault that need a rebalance.
payloads_bytes[]call data to do specific action of vault side.

setModule

function used to set a new module (strategy) for the vault.

function setModule(
    address vault_,
    address module_,
    bytes[] calldata payloads_
) external;

Parameters

NameTypeDescription
vault_addressaddress of the vault the manager want to change module.
module_addressaddress of the new module.
payloads_bytes[]call data to initialize position on the new module.

initManagement

function used to init management of a meta vault.

function initManagement(SetupParams calldata params_) external;

Parameters

NameTypeDescription
params_SetupParamsstruct containing all the data for initialize the vault.

updateVaultInfo

function used to update meta vault management informations.

function updateVaultInfo(SetupParams calldata params_) external;

Parameters

NameTypeDescription
params_SetupParamsstruct containing all the data for updating the vault.

announceStrategy

function used to announce the strategy that the vault will follow.

function announceStrategy(
    address vault_,
    string memory strategy_
) external;

Parameters

NameTypeDescription
vault_addressaddress of arrakis meta vault that will follow the strategy.
strategy_stringstring containing the strategy name that will be used.

initializedVaults

function used to get a list of managed vaults.

function initializedVaults(
    uint256 startIndex_,
    uint256 endIndex_
) external view returns (address[] memory);

Parameters

NameTypeDescription
startIndex_uint256starting index from which the caller want to read the array of managed vaults.
endIndex_uint256ending index until which the caller want to read the array of managed vaults.

numInitializedVaults

function used to get the number of vault under management.

function numInitializedVaults()
    external
    view
    returns (uint256 numberOfVaults);

guardian

address of the pauser of manager.

function guardian() external view returns (address);

Returns

NameTypeDescription
<none>addresspauser address that can pause/unpause manager.

factory

address of the vault factory.

function factory() external view returns (address);

Returns

NameTypeDescription
<none>addressfactory address that can deploy meta vault.

defaultFeePIPS

function used to get the default fee applied on manager vault.

function defaultFeePIPS() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256defaultFeePIPS amount of default fees.

nativeToken

function used to get the native token/coin of the chain.

function nativeToken() external view returns (address);

Returns

NameTypeDescription
<none>addressnativeToken address of the native token/coin of the chain.

nativeTokenDecimals

function used to get the native token/coin decimals precision.

function nativeTokenDecimals() external view returns (uint8);

Returns

NameTypeDescription
<none>uint8nativeTokenDecimals decimals precision of the native coin.

defaultReceiver

function used to get the default receiver of tokens earned in managed vault.

function defaultReceiver() external view returns (address);

Returns

NameTypeDescription
<none>addressdefaultReceiver address of the default receiver.

receiversByToken

function used to get the receiver of a specific token.

function receiversByToken(address token_)
    external
    view
    returns (address receiver);

Parameters

NameTypeDescription
token_addressaddress of the ERC20 token that we want the receiver of

Returns

NameTypeDescription
receiveraddressaddress of the receiver of 'token_'

vaultInfo

function used to get vault management config.

function vaultInfo(address vault_)
    external
    view
    returns (
        uint256 lastRebalance,
        uint256 cooldownPeriod,
        IOracleWrapper oracle,
        uint24 maxDeviation,
        address executor,
        address stratAnnouncer,
        uint24 maxSlippagePIPS,
        uint24 managerFeePIPS
    );

Parameters

NameTypeDescription
vault_addressaddress of the metaVault.

Returns

NameTypeDescription
lastRebalanceuint256timestamp when the last rebalance happen.
cooldownPerioduint256minimum duration between two rebalance.
oracleIOracleWrapperoracle used to check against price manipulation.
maxDeviationuint24maximum deviation from oracle price allowed.
executoraddressaddress that can trigger a rebalance.
stratAnnounceraddressaddress that will announce a strategy to follow.
maxSlippagePIPSuint24maximum slippage authorized.
managerFeePIPSuint24fees that manager take.

Events

LogWhitelistNftRebalancers

event LogWhitelistNftRebalancers(address[] nftRebalancers);

LogBlacklistNftRebalancers

event LogBlacklistNftRebalancers(address[] nftRebalancers);

LogWhitelistStrategies

event LogWhitelistStrategies(string[] strategies);

LogSetManagementParams

event LogSetManagementParams(
    address indexed vault,
    address oracle,
    uint24 maxSlippagePIPS,
    uint24 maxDeviation,
    uint256 cooldownPeriod,
    address executor,
    address stratAnnouncer
);

LogSetVaultData

event LogSetVaultData(address indexed vault, bytes datas);

LogSetVaultStrat

event LogSetVaultStrat(address indexed vault, string strat);

LogFundBalance

event LogFundBalance(address indexed vault, uint256 balance);

LogWithdrawVaultBalance

event LogWithdrawVaultBalance(
    address indexed vault,
    uint256 amount,
    address receiver,
    uint256 newBalance
);

LogSetDefaultReceiver

event LogSetDefaultReceiver(address oldReceiver, address newReceiver);

LogSetReceiverByToken

event LogSetReceiverByToken(address indexed token, address receiver);

LogWithdrawManagerBalance

event LogWithdrawManagerBalance(
    address indexed receiver0,
    address indexed receiver1,
    uint256 amount0,
    uint256 amount1
);

LogChangeManagerFee

event LogChangeManagerFee(address vault, uint256 newFeePIPS);

LogIncreaseManagerFeeSubmission

event LogIncreaseManagerFeeSubmission(
    address vault, uint256 newFeePIPS
);

LogRebalance

event LogRebalance(address indexed vault, bytes[] payloads);

LogSetModule

event LogSetModule(
    address indexed vault, address module, bytes[] payloads
);

LogSetFactory

event LogSetFactory(address vaultFactory);

LogStrategyAnnouncement

event LogStrategyAnnouncement(address vault, string strategy);

Errors

EmptyNftRebalancersArray

error EmptyNftRebalancersArray();

NotWhitelistedNftRebalancer

error NotWhitelistedNftRebalancer(address nftRebalancer);

AlreadyWhitelistedNftRebalancer

error AlreadyWhitelistedNftRebalancer(address nftRebalancer);

OnlyNftRebalancers

error OnlyNftRebalancers(address caller);

EmptyString

error EmptyString();

StratAlreadyWhitelisted

error StratAlreadyWhitelisted();

StratNotWhitelisted

error StratNotWhitelisted();

OnlyPrivateVault

error OnlyPrivateVault();

OnlyERC20Vault

error OnlyERC20Vault();

OnlyVaultOwner

error OnlyVaultOwner(address caller, address vaultOwner);

AlreadyInManagement

error AlreadyInManagement();

NotTheManager

error NotTheManager(address caller, address manager);

SlippageTooHigh

error SlippageTooHigh();

MaxDeviationTooHigh

error MaxDeviationTooHigh();

CooldownPeriodSetToZero

error CooldownPeriodSetToZero();

ValueDtBalanceInputed

error ValueDtBalanceInputed(uint256 value, uint256 balance);

OnlyOwner

error OnlyOwner();

OnlyManagedVault

error OnlyManagedVault();

DataIsUpdated

error DataIsUpdated();

SameStrat

error SameStrat();

NotWhitelistedStrat

error NotWhitelistedStrat();

NotNativeCoinSent

error NotNativeCoinSent();

NoEnoughBalance

error NoEnoughBalance();

OverMaxSlippage

error OverMaxSlippage();

NativeTokenDecimalsZero

error NativeTokenDecimalsZero();

NotFeeDecrease

error NotFeeDecrease();

AlreadyPendingIncrease

error AlreadyPendingIncrease();

NotFeeIncrease

error NotFeeIncrease();

TimeNotPassed

error TimeNotPassed();

NoPendingIncrease

error NoPendingIncrease();

NotExecutor

error NotExecutor();

NotStratAnnouncer

error NotStratAnnouncer();

AddressZero

error AddressZero();

NotWhitelistedVault

error NotWhitelistedVault(address vault);

AlreadyWhitelistedVault

error AlreadyWhitelistedVault(address vault);

EmptyVaultsArray

error EmptyVaultsArray();

CallFailed

error CallFailed(bytes payload);

StartIndexLtEndIndex

error StartIndexLtEndIndex(uint256 startIndex, uint256 endIndex);

EndIndexGtNbOfVaults

error EndIndexGtNbOfVaults(uint256 endIndex, uint256 numberOfVaults);

OnlyGuardian

error OnlyGuardian(address caller, address guardian);

OnlyFactory

error OnlyFactory(address caller, address factory);

VaultNotDeployed

error VaultNotDeployed();

SetManagerFeeCallNotAllowed

error SetManagerFeeCallNotAllowed();

OnlyStratAnnouncer

error OnlyStratAnnouncer();

PublicVaultTotalSupplyChanged

error PublicVaultTotalSupplyChanged();