Vault
deposit
deposit
Deposits token
into the Vault, leading to producing corresponding token on the Everscale side.
Parameters:
Name | Type | Description |
---|---|---|
recipient | EverscaleAddress memory | Recipient in the Everscale network |
amount | uint256 | Amount of tokens to deposit |
Events emitted:
UserDeposit
deposit
deposit
Same as regular deposit
, but fill multiple pending withdrawals.
Parameters:
Name | Type | Description |
---|---|---|
recipient | EverscaleAddress memory | Recipient in the Everscale network |
amount | uint256 | Amount of tokens to deposit |
expectedMinBounty | uint256 | Expected minimal bounty amount |
pendingWithdrawalIds | PendingWithdrawalId[] memory | List of pending withdrawals to close |
Events emitted:
UserDeposit
depositToFactory
depositToFactory
Deposits token to Factory.
Parameters:
Name | Type | Description |
---|---|---|
amount | uint128 | Amount to deposit |
wid | int8 | Workchain id |
user | uint256 | Userβs address |
creditor | uint256 | Creditorβs address |
recipient | uint256 | Recipientβs address |
tokenAmount | uint128 | Token amount |
tonAmount | uint128 | Ton amount |
swapType | uint8 | Type of swap |
slippageNumerator | uint128 | Numerator used in determining slippage value |
slippageDenominator | uint128 | Denominator used in determining slippage value |
level3 | bytes memory |
Events emitted:
FactoryDeposit
saveWithdraw
saveWithdraw
Save withdrawal receipt. If Vault has enough tokens and withdrawal passes the limits, then it's executed immediately. Otherwise it's saved as a pending withdrawal.
Parameters:
Name | Type | Description |
---|---|---|
payload | bytes memory | Withdrawal receipt, bytes encoded from EverscaleEvent |
signatures | bytes[] memory | List of relayβs signatures |
Return value:
Name | Type | Description |
---|---|---|
instantWithdrawal | bool | True if withdrawal was instantly filled, false if saved as pending withdrawal |
pendingWithdrawalId | PendingWithdrawalId memory | Pending withdrawal Id |
Events emitted:
InstantWithdrawal
saveWithdraw
saveWithdraw
Save withdrawal receipt, same as saveWithdraw(bytes payload, bytes[] signatures)
,but allows to immediately set up bounty.
Parameters:
Name | Type | Description |
---|---|---|
payload | bytes memory | Withdrawal receipt, bytes encoded from EverscaleEvent |
signatures | bytes[] memory | List of relayβs signatures |
bounty | uint | New value for pending withdrawal bounty |
cancelPendingWithdrawal
cancelPendingWithdrawal
Cancel pending withdrawal partially or completely. This may only be called by the pending withdrawal recipient.
Parameters:
Name | Type | Description |
---|---|---|
id | uint256 | Pending withdrawal Id |
amount | uint256 | Amount to cancel (le then pending withdrawal amount) |
recipient | EverscaleAddress memory | Tokens recipient in Everscale network |
bounty | uint | New value for bounty |
Events emitted:
PendingWithdrawalCancel
withdraw
withdraw
Withdraws the calling account's pending withdrawal from this Vault.
Parameters:
Name | Type | Description |
---|---|---|
id | uint256 | Pending withdrawal Id |
amountRequested | uint256 | Amount of tokens to be withdrawn |
recipient | address | The address to send the redeem tokens |
maxLoss | uint256 | The maximum acceptable loss for withdrawal |
bounty | uint256 | New value for bounty |
Return value:
Name | Type | Description |
---|---|---|
amountAdjusted | uint256 | Quantity of tokens redeemed |
Events emitted:
PendingWithdrawalWithdraw
addStrategy
addStrategy
Add a Strategy to the Vault. This may only be called by governance
.
Parameters:
Name | Type | Description |
---|---|---|
strategyId | address | Address of the strategy to add |
_debtRatio | uint256 | Share of the total vaultβs assets that strategy has access to |
minDebtPerHarvest | uint256 | Lower limit on the increase of debt since last harvest |
maxDebtPerHarvest | uint256 | Upper limit on the increase of debt since last harvest |
_performanceFee | uint256 | Fee which strategist will receive based on this Vaultβs performance |
Events emitted:
StrategyAdded
updateStrategyDebtRatio
updateStrategyDebtRatio
Change the quantity of assets strategy
may manage. This may be called by governance
or management
.
Parameters:
Name | Type | Description |
---|---|---|
strategyId | address | Address of the strategy to update |
_debtRatio | uint256 | Quantity of assets strategy may manage after update |
Events emitted:
StrategyUpdateDebtRatio
updateStrategyMinDebtPerHarvest
updateStrategyMinDebtPerHarvest
Updates strategies minimal debt with new value passed from params.
Parameters:
Name | Type | Description |
---|---|---|
strategyId | address | Address of the strategy to update |
minDebtPerHarvest | uint256 | Lower limit on the increase of debt since last harvest |
Events emitted:
StrategyUpdateMinDebtPerHarvest
updateStrategyMaxDebtPerHarvest
updateStrategyMaxDebtPerHarvest
Updates strategies maximum debt with new value passed from params.
Parameters:
Name | Type | Description |
---|---|---|
strategyId | address | Address of the strategy to update |
maxDebtPerHarvest | uint256 | Upper limit on the increase of debt since last harvest |
Events emitted:
StrategyUpdateMaxDebtPerHarvest
updateStrategyPerformanceFee
updateStrategyPerformanceFee
Updates strategies performance fee with new value passed from params.
Parameters:
Name | Type | Description |
---|---|---|
strategyId | address | Address of the strategy to update |
_performanceFee | uint256 | New fee which strategist will receive based on this Vaultβs performance |
Events emitted:
StrategyUpdatePerformanceFee
revokeStrategy
revokeStrategy
Cancels strategy.
Parameters:
Name | Type | Description |
---|---|---|
strategyId | address | Address of the strategy to update |
Events emitted:
StrategyRevoked
_assessFees
_assessFees
Based on the strategy id and reported gain, calculates total fee based on the estimated management, strategist and performance fees.
Parameters:
Name | Type | Description |
---|---|---|
strategyId | address | Address of the strategy to update |
gain | uint256 | Gains reported used for assessing fees |
Return value:
Type | Description |
---|---|
uint256 | New assessed fees |
report
report
Reports the amount of assets the calling Strategy has free (usually in terms of ROI).
Parameters:
Name | Type | Description |
---|---|---|
gain | uint256 | Amount strategy has realized as a gain on itβs investments since the last report |
loss | uint256 | Amount strategy has realized as a loss on itβs investments since the last report |
_debtPayment | uint256 | Amount strategy has made available to cover outstanding debt |
Return value:
Type | Description |
---|---|
uint256 | Amount of debt outstanding |
Events emitted:
StrategyReported
skim
skim
Skim strategy gain to the rewards_
address. This may only be called by governance
or management
.
Parameters:
Name | Type | Description |
---|---|---|
strategyId | address | Address of the strategy to update |
skimFees
skimFees
Skim Vault fees to the rewards_
address. This may only be called by governance
or management
.
Parameters:
Name | Type | Description |
---|---|---|
skim_to_everscale | bool | True if skim fees to Everscale, false if not |
sweep
sweep
Removes tokens from this Vault that are not the type of token managed by this Vault. This may be used in case of accidentally sending the wrong kind of token to this Vault.
Parameters:
Name | Type | Description |
---|---|---|
_token | address | Token address to transfer out of this vault |
forceWithdraw
forceWithdraw
Force user's pending withdrawal. Works only if Vault has enough tokens on its balance. This may only be called by wrapper.
Parameters:
Name | Type | Description |
---|---|---|
pendingWithdrawalId | PendingWithdrawalId memory | Pending withdrawal Id |
Events emitted: PendingWithdrawalForce
forceWithdraw
forceWithdraw
Multicall for forceWithdraw
.
Parameters:
Name | Type | Description |
---|---|---|
pendingWithdrawalId | PendingWithdrawalId[] memory | Pending withdrawal Id |
setPendingWithdrawalApprove
setPendingWithdrawalApprove
Set approve status for pending withdrawal. Pending withdrawal must be in Required
(1) approve status, so approve status can be set only once. If Vault has enough tokens on its balance - withdrawal will be filled immediately. This may only be called by governance
or withdrawGuardian
.
Events emitted:
PendingWithdrawalWithdraw
setPendingWithdrawalApprove
setPendingWithdrawalApprove
Multicall for setPendingWithdrawalApprove
.
Parameters:
Name | Type | Description |
---|---|---|
pendingWithdrawalId | PendingWithdrawalId[] memory | Pending withdrawal Id |
approveStatus | ApproveStatus[] memory | Approve status, must be Approved or Rejected |
_transferToEverscale
_transferToEverscale
Emits event to notify successful transfer.
Parameters:
Name | Type | Description |
---|---|---|
recipient | EverscaleAddress memory | Recipient address in Everscale |
_amount | uint256 | Amount to transfer |
Events emitted:
Deposit
Last updated