Morpheus
GitHubDiscordX/Twitter
Infohub
Infohub
  • 🙌Meet Morpheus
    • What is Morpheus?
    • MySuperAgent
      • Difference Between an LLM and an AI Agent
    • Key Use Cases
    • Launch Phases
    • Morpheus Contributors
    • Atomic Governance
    • 10 Reasons to be Excited About Morpheus
  • 📶Tokenomics
    • MOR Utility
    • MOR Emissions
    • Techno Capital Machine
      • MOR 20 Fair Launch Standard
    • Protocol-Owned Liquidity (PoL)
    • MOR Rewards Staking
    • stETH Referral System
  • 🎓Smart Contracts
    • Documentation
      • Distribution V4
      • L1 Sender
      • L2 Message Receiver
      • L2 Token Receiver V2
      • Linear Distribution Interval Decrease
      • MOR OFT
      • MOR 20 Contracts
    • Multisignature account
  • 🛡️Security Audits
    • Morpheus Bug Bounty Program
    • Protection Fund
  • ❓FAQs
    • MOR Token and Liquidity
    • MOR Rewards Staking
    • Capital Providers
    • Code Providers
    • Compute Providers
    • Application Builders
  • 🔗Verified Links
  • 🌟Brand Assets
Powered by GitBook
LogoLogo

Socials

  • X/Twitter
  • Discord
  • Telegram
  • Youtube

GitHub

  • Documentation
  • Morpheus Local Agents
  • Compute Node
  • Smart Contracts

Dashboards

  • mor.org
  • mor.software
  • morlord.com
  1. Smart Contracts
  2. Documentation

Linear Distribution Interval Decrease

Last updated 7 months ago

Was this helpful?

is a custom library used by Distribution to calculate MOR token rewards for a specified period. It supports linear distribution schedules with stepped decreases at regular intervals.

Functions

getPeriodReward

function getPeriodReward(
    uint256 initialAmount_,
    uint256 decreaseAmount_,
    uint128 payoutStart_,
    uint128 interval_,
    uint128 startTime_,
    uint128 endTime_
    ) external pure returns (uint256)

Calculates and returns the reward amount for a given period and distribution parameters. The calculation accounts for partial intervals pro rata.

Parameters

Name
Type
Description

initialAmount_

uint256

The initial reward amount per interval.

decreaseAmount_

uint256

The amount by which the reward decreases each interval.

payoutStart_

uint128

The timestamp at which the distribution schedule starts.

interval_

uint128

The duration of each interval in seconds.

startTime_

uint128

The timestamp at which the period starts.

endTime_

uint128

The timestamp at which the period ends.

Return Values

Type
Description

uint256

The reward for the specified period.

🎓
LinearDistributionIntervalDecrease.sol