Skip to content

APR Reward Notifier Unit Testing #160

Description

@alexkeating

Description

  • Branch off of feature/apy-reward-notifier
  • Add unit testing for the following functions, fuzz as many params as possible:
  • notifyDecrease
    • The staker is above target and needs to be notified below target
    • Two stakers where one staker unstakes causing the rewards to be off target. Notify to be on target. make sure you fuzz the amount of time before the unstake.
    • Emits correct event
    • Revert if already below target
    • Revert if caller does not have necessary role
  • notifyIncrease
    • The staker is below target and needs to be notified above target
    • Two stakers are staked and a third staker pushes the the rewards below the target
    • Emits correct event
    • Revert if above target
    • Revert if called with wrong role
  • Set max earning power multiplier
    • Updates max earning power multiple
    • Emits event
    • Reverts if called with wrong role
    • revert if 0
  • Repeat set max earning power playbook for the rest of the setters.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions