Reward users for extending names
By default, rewarding users for extending names wrapped in NFTs will not be activated.
For rewarding, we distinguish between a global reward config and an NFT specific reward config. This allows users to provide higher rewards for specific NFTs that contain AENS names which they consider more valuable than others and vice versa.
The global config is defined by an account and will be applied on all NFTs this account owns.
NFT specific config always overrules the global reward-config.
When an NFT is transferred to another account, the NFT specific reward-config will be removed.
Config
reward
the amount of Æ (in ættos) to be distributed, if a user extends names wrapped in an NFT in the regularreward_block_window
reward_block_window
the window (in keyblocks) before name expiration where the definedreward
is paidemergency_reward
the amount of Æ (in ættos) to be distributed, if a user extends names wrapped in an NFT in theemergency_reward_block_window
emergency_reward_block_window
the window (in keyblocks) before name expiration where the definedemergency_reward
is paidcan_receive_from_others
defines if a users allows his NFTs to receive and wrap AENS names from othersburnable_if_empty
Note
estimate_reward
entrypoint calculates the reward based on the expiration date of the names wrapped in an NFT, considering the global config (or the NFT specific config if set) and the amount of Æ deposited by the NFT owner- in case the deposited Æ amount of the NFT owner is lower than
reward
oremergency_reward
, the remaining Æ are returned
Set global config
sequenceDiagram
actor Any user
Any user ->> NFT Contract: 1) set_global_config: config
Note left of NFT Contract: activates rewarding based on provided config
Remove global config
sequenceDiagram
actor Any user
Any user ->> NFT Contract: 1) remove_global_config
Note left of NFT Contract: deactivates rewarding by removing the config
Set NFT specific config
sequenceDiagram
actor NFT owner
NFT owner ->> NFT Contract: 1) set_nft_config: nft_id, config
Note left of NFT Contract: activates NFT specific config
Remove NFT specific reward config
sequenceDiagram
actor NFT owner
NFT owner ->> NFT Contract: 1) remove_nft_config: nft_id
Note left of NFT Contract: deactivates NFT specific config
Deposit to reward pool
sequenceDiagram
actor Any user
Any user ->> NFT Contract: 1) deposit_to_reward_pool
Note left of NFT Contract: adds the amount of ættos sent to the reward pool of an account
Withdraw reward balance
sequenceDiagram
actor Any user
Any user ->> NFT Contract: 1) withdraw_from_reward_pool: option(amount)
Note left of NFT Contract: removes the provided amount (ættios) from the reward pool of an account
Note left of NFT Contract: if no amount is provided, the complete balance in reward pool will be withdrawn