This reference page provides examples of various scenarios to illustrate the Mathematical Representations of OIS.
NOTE: All the symbols used in the examples are explained in the Mathematical Representation section.
This example takes the case of one pool where the pool has stake from only the publisher.

SppSpdSpCpTotal Amount eligible for RewardsEpAnnual Rate of RewardsrTotal Rewards for one yearRpPublisher RewardsRppDelegator RewardsRpdEffective Publisher APYrppEffective Delegator APYrpd=100=0=Spp+Spd=100+0=100=500=min(Sp,Cp)=min(500,100)=100=10%=r×Ep=10%×100=10=r×min(Spp,Cp)=10%×100=10=Rp−Rpp=10−10=0=SppRpp=10010=10%=SpdRpd=0%
This example takes the case where the pool has stake from both the publisher and the delegator.

SppSpdSpCpTotal Amount eligible for RewardsEpAnnual Rate of RewardsrTotal Rewards for one yearRpPublisher RewardsRppDelegator RewardsRpdEffective Publisher APYrppEffective Delegator APYrpd=100=100=Spp+Spd=100+100=200=500=min(Sp,Cp)=min(500,200)=200=10%=r×Ep=10%×200=20=r×min(Spp,Cp)=10%×100=10=Rp−Rpp=20−10=10=SppRpp=10010=10%=SpdRpd=10010=10%
This example takes the case where the combined stake of both the publisher and the delegator exceeds the cap.

SppSpdSpCpTotal Amount eligible for RewardsEpAnnual Rate of RewardsrTotal Rewards for one yearRpPublisher RewardsRppDelegator RewardsRpdEffective Publisher APYrppEffective Delegator APYrpd=300=300=Spp+Spd=300+300=600=500=min(Sp,Cp)=min(500,600)=500=10%=r×Ep=10%×500=50=r×min(Spp,Cp)=10%×300=30=Rp−Rpp=50−30=20=SppRpp=30030=10%=SpdRpd=30020=6.67%
This example demonstrates how the delegation fee affect the reward distribution between the publisher and the delegator.

SppSpdSpCpEprfRpRppRpdFee paid by DelegatorFpdFinal Delegator RewardsRpdTotal Publisher RewardsRppEffective Publisher APYrppEffective Delegator APYrpd=200=300=Spp+Spd=200+300=500=500=min(Sp,Cp)=min(500,500)=500=10%=2%=r×Ep=10%×500=50=r×min(Spp,Cp)=10%×200=20=Rp−Rpp=50−20=30=f×Rpd=2%×30=0.6=Rpd−Fpd=30−0.6=29.4=Rpp+Fpd=20+0.6=20.6=SppRpp=20020.6=10.3%=SpdRpd=30029.4=9.8%
In the example, the delegator pays a 2% fee on their rewards to the publisher. This fee is deducted from the delegator's reward and added to the publisher's reward.
This example demonstrates the impact of a slashing event on the staked PYTH tokens and rewards distributed to both the publisher and the delegator.
SppSpdSpMaximum slashing ratezPublisher Stake post slashingSppDelegator Stake post slashingSpd=300=200=Spp+Spd=300+200=500=5%=(1−5%)×300=285=(1−5%)×200=190
In this example, the stake is uniformly slashed by 5%, affecting both the publisher and the delegator. Slashing impact the total stake into the pool, regardless of the Cap.
Checkout out the detailed slashing example at Slashing Rulebook
This example shows how a publisher can increase the cap of the pool assigned to them.
As described in the Mathematical Representation, the cap is calculated as:
Cp=M⋅s∈Symbolsp∑max(ns,Z)1
In this scenario, let's assume that
- The constant parameter representing the target stake per symbol M is 100
- The constant parameter to control cap contribution Z is 5
- Current symbols published are {s1,.., s5} where for every symbol currently published ns = 5 (for i = 1 .. 5 nsi = 5)
The cap of the pool is calculated as follows:
Cp=M⋅s∈{s1,.., s5}∑max(ns,Z)1=100⋅s∈{s1,.., s5}∑max(5,5)1=100⋅s∈{s1,.., s5}∑51=100⋅1=100
Here publisher has 2 options to increase the cap of the pool assigned to it.
Assume the publisher decides to publish a new symbol with only 3 publishers, nslow = 3.
The new pool cap would change as the sum of the current cap from the 5 symbols published plus the cap gained from publishing slow (where nslow = 3 + 1 = 4)
Cpoption1=100+100⋅max(4,5)1=100+100⋅51=100+20=120
Assuming there is room to publish 5 more symbols {s6,.., s10} where each have currently 9 publishers ( for i = 6 .. 10 nsi = 9)
The new pool cap would change as the sum of the current cap from the 5 symbols published plus the cap gained from publishing the additional symbols {s6,.., s10} (where for i = 6 .. 10 nsi = 10)
Cpoption2=100+100⋅s∈{s6,.., s10}∑max(10,5)1=100+100⋅5⋅101=100+50=150
Use the calculator below to calculate publisher and delegator rewards based on your inputs.