Sperax
  • USDs (Sperax USD)
    • Minting and Redeeming
    • Auto Yield
      • Smart Contracts can opt in for the rebase feature (Auto-yield).
    • Stability Mechanism
    • Key parameters and functions
    • Technical documents
      • Sequence diagrams
      • Smart contracts
        • Vault
        • USDs
        • CollateralManager
        • SPA Buyback
        • MasterPriceOracle
        • Yield Reserve
        • Fee Calculator
        • RebaseManager
        • Dripper
        • BaseStrategy
      • Deployed contracts
  • Buyback Contract
  • Staking Protocol
    • Locking SPA
    • Withdrawing SPA
    • Staking Rewards
  • Demeter Protocol
    • How does Demeter Work?
    • Technical documents
      • Smart contracts
        • E721 Farms
          • E721Farm
          • Camelot V3
            • CamelotV3FarmDeployer
            • CamelotV3Farm
        • Base contracts
          • Farm
          • FarmStorage
          • FarmRegistry
          • FarmDeployer
        • Features
          • ClaimableFee
          • ExpirableFarm
          • OperableDeposit
        • Rewarder
          • Rewarder
          • RewarderFactory
      • Deployed contracts
  • Getting Started on Our DApp
    • Minting & Redeeming USDs
    • Stake SPA
  • Governance
  • Bug Bounty Program
  • FAQ
    • SPA Tokenomics
    • xSPA token
    • Smart Contract Addresses
    • How to Transfer SPA from Ethereum to Arbitrum
  • Quick Links
    • Audit Reports
    • Sperax Dapp
    • Demeter Dapp
    • Discord
    • Forum
    • Snapshot
Powered by GitBook
On this page
  • State Variables
  • oracle
  • rewarderImplementation
  • Functions
  • constructor
  • deployRewarder
  • updateRewarderImplementation
  • updateOracle
  • _validateNonZeroAddr

Was this helpful?

Export as PDF
  1. Demeter Protocol
  2. Technical documents
  3. Smart contracts
  4. Rewarder

RewarderFactory

PreviousRewarderNextDeployed contracts

Was this helpful?

Inherits: IRewarderFactory, Ownable

Author: Sperax Foundation.

This contract deploys new rewarders and keeps track of them.

State Variables

oracle

address public oracle;

rewarderImplementation

address public rewarderImplementation;

Functions

constructor

Constructor.

constructor(address _oracle) Ownable(msg.sender);

Parameters

Name
Type
Description

_oracle

address

Address of the master price oracle of USDs.

deployRewarder

Function to deploy new rewarder.

function deployRewarder(address _rwdToken) external returns (address rewarder);

Parameters

Name
Type
Description

_rwdToken

address

Address of the reward token for which the rewarder is to be deployed.

Returns

Name
Type
Description

rewarder

address

Rewarder's address.

updateRewarderImplementation

Update rewarder implementation's address

function updateRewarderImplementation(address _newRewarderImplementation) external onlyOwner;

Parameters

Name
Type
Description

_newRewarderImplementation

address

New Rewarder Implementation

updateOracle

Function to update the oracle's address.

function updateOracle(address _newOracle) public onlyOwner;

Parameters

Name
Type
Description

_newOracle

address

Address of the new oracle.

_validateNonZeroAddr

Validate address.

function _validateNonZeroAddr(address _addr) private pure;

Parameters

Name
Type
Description

_addr

address

Address to be validated.

Git Source