NFTXVaultFactoryUpgradeableV3
NFTXVaultFactoryUpgradeableV3.sol
Last updated
NFTXVaultFactoryUpgradeableV3.sol
Last updated
Factory contract for creating NFTX vaults, and also managing general protocol settings.
Max depositor premium fee share allowed. Set to 100%.
Beacon proxy creation code.
Address of NFTXFeeDistributorV3.
Address of NFTXEligibilityManager.
Which addresses are excluded from fees.
Global mint fee for vaults using default fee settings.
Global redeem fee for vaults using default fee settings.
Global (NFT-to-NFT) swap fee for vaults using default fee settings.
The time-weighted average price interval. For example, if the twapInterval
is set to 3600
seconds (1 hour), it would mean that you are interested in computing or observing the average price of an asset over the past hour.
The time it takes for premium fees to decay from premiumMax
to zero. In seconds.
The starting (max) premium fee. 1e16 = 1%.
Portion of premium fee that goes to depositor. 1e16 = 1%.
Emitted by setFeeDistributor()
.
Emitted by setFeeExclusion()
.
Emitted by setEligibilityManager()
.
Emitted by createVault()
.
Emitted by setVaultFees()
. Fees are calculated in vToken, but paid in ETH. 1e16 = 0.01 vToken = 1%.
Emitted by disableVaultFees()
.
Emitted by setFactoryFees()
. Fees are calculated in vToken, but paid in ETH. 1e16 = 0.01 vToken = 1%.
Emitted by setPremiumMax()
. Fees are calculated in vToken, but paid in ETH. 1e16 = 0.01 vToken = 1%.
Emitted by setPremiumDuration()
. In seconds.
Emitted by setDepositorPremiumShare()
. 1e16 = 1%.
Emitted by setTwapInterval()
.
Creates a vault.
These functions can be called by vault contracts (on themselves) or by this contract's owner.
Sets mint, redeem, and (NFT-to-NFT) swap fees for a vault. 1e16 = 1%.
Revert vault to global/default fee settings.
Sets global/default mint, redeem, and (NFT-to-NFT) swap fees. 1e16 = 1%.
Sets address of NFTXFeeDistributorV3.
Sets whether an address is excluded from vault fees.
Sets address of NFTXEligibilityManager.
Sets the TWAP interval duration. In seconds.
Sets the time it takes, in seconds, for premium fees to decay from premiumMax
to zero.
Sets the starting (max) premium fee.
Sets the portion of premium fee that goes to depositor.
Returns the mint, redeem, and (NFT-to-NFT) swap fees for a vault.
Checks whether the NFTX protocol is locked (i.e., paused).
Returns addresses for all vaults that are linked to an NFT address.
Returns addresses of all vaults.
Returns total number of NFTX V3 vaults.
Returns the address of a vault.
Returns a deterministic address based on an assetAddress
, name
, and symbol
.
Returns the TWAP of the given pool, across the recent twapInterval
. The returned value is in UniswapV3's 96-bit fixed point representation.
Returns premium fee for redeeming or swapping an ERC721 NFT from a vault.
Returns premium fee for redeeming or swapping for ERC1155 NFTs from a vault.
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
Parameters | Type | Description |
---|---|---|
Return values | Type | Description |
---|---|---|
oldDistributor
address
Previous address of NFTXFeeDistributorV3.
newDistributor
address
New address of NFTXFeeDistributorV3.
feeExcluded
address
Address being excluded (or un-excluded).
excluded
bool
Whether the address is excluded from fees.
oldEligManager
address
Previous address of NFTXEligibilityManager.
newEligManager
address
New address of NFTXEligibilityManager.
vaultId
uint256
ID of vault.
vaultAddress
address
Contract address of vault.
assetAddress
address
NFT collection address linked to vault.
name
string
ERC20 vToken name.
symbol
string
ERC20 vToken symbol.
vaultId
uint256
ID of vault.
mintFee
address
New vault mint fee.
redeemFee
address
New vault redeem fee.
swapFee
string
New vault swap fee.
vaultId
uint256
ID of vault.
mintFee
address
New factory mint fee.
redeemFee
address
New factory redeem fee.
swapFee
string
New factory swap fee.
premiumMax
uint256
New max premium fee.
premiumDuration
uint256
New premium duration.
depositPremiumShare
uint256
New depositor share of premium fee.
twapInterval
uint256
The time-weighted average price interval. For example, if the twapInterval
is set to 3600
seconds (1 hour), it would mean that you are interested in computing or observing the average price of an asset over the past hour.
name
string
ERC20 vToken name of vault.
symbol
string
ERC20 vToken symbol for vault.
assetAddress
address
Address of NFT contract.
is1155
bool
Whether the NFT uses ERC1155.
allowAllItems
bool
Whether all NFT token IDs are eligible to enter.
vaultId
uint256
ID of vault.
vaultId
uint256
ID of vault.
mintFee
uint256
New mint fee.
redeemFee
uint256
New redeem fee.
swapFee
uint256
New (NFT-to-NFT) swap fee.
vaultId
uint256
ID of vault.
mintFee
uint256
New mint fee.
redeemFee
uint256
New redeem fee.
swapFee
uint256
New swap fee (for NFT-to-NFT swaps).
feeDistributor_
address
New address of NFTXFeeDistributorV3.
excludedAddr
address
Address being set.
excluded
bool
Whether the address is excluded from vault fees.
eligibilityManager_
address
New address of NFTXEligibilityManager.
twapInterval_
uint32
New TWAP interval.
premiumDuration_
uint256
New duration.
premiumMax_
uint256
New max premium. 1e16 = 1%.
depositorPremiumShare_
uint256
New depositor share. 1e16 = 1%.
vaultId
uint256
ID of vault.
mintFee
uint256
Mint fee.
redeemFee
uint256
Redeem fee.
swapFee
uint256
(NFT-to-NFT) swap fee.
lockId
uint256
The ID of the lock type.
unnamed
bool
Whether the lock type is active.
assetAddress
address
Address of NFT contract.
unnamed
address[]
Array of vault addresses.
unnamed
address
Array of all vault addresses.
unnamed
bool
Number of vaults.
vaultId
uint256
ID of vault.
unnamed
address
Vault address.
pool
address
Address of AMM pool to check.
priceX96
uint256
TWAP represented as 96-bit FixedPoint.
vaultId
uint256
ID of vault.
tokenId
uint256
ID of NFT.
premium
uint256
Premium fee.
depositor
uint256
Address of NFT depositor.
vaultId
uint256
ID of vault.
tokenId
uint256
ID of NFT.
amount
uint256
Quantity of NFT.
netPremium
uint256
Total premium fee to purchase amount
.
premiums
uint256[]
Premium fees.
depositors
uint256[]
Addresses of NFT depositors.