Skip to content

Conversation

@aliXsed
Copy link
Collaborator

@aliXsed aliXsed commented May 27, 2024

  1. Enable an individual reward as a typed structure matching "Reward(address recipient,uint256 amount,uint256 sequence)" which should be issued by an authorised oracle and signed off-chain based on EIP-712 for the rewards.depin.nodle domain and the version "1" to be minted as NODL tokens for the recipient.
  2. For security, the contract sets a periodic quota for rewards and would not mint beyond that limit for all the claims together. If mintReward fails due to RewardQuotaExceeded, the submitter should wait for quotaRenewalTimestamp to resubmit.
  3. For replay protection, there is a sequence number in the issued reward which should match the contract's expectation as stored for each recipient.
  4. The reward quota (limit) is adjustable by the governance of the NODL contract.

@aliXsed aliXsed requested a review from ETeissonniere May 27, 2024 04:56
Copy link
Member

@ETeissonniere ETeissonniere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aliXsed can we at the very least agree to keep tests and scripts in solidity to be compatible with forge? It is ok if we have hardhat as an added compatibility layer but I'd like to remain 100% support for forge and not break apart our testing/scripting suite.

@aliXsed
Copy link
Collaborator Author

aliXsed commented May 28, 2024

@aliXsed can we at the very least agree to keep tests and scripts in solidity to be compatible with forge? It is ok if we have hardhat as an added compatibility layer but I'd like to remain 100% support for forge and not break apart our testing/scripting suite.

Sure, this is a draft just to test things and share my script with you while we were discussing the efficiency of batching.

@aliXsed aliXsed changed the title feat(rewards): test efficiency feat(rewards): implement solo claims Jun 12, 2024
@aliXsed aliXsed marked this pull request as ready for review June 13, 2024 23:12
Copy link
Member

@ETeissonniere ETeissonniere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good. Just suggested some miscellaneous cleanup though control logic looks fine from my pov.

@aliXsed aliXsed merged commit 1c7e5ec into main Jun 14, 2024
@aliXsed aliXsed deleted the aliX/test-reward-batch branch June 14, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants