🦥
Cozy Safety Module
  • User Guides
    • Introduction
    • User FAQs
  • Developer Guides
    • Creating a Safety Module
      • Define Safety Module Configuration
      • Deploy a Safety Module
    • Manage a Safety Module
      • Replacing Triggers
    • Safety Module Deposits
    • Safety Module Redemptions / Withdrawals
    • Safety Module States
    • Safety Module Fees
    • Safety Module Slashing
    • Shared Safety Module Functionality
    • Create a Rewards Manager
      • Define a Rewards Manager Configuration
      • Deploy a Rewards Manager
      • Reward Pool Drip Models
    • Manage a Rewards Manager
      • Deposit Rewards
      • Update a Rewards Manager Configuration
    • Stake into a Rewards Manager
      • Stake
      • Claim Rewards
      • Unstake
    • Rewards Manager Accounting
    • Rewards Manager States
    • Create a Trigger
      • UMA Trigger Factory
      • Chainlink Trigger Factory
      • Ownable Trigger Factory
    • Permissions and Authorization
    • Token Integration Guidelines
    • Contract Deployments Registry
    • Payout Vaults
  • FAQ
    • Security FAQ
Powered by GitBook
On this page
  • Stake Pool Config
  • Stake Pool Assets
  • Stake Pool Rewards Weights
  • Allowed Stake Pools
  • Reward Pool Config
  • Reward Pool Assets
  • Reward Pool Drip Models
  • Allowed Reward Pools
  1. Developer Guides
  2. Create a Rewards Manager

Define a Rewards Manager Configuration

A Rewards Manager config consists of an array of stake pool and reward pool configs: StakePoolConfig[] and RewardPoolConfig[]. These configs are passed to CozyManager.createRewardsManager when deploying a new Rewards Manager.

Stake Pool Config

struct StakePoolConfig {
  // The underlying asset of the stake pool.
  IERC20 asset;
  // The rewards weight of the stake pool.
  uint16 rewardsWeight;
}

Stake Pool Assets

Each stake pool must have a unique underlying asset. When constructing StakePoolConfig[], the structs must be sorted by the address of the underlying stake asset. Passing in an array where the structs are unsorted or contain a duplicate asset will revert.

Stake Pool Rewards Weights

The rewards weight determines the share of the total rewards that are distributed to a given stake pool. For example, a rewards weight of 90% implies stakers in that pool earn 90% of all dripped reward assets.

The rewardsWeight parameter is represented as zoc (e.g. 5000 is 50%). The sum of rewards weights across all stake pools must be a zoc (or 100%).

Allowed Stake Pools

The allowedStakePools constant defines a limit on the number of stake pools in a single Rewards Manager.

Reward Pool Config

struct RewardPoolConfig {
  // The underlying asset of the reward pool.
  IERC20 asset;
  // The drip model for the reward pool.
  IDripModel dripModel;
}

Reward Pool Assets

There are no restrictions on the underlying assets of reward pools.

Reward Pool Drip Models

The drip model for a reward pool defines the rate at which assets deposited into a reward pool accrue (i.e. "drip") to stakers. Drip-decay models must conform to the IDripModel interface.

Allowed Reward Pools

The allowedRewardPools constant defines a limit on the number of reward pools in a single Rewards Manager.

PreviousCreate a Rewards ManagerNextDeploy a Rewards Manager

Last updated 10 months ago

For more details on the mechanics of drip models, see .

here