NFTXFeeDistributorV3
NFTXFeeDistributorV3.sol
Fee distributor contract for distributing vault fees.
Table of Contents
Constants
nftxVaultFactory
Address of NFTX vault factory.
ammFactory
Address of NFTX AMM pool factory.
inventoryStaking
Address of NFTX inventory staking contract.
WETH
Address of WETH contract.
POOL_DEFAULT_ALLOC
Global liquidity provider vault fee percentage, set to 80%.
INVENTORY_DEFAULT_ALLOC
Global inventory staker vault fee percentage, set to 20%.
Variables
rewardFeeTier
AMM pool fee tier that receives vault fees for liquidity providers.
nftxRouter
Contract address of NFTX router.
treasury
Treasury address.
allocTotal
Total allocation across all feeReceivers
.
feeReceivers
List of fee receivers.
distributionPaused
Whether fee distribution has been paused.
Events
UpdateTreasuryAddress
Emitted by setTreasuryAddress()
.
Parameters | Type | Description |
---|---|---|
oldTreasury |
| Previous treasury address. |
newTreasury |
| New treasury address. |
PauseDistribution
Emitted by pauseFeeDistribution()
.
Parameters | Type | Description |
---|---|---|
paused |
| Whether the contract was paused or unpaused. |
NewRewardFeeTier
Emitted by changeRewardFeeTier()
.
Parameters | Type | Description |
---|---|---|
rewardFeeTier |
| The new reward fee tier that determins which AMM pools receive vault rewards . |
NewNFTXRouter
Emitted by setNFTXRouter()
.
Parameters | Type | Description |
---|---|---|
nftxRouter |
| New NFTXRouter address. |
WethDistributedToInventory
Emitted by distribute()
.
Parameters | Type | Description |
---|---|---|
vaultId |
| ID of vault. |
amount |
| Amount of WETH. |
WethDistributedToPool
Emitted by distribute()
.
Parameters | Type | Description |
---|---|---|
vaultId |
| ID number of vault. |
amount |
| Amount of WETH. |
Write Functions
distribute
Distributes current WETH balance to feeReceivers
for vaultId.
Parameters | Type | Description |
---|---|---|
vaultId |
| ID of vault. |
distributeVTokensToPool
Distributes vTokens to NFTX AMM pool. Can only be called by NFTXRouter when vTokens have been paid as part of an early withdrawal penalty.
Parameters | Type | Description |
---|---|---|
pool |
| Address of pool. |
vToken |
| Address of vToken. |
vTokenAmount |
| Amount of vToken. |
Owner Functions
setReceivers
Sets fee receivers.
Parameters | Type | Description |
---|---|---|
feeReceivers_ |
| New fee receivers array. |
changeRewardFeeTier
Sets new reward fee tier (determining which AMM pool receives vault fees).
Updating the reward fee tier here won't change the cardinality of existing AMM pools already deployed with rewardFeeTier_
. That has to be increased externally for each pool. If the new rewardFeeTier pool doesn't exist for a vToken, then the corresponding vault fees immediately become 0 until liquidity is provided in the new pool.
Parameters | Type | Description |
---|---|---|
rewardFeeTier_ |
| New reward fee tier. |
setTreasuryAddress
Sets new treasury address.
Parameters | Type | Description |
---|---|---|
treasury_ |
| New treasury address. |
setNFTXRouter
Sets NFTXRouter address.
Parameters | Type | Description |
---|---|---|
nftxRouter_ |
| New NFTXRouter address. |
pauseFeeDistribution
Pauses (or resumes) fee distribution.
Parameters | Type | Description |
---|---|---|
pause |
| Whether the contract is being paused or un-paused. |
rescueTokens
Rescues ERC20 token.
Name | Type | Description |
---|---|---|
token |
| Address of token being rescued. |
Last updated