Modules
Staking modules and reward modules
GYSR v2 uses a modular architecture where the staking logic and reward logic are each contained within a swappable building block. This generalizes our system by allowing users to select from a variety of staking and reward modules when creating a pool.

The staking module encapsulates and handles all Pool logic dealing with staking assets. This includes token valuation, balance management, and transfers.
This module allows users to deposit an amount of ERC20 token in exchange for shares credited to their address.
When the user unstakes, the tokens will be returned to the user and the associated shares will be burned.
This module allows users to deposit an specified set of ERC721 tokens in exchange for shares credited to their address.
When the user unstakes, the same tokens will be returned to the user and the associated shares will be burned.
When a user stakes, they receive credit for the associated number of shares, and immediately begin to accrue share seconds. Share seconds are the primary unit of accounting in this module, and they are burned during reward distribution.
This module distributes a single ERC20 token asset as the reward. The overall reward amount and rate is fixed, but individual earning rates can vary based on participation.
This reward module was designed to facilitate a simpler staking process where earned rewards can only increase and cannot be negatively impacted by the actions of others in the Pool.
When a user stakes, they receive credit for the associated number of shares and begin earning at a rate proportional to their share of the entire Pool. As stakes are added or removed from a given Pool, the rate of earnings is adjusted for all stakes in that Pool.
This module distributes a single ERC20 token asset as the reward. The overall reward amount and rate is fixed, but individual earning rates can vary based on participation
Last modified 1yr ago