SyncSynthVault
Last updated
Last updated
Ownable2StepUpgradeable
of .
ERC20PermitUpgradeable
of .
ERC20PausableUpgradeable
of .
IERC4626
of .
uint16
public
Performance fees are applied on the absolute returns of the underlying strategy.
bool
public
The locking status of the vault.
uint16
public
Performance fees are applied on the absolute returns of the underlying strategy.
Emitted when an epoch starts.
timestamp
uint256 indexed
The block timestamp of the epoch starts.
lastSavedBalance
uint256
The lastSavedBalance
when the vault starts.
totalShares
uint256
The total number of shares when the vault starts.
Emitted when an epoch ends.
timestamp
uint256 indexed
The block timestamp of the epoch terminates.
lastSavedBalance
uint256
The lastSavedBalance
from the current epoch starts.
returnedAssets
uint256
The total amount of underlying assets returned to the vault before collecting fees.
fees
uint256
The amount of fees collected.
totalShares
uint256
The total amount of shares when the vault terminates.
Emitted when fees are changed.
oldFees
uint16
The previous performance fees (in bps).
newFees
uint16
The newly applied performance fees (in bps).
returnedAssets
uint256
The total amount of underlying assets returned to the vault before collecting fees.
The vault is in a locked state. Emitted if the transaction cannot happen in this state.
The vault is in an open state. Emitted if the transaction cannot happen in this state.
Claiming the underlying assets is not allowed.
Attempt to deposit more underlying assets than the maximum allowed amount for receiver
.
receiver
address
The address
of the receiver
.
assets
uint256
The amount of underlying assets asked for deposit.
max
uint256
Number of shares (LP tokens) received in exchange for the specified amount of underlying assets.
Attempt to mint more shares (LP tokens) than the maximum allowed amount for receiver
.
owner
address
The address
of the owner
.
shares
uint256
The amount of underlying assets asked to mint shares (LP tokens).
max
uint256
The maximum number of withdrawable shares (LP tokens).
Attempt to withdraw more underlying assets than the maximum allowed amount for receiver
.
owner
address
The address
of the owner
.
assets
uint256
The number of underlying assets asked for withdrawal.
max
uint256
The maximum amount of withdrawable underlying assets.
Attempt to redeem more shares(LP tokens) than the maximum allowed amount for receiver
.
owner
address
The address
of the owner
.
shares
uint256
The number of shares (LP tokens) asked to be redeemed.
max
uint256
The maximum number of redeemable shares (LP tokens).
The asset
function is used to return the address
of the underlying asset.
address
address
of the underlying asset.
See {IERC20-decimals}
. The _decimalShares
is equal to underlying asset decimals + decimalsOffset
. See Constructor for more details about this.
uint8
Amount of decimals of the share (LP) token.
The totalAssets
function is used to calculate the theoretical total underlying assets owned by the vault. If the vault is locked, the last saved balance is added to the current balance.
uint256
Amount of the total underlying assets in the vault.
See {IERC4626-convertToShares}.
The convertToShares
function is used to calculate the number of shares (LP tokens) received in exchange for the specified amount of underlying assets.
assets
uint256
The amount of underlying assets to be converted into shares .
See {IERC4626-convertToAssets}.
The convertToAssets
function is used to calculate the amount of underlying assets received in exchange for the specified number of shares (LP tokens).
shares
uint256
The number of shares (LP tokens) to be converted into underlying assets.
The maxDeposit
function is used to calculate the maximum deposit.
If the vault is locked or paused, users are not allowed to mint, the maxMint
is 0
.
_
address
The address
of the shares (LP tokens) receiver
.
The maxMint
function is used to calculate the maximum number of shares (LP tokens) you can mint. If the vault is locked or paused, the maxMint
is 0
.
_
address
The address
of the receiver
.
The maxWithdraw
function is used to calculate the maximum amount of withdrawable underlying assets. If the function is called during the lock period the maxWithdraw
is 0
.
owner
address
The address
of the owner
.
The maxRedemm
function is used to calculate the maximum number of redeemable shares (LP tokens). If the function is called during the lock period, the maxRedeem
is 0
.
owner
address
The address
of the owner
.
The previewDeposit
function is used to calculate the number of shares (LP tokens) received in exchange for the specified underlying asset.
assets
uint256
The amount of underlying assets to be converted into shares (LP tokens).
The previewMint
function is used to calculate the amount of underlying assets received in exchange for the specified number of shares (LP tokens).
shares
uint256
The number of shares (LP tokens) to be converted into underlying assets.
The previewWithdraw
function is used to calculate the number of shares (LP tokens) received in exchange for the specified underlying asset.
assets
uint256
The amount of underlying assets to be converted into shares (LP tokens).
The previewRedeem
function is used to calculate the amount of underlying assets received in exchange for the specified number of shares (LP token).
shares
uint256
The number of shares (LP tokens) to be converted into underlying assets.
Given the address of an owner, returns the amount of shares of an user, converted in assets.
The previewRedeem
function is used to calculate the amount of underlying assets received in exchange for the specified number of shares (LP token).
owner
address
The owner address
.
The deposit
function is used to deposit underlying assets into the vault.
assets
uint256
The amount of underlying assets to be converted into shares (LP tokens).
receiver
address
The address
of the shares (LP tokens) receiver
.
The depositWithPermit
function is used to deposit underlying assets into the vault by using permit feature if the underlying asset support it.
assets
uint256
The amount of underlying assets to be converted into shares (LP tokens).
receiver
address
The address
of the shares (LP tokens) receiver
.
permitParams
PermitParams
Permit functionality parameters.
The mint
function is used to mint the specified number of shares (LP tokens) in exchange for the corresponding amount of underlying assets from owner
.
shares
uint256
The number of shares (LP tokens) to be converted into underlying assets.
receiver
address
The address
of the shares (LP tokens) receiver
.
The withdraw
function is used to withdraw the specified amount of underlying assets in exchange for a proportional number of shares (LP tokens).
assets
uint256
The amount of underlying assets to be withdrawn.
receiver
address
The address
of the shares (LP tokens) receiver
.
owner
address
The address
of the owner
.
The redeem
function is used to redeem the specified number of shares (LP tokens) in exchange for the corresponding amount of underlying assets from owner
.
shares
uint256
The amount of shares to be redeemed.
receiver
address
The address
of the shares (LP tokens) receiver
.
owner
address
The address
of the owner
.