📖
DAFI Protocol
  • DAFI Protocol
  • Introduction
    • Let's get started
    • Features
    • FAQs
  • Super Staking
    • Overview
    • Super Staking V1
      • High-level Document
      • Technical Document
    • Super Staking V2
      • Changes and Improvements
  • Guides
    • Staking DAFI
    • Functionality
    • Demand Factors
    • Reward Distributions
    • Pool Weights
    • dDAFI Claiming
  • Development
    • Smart Contracts
    • Audit v1
    • Audit v2
    • dBridge Audit
  • And More
    • Limitless Applications
Powered by GitBook
On this page

Was this helpful?

  1. Guides

dDAFI Claiming

Get your hands on some.

PreviousPool WeightsNextSmart Contracts

Last updated 3 years ago

Was this helpful?

Fragmented timeframes

As the weight accumulates, when a user decides to claim their rewards, we can extract it from the weight.

Where DPS = Distribute per second, US = User Stake, TS = Total Network Stake, UR = User Reward, and n = Time in seconds

UR1=(DPS1∗US1/TS1)+(DPS2∗US1/TS2)+(DPSn∗US1/TSn)UR1 = (DPS1 * US1 / TS1) + (DPS2 * US1 / TS2) + (DPSn * US1 / TSn)UR1=(DPS1∗US1/TS1)+(DPS2∗US1/TS2)+(DPSn∗US1/TSn)

We can calculate the user reward within a timeframe, as a to b where b > a

Where n = 1 to a,

UR1=US∗∑DPSn/TSnUR1 = US * ∑DPSn / TSnUR1=US∗∑DPSn/TSn
UR=US1∗(DPS1/TS1+DPS2/TS2+DPSx/TSx)UR = US1 * (DPS1 / TS1 + DPS2 / TS2 + DPSx / TSx)UR=US1∗(DPS1/TS1+DPS2/TS2+DPSx/TSx)

Where n = 1 to b,

When a user initiates an action in the network, where a = n > 1, we calculate n from 1 to a. When the same user initiates an action again, we calculate from 1 to b, and subtract the previous 1 to a. This can be represented as :

A user's reward between timeframe a and b can be calculated accurately as:

where n = 1 to b, and

where n = 1 to a

UR2=US∗∑DPSn/TSnUR2 = US * ∑DPSn / TSnUR2=US∗∑DPSn/TSn
UR=US∗∑DPSn/TSn,(n=1:∞)UR = US * ∑ DPSn / TSn, (n = 1 : ∞)UR=US∗∑DPSn/TSn,(n=1:∞)
URab=UR2−UR1=(US∗∑DPSn/TSn)URab = UR2 - UR1 = (US * ∑DPSn / TSn)URab=UR2−UR1=(US∗∑DPSn/TSn)
−(US∗∑DPSn/TSn)- (US * ∑DPSn / TSn)−(US∗∑DPSn/TSn)
=US∗((∑DPSn/TSn,(n=1:b))−(∑DPSn/TSn,(n=1:a)))= US * ((∑DPSn / TSn, (n=1:b)) - (∑DPSn / TSn, (n = 1:a)))=US∗((∑DPSn/TSn,(n=1:b))−(∑DPSn/TSn,(n=1:a)))