diff --git a/components/DualModeImage.tsx b/components/DualModeImage.tsx new file mode 100644 index 00000000..96ebcb78 --- /dev/null +++ b/components/DualModeImage.tsx @@ -0,0 +1,36 @@ +import type { ComponentProps } from "react"; +import Image from "next/image"; + +type ImageProps = ComponentProps; +type Props = Omit & { + darkSrc: ImageProps["src"]; + lightSrc: ImageProps["src"]; + alt: string; +}; + +const DualModeImage = ({ + darkSrc, + lightSrc, + className, + alt, + ...props +}: Props) => { + return ( + <> + {alt} + {alt} + + ); +}; + +export default DualModeImage; diff --git a/images/ois/OIS Rewards Example Graph Light-3.png b/images/ois/OIS Rewards Example Graph Light-3.png deleted file mode 100644 index 5fc9ca09..00000000 Binary files a/images/ois/OIS Rewards Example Graph Light-3.png and /dev/null differ diff --git a/images/ois/OIS_Rewards_Example_1.png b/images/ois/OIS_Rewards_Example_Dark_1.png similarity index 100% rename from images/ois/OIS_Rewards_Example_1.png rename to images/ois/OIS_Rewards_Example_Dark_1.png diff --git a/images/ois/OIS Rewards Example 2.png b/images/ois/OIS_Rewards_Example_Dark_2.png similarity index 100% rename from images/ois/OIS Rewards Example 2.png rename to images/ois/OIS_Rewards_Example_Dark_2.png diff --git a/images/ois/OIS Rewards Example 3.png b/images/ois/OIS_Rewards_Example_Dark_3.png similarity index 100% rename from images/ois/OIS Rewards Example 3.png rename to images/ois/OIS_Rewards_Example_Dark_3.png diff --git a/images/ois/OIS Rewards Example 4.png b/images/ois/OIS_Rewards_Example_Dark_4.png similarity index 100% rename from images/ois/OIS Rewards Example 4.png rename to images/ois/OIS_Rewards_Example_Dark_4.png diff --git a/images/ois/OIS_Rewards_Example_Light_1.png b/images/ois/OIS_Rewards_Example_Light_1.png index d12e9d92..5fc9ca09 100644 Binary files a/images/ois/OIS_Rewards_Example_Light_1.png and b/images/ois/OIS_Rewards_Example_Light_1.png differ diff --git a/images/ois/OIS Rewards Example Graph Light-2.png b/images/ois/OIS_Rewards_Example_Light_2.png similarity index 100% rename from images/ois/OIS Rewards Example Graph Light-2.png rename to images/ois/OIS_Rewards_Example_Light_2.png diff --git a/images/ois/OIS_Rewards_Example_Light_3.png b/images/ois/OIS_Rewards_Example_Light_3.png new file mode 100644 index 00000000..d12e9d92 Binary files /dev/null and b/images/ois/OIS_Rewards_Example_Light_3.png differ diff --git a/images/ois/OIS Rewards Example Graph Light.png b/images/ois/OIS_Rewards_Example_Light_4.png similarity index 100% rename from images/ois/OIS Rewards Example Graph Light.png rename to images/ois/OIS_Rewards_Example_Light_4.png diff --git a/images/ois/ois_slashin_investigation_light.png b/images/ois/ois_slashin_investigation_light.png deleted file mode 100644 index 284ab937..00000000 Binary files a/images/ois/ois_slashin_investigation_light.png and /dev/null differ diff --git a/images/ois/ois_slashin_investigation_dark.png b/images/ois/ois_slashing_investigation_dark.png similarity index 100% rename from images/ois/ois_slashin_investigation_dark.png rename to images/ois/ois_slashing_investigation_dark.png diff --git a/images/ois/ois_slashing_investigation_light.png b/images/ois/ois_slashing_investigation_light.png new file mode 100644 index 00000000..9e4dffa9 Binary files /dev/null and b/images/ois/ois_slashing_investigation_light.png differ diff --git a/images/ois/ois_slashing_pool_post_light.png b/images/ois/ois_slashing_pool_post_light.png index 7801901b..a73011ab 100644 Binary files a/images/ois/ois_slashing_pool_post_light.png and b/images/ois/ois_slashing_pool_post_light.png differ diff --git a/images/ois/ois_slashing_pool_pre_light.png b/images/ois/ois_slashing_pool_pre_light.png index a3ed766b..c9e148a5 100644 Binary files a/images/ois/ois_slashing_pool_pre_light.png and b/images/ois/ois_slashing_pool_pre_light.png differ diff --git a/pages/home/oracle-integrity-staking/reward-examples.mdx b/pages/home/oracle-integrity-staking/reward-examples.mdx index 24db9aed..f7b026ea 100644 --- a/pages/home/oracle-integrity-staking/reward-examples.mdx +++ b/pages/home/oracle-integrity-staking/reward-examples.mdx @@ -1,5 +1,14 @@ import RewardSimulator from "@/components/RewardSimulator"; +import DualModeImage from "../../../components/DualModeImage"; import Image from "next/image"; +import OIS_Rewards_Example_Dark_1 from "../../../images/ois/OIS_Rewards_Example_Dark_1.png"; +import OIS_Rewards_Example_Light_1 from "../../../images/ois/OIS_Rewards_Example_Light_1.png"; +import OIS_Rewards_Example_Dark_2 from "../../../images/ois/OIS_Rewards_Example_Dark_2.png"; +import OIS_Rewards_Example_Light_2 from "../../../images/ois/OIS_Rewards_Example_Light_2.png"; +import OIS_Rewards_Example_Dark_3 from "../../../images/ois/OIS_Rewards_Example_Dark_3.png"; +import OIS_Rewards_Example_Light_3 from "../../../images/ois/OIS_Rewards_Example_Light_3.png"; +import OIS_Rewards_Example_Dark_4 from "../../../images/ois/OIS_Rewards_Example_Dark_4.png"; +import OIS_Rewards_Example_Light_4 from "../../../images/ois/OIS_Rewards_Example_Light_4.png"; # Examples @@ -28,6 +37,14 @@ $$ \end{aligned} $$ + + ## Example 2: Publisher and Delegator Stake This example takes the case where the pool has stake from both the publisher and the delegator. @@ -49,6 +66,14 @@ $$ \end{aligned} $$ + + ## Example 3: Publisher and Delegator Stake more than the Cap This example takes the case where the combined stake of both the publisher and the delegator exceeds the cap. @@ -70,6 +95,14 @@ $$ \end{aligned} $$ + + ## Example 4: Introducing Delegator Fees This example demonstrates how the delegation fee affect the reward distribution between the publisher and the delegator. @@ -95,6 +128,14 @@ $$ \end{aligned} $$ + + 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. ## Example 5: Slashing event on the pool @@ -117,6 +158,8 @@ $$ 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](./slashing-rulebook#slashing-example) + ## Example 6: Increasing the cap of the pool This example shows how a publisher can increase the cap of the pool assigned to them. diff --git a/pages/home/oracle-integrity-staking/slashing-rulebook.mdx b/pages/home/oracle-integrity-staking/slashing-rulebook.mdx index 1a5b5b3b..2b25465d 100644 --- a/pages/home/oracle-integrity-staking/slashing-rulebook.mdx +++ b/pages/home/oracle-integrity-staking/slashing-rulebook.mdx @@ -1,3 +1,13 @@ +import DualModeImage from "../../../components/DualModeImage"; +import ois_slashing_investigation_dark from "../../../images/ois/ois_slashing_investigation_dark.png"; +import ois_slashing_investigation_light from "../../../images/ois/ois_slashing_investigation_light.png"; +import ois_slashing_pool_post_dark from "../../../images/ois/ois_slashing_pool_post_dark.png"; +import ois_slashing_pool_post_light from "../../../images/ois/ois_slashing_pool_post_light.png"; +import ois_slashing_pool_pre_dark from "../../../images/ois/ois_slashing_pool_pre_dark.png"; +import ois_slashing_pool_pre_light from "../../../images/ois/ois_slashing_pool_pre_light.png"; + +import Image from "next/image"; + # Purpose and Scope This Pyth Slashing Rulebook (this ”Rulebook”) outlines the Terms & Conditions for slashing PYTH that has been staked for price feed accuracy on the Pyth network. This document develops the rules that the DAO must adhere to when assessing conditions and amounts of slashing. @@ -101,14 +111,26 @@ The Pythian councile identifies there were 9 active publishers for `FOO/USD` at It was found that 7 of the 9 publishers were influencing the price of `FOO/USD` at the time of the incident. The other 2 publishers were found publish price closely to the mediuan of the reference data. -![OIS Slashing Investigation](../../../images/ois/ois_slashin_investigation_dark.png) + ### Pythian Council Process for Slashing - Assume that the Pyth DAO has set the maximum slashable amount at 500 bps of the total stake of each responsible publisher's assigned pool, the maximum amount that can be slashed is $500 \text{ bps} \times 50\text{M} = 2.5\text{M PYTH}$. - From the investigation, \$200K of preventable liquidations were identified from on chain data, the Pythian Council could adjust the amount of stake slashed to 500K PYTH or 100bps (assuming PYTH/USD = $0.40). -![Pre Slashing Pool](../../../images/ois/ois_slashing_pool_pre_dark.png) + - The 500K PYTH slashed is charged pro-rata to the 7 pools that constitute the stake subject to slashing (i.e. calculated according to the total stake in the 7 pools assigned to the 7 publishers found responsible for the misprint). @@ -116,7 +138,13 @@ The other 2 publishers were found publish price closely to the mediuan of the re - The publisher assigned to `pool_1` would see its self-stake slashed 100bps of 6M PYTH, ie. 60K PYTH, resulting in **5.84M** residual self-stake. - Delegators to `pool_1` would see their stake slashed by 100bps of 4M PYTH, ie. 40K PYTH, resulting in **3.96M** residual delegated stake. -![Post Slashing Pool](../../../images/ois/ois_slashing_pool_post_dark.png) + - The total amount slashed in this example is 500K PYTH. This amount goes to the Pyth DAO treasury. The Pythian Council or the community can propose to the DAO to vote on means to distribute the slashed amount.