IProvisioner

Interface for the contract that can mint and burn vault units in exchange for tokens

Functions

deposit

Deposit tokens directly into the vault

MUST revert if tokensIn is 0, minUnitsOut is 0, or sync deposits are disabled

function deposit(IERC20 token, uint256 tokensIn, uint256 minUnitsOut) external returns (uint256 unitsOut);

Parameters

Name
Type
Description

token

IERC20

The token to deposit

tokensIn

uint256

The amount of tokens to deposit

minUnitsOut

uint256

The minimum amount of units expected

Returns

Name
Type
Description

unitsOut

uint256

The amount of shares minted to the receiver

mint

Mint exact amount of units by depositing required tokens

function mint(IERC20 token, uint256 unitsOut, uint256 maxTokensIn) external returns (uint256 tokensIn);

Parameters

Name
Type
Description

token

IERC20

The token to deposit

unitsOut

uint256

The exact amount of units to mint

maxTokensIn

uint256

Maximum amount of tokens willing to deposit

Returns

Name
Type
Description

tokensIn

uint256

The amount of tokens used to mint the requested shares

refundDeposit

Refund a deposit within the refund period

Only callable by authorized addresses

Parameters

Name
Type
Description

sender

address

The original depositor

token

IERC20

The deposited token

tokenAmount

uint256

The amount of tokens deposited

unitsAmount

uint256

The amount of units minted

refundableUntil

uint256

Timestamp until which refund is possible

refundRequest

Refund an expired deposit or redeem request

Can only be called after request deadline has passed

Parameters

Name
Type
Description

token

IERC20

The token involved in the request

request

Request

The request to refund

requestDeposit

Create a new deposit request to be solved by solvers

Parameters

Name
Type
Description

token

IERC20

The token to deposit

tokensIn

uint256

The amount of tokens to deposit

minUnitsOut

uint256

The minimum amount of units expected

solverTip

uint256

The tip offered to the solver

deadline

uint256

Duration in seconds for which the request is valid

maxPriceAge

uint256

Maximum age of price data that solver can use

isFixedPrice

bool

Whether the request is a fixed price request

requestRedeem

Create a new redeem request to be solved by solvers

Parameters

Name
Type
Description

token

IERC20

The token to receive

unitsIn

uint256

The amount of units to redeem

minTokensOut

uint256

The minimum amount of tokens expected

solverTip

uint256

The tip offered to the solver

deadline

uint256

Duration in seconds for which the request is valid

maxPriceAge

uint256

Maximum age of price data that solver can use

isFixedPrice

bool

Whether the request is a fixed price request

solveRequestsVault

Solve multiple requests using vault's liquidity

Only callable by authorized addresses

Parameters

Name
Type
Description

token

IERC20

The token for which to solve requests

requests

Request[]

Array of requests to solve

solveRequestsDirect

Solve multiple requests using solver's own liquidity

Parameters

Name
Type
Description

token

IERC20

The token for which to solve requests

requests

Request[]

Array of requests to solve

setTokenDetails

Update token parameters

Parameters

Name
Type
Description

token

IERC20

The token to update

tokensDetails

TokenDetails

The new token details

removeToken

Removes token from provisioner

Parameters

Name
Type
Description

token

IERC20

The token to be removed

setDepositDetails

Update deposit parameters

Parameters

Name
Type
Description

depositCap_

uint256

New maximum total value that can be deposited

depositRefundTimeout_

uint256

New time window for deposit refunds

maxDeposit

Return maximum amount that can still be deposited

Returns

Name
Type
Description

<none>

uint256

Amount of deposit capacity remaining

areUserUnitsLocked

Check if a user's units are currently locked

Parameters

Name
Type
Description

user

address

The address to check

Returns

Name
Type
Description

<none>

bool

True if user's units are locked, false otherwise

getDepositHash

Computes the hash for a sync deposit

Parameters

Name
Type
Description

user

address

The address making the deposit

token

IERC20

The token being deposited

tokenAmount

uint256

The amount of tokens to deposit

unitsAmount

uint256

Minimum amount of units to receive

refundableUntil

uint256

The timestamp until which the deposit is refundable

Returns

Name
Type
Description

<none>

bytes32

The hash of the deposit

getRequestHash

Computes the hash for a generic request

Parameters

Name
Type
Description

token

IERC20

The token involved in the request

request

Request

The request struct

Returns

Name
Type
Description

<none>

bytes32

The hash of the request

Events

Deposited

Emitted when a user deposits tokens directly into the vault

Parameters

Name
Type
Description

user

address

The address of the depositor

token

IERC20

The token being deposited

tokensIn

uint256

The amount of tokens deposited

unitsOut

uint256

The amount of units minted

depositHash

bytes32

Unique identifier for this deposit

DepositRefunded

Emitted when a deposit is refunded

Parameters

Name
Type
Description

depositHash

bytes32

The hash of the deposit being refunded

DirectDepositRefunded

Emitted when a direct (sync) deposit is refunded

Parameters

Name
Type
Description

depositHash

bytes32

The hash of the deposit being refunded

DepositRequested

Emitted when a user creates a deposit request

Parameters

Name
Type
Description

user

address

The address requesting the deposit

token

IERC20

The token being deposited

tokensIn

uint256

The amount of tokens to deposit

minUnitsOut

uint256

The minimum amount of units expected

solverTip

uint256

The tip offered to the solver in deposit token terms

deadline

uint256

Timestamp until which the request is valid

maxPriceAge

uint256

Maximum age of price data that solver can use

isFixedPrice

bool

Whether the request is a fixed price request

depositRequestHash

bytes32

The hash of the deposit request

RedeemRequested

Emitted when a user creates a redeem request

Parameters

Name
Type
Description

user

address

The address requesting the redemption

token

IERC20

The token requested in return for units

minTokensOut

uint256

The minimum amount of tokens the user expects to receive

unitsIn

uint256

The amount of units being redeemed

solverTip

uint256

The tip offered to the solver in redeem token terms

deadline

uint256

The timestamp until which this request is valid

maxPriceAge

uint256

Maximum age of price data that solver can use

isFixedPrice

bool

Whether the request is a fixed price request

redeemRequestHash

bytes32

The hash of the redeem request

DepositSolved

Emitted when a deposit request is solved successfully

Parameters

Name
Type
Description

depositHash

bytes32

The unique identifier of the deposit request that was solved

RedeemSolved

Emitted when a redeem request is solved successfully

Parameters

Name
Type
Description

redeemHash

bytes32

The unique identifier of the redeem request that was solved

InvalidRequestHash

Emitted when an unrecognized async deposit hash is used

Parameters

Name
Type
Description

depositHash

bytes32

The deposit hash that was not found in async records

AsyncDepositDisabled

Emitted when async deposits are disabled and a deposit request cannot be processed

Parameters

Name
Type
Description

index

uint256

The index of the deposit request that was rejected

AsyncRedeemDisabled

Emitted when async redeems are disabled and a redeem request cannot be processed

Parameters

Name
Type
Description

index

uint256

The index of the redeem request that was rejected

PriceAgeExceeded

Emitted when the price age exceeds the maximum allowed for a request

Parameters

Name
Type
Description

index

uint256

The index of the request that was rejected

DepositCapExceeded

Emitted when a deposit exceeds the vault's configured deposit cap

Parameters

Name
Type
Description

index

uint256

The index of the request that was rejected

InsufficientTokensForTip

Emitted when there are not enough tokens to cover the required solver tip

Parameters

Name
Type
Description

index

uint256

The index of the request that was rejected

AmountBoundExceeded

Emitted when the output units are less than the amount requested

Parameters

Name
Type
Description

index

uint256

The index of the request that was rejected

amount

uint256

The actual amount

bound

uint256

The minimum amount

RedeemRefunded

Emitted when a redeem request is refunded due to expiration or cancellation

Parameters

Name
Type
Description

redeemHash

bytes32

The unique identifier of the redeem request that was refunded

DepositDetailsUpdated

Emitted when the vault's deposit limits are updated

Parameters

Name
Type
Description

depositCap

uint256

The new maximum total value that can be deposited into the vault

depositRefundTimeout

uint256

The new time window during which deposits can be refunded

TokenDetailsSet

Emitted when a token's deposit/withdrawal settings are updated

Parameters

Name
Type
Description

token

IERC20

The token whose settings are being updated

tokensDetails

TokenDetails

The new token details

TokenRemoved

Emitted when a token is removed from the provisioner

Parameters

Name
Type
Description

token

IERC20

The token that was removed

Errors

Aera__SyncDepositDisabled

Aera__AsyncDepositDisabled

Aera__AsyncRedeemDisabled

Aera__DepositCapExceeded

Aera__MinUnitsOutNotMet

Aera__TokensInZero

Aera__UnitsInZero

Aera__UnitsOutZero

Aera__MinUnitsOutZero

Aera__MaxTokensInZero

Aera__MaxTokensInExceeded

Aera__MaxDepositRefundTimeoutExceeded

Aera__DepositHashNotFound

Aera__HashNotFound

Aera__RefundPeriodExpired

Aera__DeadlineInPast

Aera__DeadlineTooFarInFuture

Aera__DeadlineInFutureAndUnauthorized

Aera__MinTokenOutZero

Aera__HashCollision

Aera__ZeroAddressPriceAndFeeCalculator

Aera__ZeroAddressMultiDepositorVault

Aera__DepositMultiplierTooLow

Aera__DepositMultiplierTooHigh

Aera__RedeemMultiplierTooLow

Aera__RedeemMultiplierTooHigh

Aera__DepositCapZero

Aera__PriceAndFeeCalculatorVaultPaused

Aera__AutoPriceSolveNotAllowed

Aera__FixedPriceSolverTipNotAllowed

Aera__TokenCantBePriced

Aera__CallerIsVault

Aera__InvalidToken

Last updated