From 4a50cd22b6a72e9a436a0ca94f4aac7bb5b928de Mon Sep 17 00:00:00 2001 From: Connor Prussin Date: Wed, 18 Sep 2024 01:50:10 -0700 Subject: [PATCH] feat(staking): update faqs --- apps/staking/src/components/Faq/index.tsx | 24 +- .../src/components/GeneralFaq/index.tsx | 245 +++++--- .../src/components/PublisherFaq/index.tsx | 538 ++++++++++++++---- 3 files changed, 612 insertions(+), 195 deletions(-) diff --git a/apps/staking/src/components/Faq/index.tsx b/apps/staking/src/components/Faq/index.tsx index 024f163d1..0b07c3736 100644 --- a/apps/staking/src/components/Faq/index.tsx +++ b/apps/staking/src/components/Faq/index.tsx @@ -1,6 +1,11 @@ import clsx from "clsx"; import { LazyMotion, m, domAnimation } from "framer-motion"; -import { type HTMLProps, type ReactNode, useState } from "react"; +import { + type HTMLProps, + type ReactNode, + type ComponentProps, + useState, +} from "react"; import { Button } from "react-aria-components"; type Props = Omit, "title"> & { @@ -68,3 +73,20 @@ export const Faq = ({ title, questions, className, ...props }: Props) => { ); }; + +type FaqSectionProps = Omit, "children"> & { + questions: ComponentProps["questions"]; + header: ReactNode; +}; + +export const FaqSection = ({ + className, + header, + questions, + ...props +}: FaqSectionProps) => ( +
+

{header}

+ +
+); diff --git a/apps/staking/src/components/GeneralFaq/index.tsx b/apps/staking/src/components/GeneralFaq/index.tsx index ff618c60b..0dfcf063f 100644 --- a/apps/staking/src/components/GeneralFaq/index.tsx +++ b/apps/staking/src/components/GeneralFaq/index.tsx @@ -1,6 +1,6 @@ import type { ComponentProps } from "react"; -import { Faq } from "../Faq"; +import { FaqSection } from "../Faq"; import { Link } from "../Link"; import { ModalDialog } from "../ModalDialog"; @@ -8,131 +8,226 @@ export const GeneralFaq = ( props: Omit, "title" | "children">, ) => ( -

- Oracle Integrity Staking is the process by which a PYTH token - holder assigns some or all of their tokens to a particular data - publisher in order to increase the quality of the data published - by such data publisher and thus increase the integrity of Pyth’s - price feeds. Assigning your tokens to add to a delegatee is - known as “delegating” your tokens. + The Oracle Integrity Staking (OIS) program is an upgrade to Pyth + Price Feeds which allows participants to support the security + and reliability of the Pyth price oracle.

- By staking tokens with one or many data publishers, the token - holder indicates a degree of trust in the publisher they chose - to delegate to. The accumulated stake by each data publisher - acts as “proof” to the network that the data published is of - good quality. By weighing the collective votes from all - validators against the proportion of stake that has been - delegated to them, the network reaches consensus by this Proof - of Stake. + In OIS, each Pyth Network publisher is programmatically assigned + a stake pool. Publishers can stake tokens into those pools to + become eligible for programmatic rewards, which are tied to the + accuracy of the price data they provide. +

+

+ When non-publishers stake tokens to a publisher’s pool, that + stake helps enhance publisher potential rewards, contributing to + the security of Price Feeds. Rewards are programmatically + distributed to publishers first, with the remaining rewards + going to stakers. +

+

+ Learn more by visiting the Help section on the + OIS dashboard or by checking out the{" "} + + official announcement + + .

), }, { - question: "Who can stake into OIS?", + question: "Who can participate in OIS?", answer: - "Anyone who holds unlocked PYTH tokens can stake their unlocked tokens through the Pyth Staking Dashboard to the Oracle Integrity Staking program and or Pyth Governance program at any time.", + "Anyone with PYTH tokens can participate in OIS and interact with its contract. Whether you are a publisher or just someone who wants to help secure the oracle network, you can stake your tokens and become part of the OIS program.", }, - { - question: - "How is Oracle Integrity Staking (OIS) different from previous/existing Pyth staking?", + question: "What are the risks associated with OIS?", answer: ( -

- Existing staking program enables PYTH Token holders to participate - in the governance of Pyth in accordance with the{" "} - - Pyth DAO Constitution - - . OIS is an additional program that enables PYTH Token holders to - secure the integrity of price feeds by staking directly (if you - are a data publisher) or through delegation of stake to one or - many data publishers -

+ <> +

+ OIS includes provisions for dealing with data integrity issues + that can amount to a slashing event. +

+

+ Slashing is a process in which some portion of staked tokens (by + a publisher or by another participant) is reduced from the total + staked amount as a punitive measure for a data integrity issue + that the impacted publisher is responsible for. +

+ ), }, { - question: "What are the risks associated with OIS?", + question: + "How is OIS different from the previous Pyth staking program?", answer: ( <>

- OIS includes provisions for dealing with data integrity issues - that can amount to a “slashing” event. Slashing is a process by - which some portion of staked tokens (directly by a data - publisher or delegated to a data publisher) is reduced from the - total staked amount as a punitive measure for a data integrity - issue that the impacted data publisher has been found to be - responsible for. + The previous staking program is the Pyth Governance (PG) + program, which enables PYTH holders to participate in the + governance of Pyth Network in accordance with the{" "} + + Pyth DAO Constitution + + . +

+

+ Oracle Integrity Staking (OIS) is a new and separate program. + OIS enables PYTH holders to improve the integrity of Pyth Price + Feeds through decentralized staking and slashing mechanisms.

+ + ), + }, + { + question: + "Can I participate in both Oracle Integrity Staking (OIS) and Pyth Governance (PG)?", + answer: + "Yes. You can participate in OIS, PG, both, or neither programs. The same PYTH token can be staked simultaneously in OIS and PG in any order. To withdraw your tokens back to your wallet, the tokens must be unstaked from both OIS and PG.", + }, + { + question: "Does participating in OIS affect my participation in PG?", + answer: + "No. The two programs are separate. Staking in OIS does not affect your participation in PG. For example, staking in OIs does not increase your voting power in PG. Staking to a publisher’s stake pool does not give that publisher additional voting power in PG.", + }, + { + question: "Does slashing reduce voting weights?", + answer: + "If your tokens are slashed and these tokens were also staked in PG, then your voting power would be reduced by the slashing event", + }, + { + question: "Can I stake tokens if my tokens have a lockup schedule?", + answer: ( + <>

- This mechanism incentivises data publishers (also acting as - delegatees) to provide the highest quality data and avoid - integrity issues, as less stake committed by and/or delegated to - a data publisher means that such data publisher then accrues - fewer rewards. Being slashed can also be seen as a reputational - risk for retaining current or attracting potential future stake. + You can only stake unlocked tokens in OIS, as slashing can only + operate on unlocked tokens. However, you can stake in Pyth + Governance using both locked and unlocked tokens.

- The presence of slashing also incentivises token holders to only - delegate their tokens to data publishers they assess to be - performant, and not to delegate all their tokens to a single or - small number of publishers. + You can use the Pyth Staking Dashboard to see your lockup + schedule.

), }, + ]} + /> + +

+ The Cooldown Period has two phases: from the time you click{" "} + Unstake until the end of the current epoch, + followed by a full epoch. Tokens in the first phase are subject + to rewards and slashing. Tokens in the second phase are not. +

+ + ), + }, { question: "Where can I learn about data publishers?", answer: ( - - https://pyth.network/publishers - + <> +

+ You can see the full list of Pyth Network publishers{" "} + + here + + . You can learn more about how Pyth Price Feeds work by visiting + the{" "} + + docs + + . +

+ ), }, - { - question: "Can I stake tokens if my tokens have a lockup schedule?", - answer: - "You can only stake unlocked tokens through OIS, as slashing can only operate on unlocked tokens. Staking for Governance supports both locked and unlocked tokens.", + question: "How are publisher quality rankings calculated?", + answer: ( + <> +

+ Quality rankings are calculated based on a publisher’s price + deviation, uptime, and price staleness. You can learn more about + quality ranking calculations{" "} + + here + + . +

+ + ), }, { - question: "Where are the rewards coming from?", + question: "Can the Pyth DAO change the parameters of OIS?", answer: - "Initially, the reward pool is sponsored by the Pyth Data Association. In the future, the reward pool will collect fees from the usage of the products and protocols that Pyth provides to DeFi", + "Yes. Changes to important parameters such as stake cap inputs, delegation fees, slashing amounts, and more are subject to Operational Pyth Improvement Proposals that any PYTH token holder can raise for the consideration of the Pyth DAO.", }, ]} /> diff --git a/apps/staking/src/components/PublisherFaq/index.tsx b/apps/staking/src/components/PublisherFaq/index.tsx index 2dd312fac..ea6fc2aac 100644 --- a/apps/staking/src/components/PublisherFaq/index.tsx +++ b/apps/staking/src/components/PublisherFaq/index.tsx @@ -1,225 +1,525 @@ import type { ComponentProps } from "react"; -import { Faq } from "../Faq"; +import { FaqSection } from "../Faq"; +import { Link } from "../Link"; import { ModalDialog } from "../ModalDialog"; export const PublisherFaq = ( props: Omit, "title" | "children">, ) => ( - +

+ For a comprehensive walkthrough of the OIS program, publishers + can refer to the{" "} + + OIS Guide for MDPs + + . It is highly recommended to read this guide first. +

+

+ For a guide on the OIS parameters and reward calculations, + publishers can refer to the{" "} + + OIS Documentation + + . +

+

+ For an explanation of slashing events and their conditions, + publishers can refer to the{" "} + + Slashing Rulebook + + . +

+ + ), + }, + { + question: "Which MDPs can participate in OIS?", answer: - "Stakers can delegate PYTH tokens to any MDP that is permissioned on Pythnet through Oracle Integrity Staking.", + "All publishers can choose to participate in OIS. All publishers are already assigned a stake pool for OIS.", }, + { - question: "What is my incentive to receive delegated stake?", + question: "Is participation in OIS mandatory?", answer: - "Data publishers that have received delegated stake are eligible to earn 5% (delegation fee) of the rewards received by their delegators, provided they have opted-into receiving rewards by declaring their stake account.", + "Participation in OIS as a publisher is optional and voluntary. If you choose not to participate in OIS, you do not need to perform any actions in addition to your regular publisher activities. There are no penalties for choosing not to participate in OIS.", }, { - question: "How do I opt-in to receive rewards?", + question: "How do I opt in to receive OIS rewards as an MDP?", answer: ( <>

- Data publishers that have received locked tokens in the past (in - the context of publishing rewards like PRP) are automatically - opted-in with their existing stake account with the most funds - as their “declared stake account”. + Publishers that have locked tokens are{" "} + automatically opted-in with their existing + stake account with the most funds as their main stake account. +

+

+ Publishers that have never received locked tokens will be + opted-out by default. The opt-in process for these publishers + will be announced later.

- Data publishers that have never received locked tokens and are - interested to opt-in will need to get onboarded. They will be - opted-out by default. + If you wish to opt out of rewards, please follow the{" "} + + OIS Guide for MDPs + {" "} + and follow the Opt Out of Rewards section.

), }, { - question: "Where are my rewards sent?", - answer: "They will get sent to your declared stake account.", - }, - { - question: "How do I claim my rewards?", + question: "How do I opt out of receiving OIS rewards as an MDP?", answer: ( <>

- Rewards from self-stake will appear in the Available Rewards - bucket on the website. + If you choose not to participate in OIS{" "} + and you need to ensure that the main stake account + assigned to your publisher key does not receive + any rewards, you must opt out of OIS rewards before Thursday, + October 3, 2024 (00:00 UTC).

- Rewards from delegated-stake will appear in the Unlocked & - Unstaked bucket on the website. + Please follow the{" "} + + OIS Guide for MDPs + {" "} + and follow the Opt Out of Rewards section.

), }, { - question: "Are rewards unlocked or locked tokens?", - answer: - "OIS accepts unlocked tokens, so are the rewards paid by the program", - }, - { - question: "When are rewards distributed?", + question: + "If I opt in to receiving OIS rewards, do I have to stake as well?", answer: - "Rewards are distributed at the beginning of each Pyth epoch and are calculated based on the state during and performance during the latest complete epoch", + "No. You are not obligated to stake to OIS, even if you remain opted in for OIS rewards.", }, { - question: "What is a Pyth epoch?", - answer: - "A Pyth epoch has a duration of 7 days and starts every Thursday at 00:00 UTC", + question: + "Does opting in make me subject to both the staking rewards and slashing mechanisms?", + answer: ( + <> +

+ Yes. Opting in makes you subject to OIS’ decentralized staking + rewards and slashing mechanisms. Programmatic rewards for + staking for publishers are determined by a number of stake pool + parameters. Programmatic slashing is capped at a 5% percentage + amount of the total stake within a publisher’s stake pool. The + Pyth DAO can vote to adjust these parameters. +

+

+ Please refer to the{" "} + + OIS Documentation + {" "} + for the requirements, rules, and calculations for these + mechanisms. +

+ + ), }, + ]} + /> +

- Yes, keep in mind that to be able to change stake account both - the current and the new stake account may not have any - integrity-staked tokens. It is possible to change stake accounts - that have governance-staked tokens. + OIS includes provisions for dealing with data integrity issues + that can amount to a slashing event.

- If you want to change your declared stake account at the - beginning of the program, please do so before staking your - tokens. + Slashing is a process in which some portion of staked tokens (by + a publisher or by another participant) is slashed as a punitive + measure for a data integrity issue that the impacted publisher + is responsible for. +

+

+ It is important to understand the requirements, + responsibilities, and implications of participating in OIS. The{" "} + + OIS Guide for MDPs + {" "} + offers a quick guide on understanding whether OIS is right for + you.

), }, { question: - "Can I designate a different stake account as my associated publisher account? Thre", - answer: - "Yes, there will be a button in the Self-Stake Section (”designate different account”) that will allow you to designate a different stake account to your associated publisher account.* Please note: You can only perform this action if you have 0 self-staked tokens in OIS.", - }, - { - question: "Can I opt-out of all rewards?", + "I have previously staked in Pyth Governance (the previous program found on staking.pyth.network). Is OIS the same program?", answer: ( <>

- Any data publisher can opt-out of all rewards at any time. If - you have been automatically opted-in you have until October the - 3rd 00:00am UTC to opt-out. That’s when the first rewards will - start getting distributed. + No. The program available on{" "} + + staking.pyth.network + {" "} + before Sep 21, 2024 is the Pyth Governance (PG) program, which + enables PYTH holders to participate in the governance of Pyth + Network in accordance with the{" "} + + Pyth DAO Constitution + + .

-

Publishers can’t opt-out of being delegated to.

- There will be a button (”Opt-out of rewards”) in the Self-Stake - Section that will allow you to opt-out of rewards. Please note: - You can only perform this action if you have 0 self-staked - tokens in OIS. + Oracle Integrity Staking (OIS) is a new and separate program. + OIS enables PYTH holders to improve the integrity of Pyth Price + Feeds through decentralized staking and slashing mechanisms.

), }, { - question: "Why should I stake?", + question: + "Can I participate in both Oracle Integrity Staking (OIS) and Pyth Governance (PG)?", answer: - "Staking as a data publisher makes you eligible to receive 100% of the available rewards. This is 20x the amount of rewards you make as only being an opted-in delegatee.", + "Yes. You can participate in OIS, PG, both, or neither programs. The same PYTH token can be staked simultaneously in OIS and PG in any order. To withdraw your tokens back to your wallet, the tokens must be unstaked from both OIS and PG.", }, { - question: - "If I opt-in to receiving rewards, do I have to stake as well?", - answer: "No", + question: "Does participating in OIS affect my participation in PG?", + answer: + "No. The two programs are separate. Staking in OIS does not affect your participation in PG. For example, staking in OIS does not increase your voting power in PG. Staking to a publisher’s stake pool does not give that publisher additional voting power in PG.", }, { - question: - "Are there any penalties for not participating in Oracle Integrity Staking?", - answer: "No", + question: "Does slashing reduce voting weights?", + answer: + "If your tokens are slashed and these tokens were also staked in PG, then your voting power would be reduced insofar that the slashing event reduces the total amount of tokens that were staked in both OIS and PG.", }, - { - question: - "What are the rewards accrued and how are they split between delegatee and delegators.", - answer: - "The rewards accrued are a function the publisher’s stake soft cap, the amount of self-stake, and the amount of delegated stake. Self-stake is prioritized with regards to rewards vs delegated staked. For more details link to docs.", + question: "Can I stake tokens if my tokens have a lockup schedule?", + answer: ( + <> +

+ You can only stake unlocked tokens in OIS, as slashing can only + operate on unlocked tokens. However, you can stake in Pyth + Governance using both locked and unlocked tokens. +

+

+ You can use the Pyth Staking Dashboard to see your lockup + schedule. +

+ + ), }, - { - question: "How is my soft cap calculated?", + question: "Are OIS rewards unlocked or locked tokens?", answer: - "Soft-cap is a function how many symbols you’re permissioned to publish on Pythnet. Being permissioned to a symbol with fewer publishers increases your cap more than being permissioned to a symbol with many publishers. Link to docs.", + "In its current design, OIS rewards come in the form of unlocked PYTH tokens.", }, - { - question: "How is the yield generated?", - answer: - "The yield is currently subsidized by a grant of 100M PYTH tokens by the PDA.", + question: "When are OIS rewards distributed?", + answer: ( + <> +

+ OIS rewards are calculated and distributed at the beginning of + each new epoch and are calculated based on the state and + performance of the previous epoch. +

+

+ Please refer to the{" "} + + OIS documentation + {" "} + for more details. +

+ + ), }, - { - question: "How does slashing take place?", + question: "Does OIS affect other publisher reward programs?", answer: - "Slashing needs to happen in the epoch right after the epoch where the incident happens. The Pythian Council can choose to slash at any time for issues happened in the previous epoch.", + "No. OIS is a separate program and set of rewards from the other publisher reward programs.", + }, + ]} + /> + +

+ While publishers can use any wallet address and stake account + for OIS, it is recommended that you connect the wallet that + holds your main stake account. +

+

+ Your main stake account is the stake account where you last + received locked tokens from publishing rewards. (The latest + rewards were distributed in August 2024). +

+

+ Please refer to the{" "} + + OIS Guide for MDPs + {" "} + for more details. +

+ + ), }, - { - question: "How much of my stake will I lose in slashing?", - answer: "5% in the unlikely event of a data quality issue", + question: "How do I know if I have connected my main stake account?", + answer: ( + <> +

+ In the upper-right corner of the homepage, click your wallet + address and hover over Select stake account. If + your main stake account is connected, its address will appear + under the Main Account header and will be + highlighted. +

+

+ Please refer to the{" "} + + OIS Guide for MDPs + {" "} + for more details. +

+ + ), }, - { question: - "Is there a cooldown period for unstaking? If so, how long?", - answer: - "There is a cooldown for unstaking of 1 full epoch. This means you will have to wait for the end of the current epoch and then 1 full epoch. This is because you can’t withdraw your funds until the Pythian Council has had one epoch to review the price data during the epoch where your stake was active.", + "Can I reassign a different stake account as my main stake account?", + answer: ( + <> +

+ Yes. You can reassign a different stake account as your main + stake account. First, connect your old main stake account. Then + proceed to the{" "} + Oracle Integrity Staking (OIS) tab. Find your{" "} + Self-Staking Section and click{" "} + Reassign Stake Account. +

+

+ Please note that in order to reassign your{" "} + main stake account, both the current{" "} + main stake account and new stake account cannot + have any tokens staked in OIS. +

+

+ Please refer to the{" "} + + OIS Guide for MDPs + {" "} + for more details. +

+ + ), }, - { - question: - "Would staking affect the PRP award results at all, or is Oracle Integrity Staking considered something categorically separate from the PRP?", - answer: "These are separate rewards and separate programs", + question: "How do I start staking as an MDP?", + answer: ( + <> +

+ Please refer to the{" "} + + OIS Guide for MDPs + {" "} + for a comprehensive guide on how to use OIS. +

+

+ You can also find a quick visual guide by proceeding to the{" "} + Oracle Integrity Staking (OIS) tab in the Pyth + Staking Dashboard homepage and clicking Help. +

+ + ), }, + ]} + /> +

- Previously, staking was limited to participation in governance. - Now, Oracle Integrity Staking is also available. A token can be - staked in Oracle Integrity Staking and governance staking - simultaneously and the new website allows managing both types of - staking. + By staking tokens to your pool as a publisher, you can become + eligible for on-chain rewards for your published data. Rewards + for each stake pool are generated at the end of every epoch.

- Oracle Integrity Staking is analogous to governance staking with - 3 main differences: + The OIS program first distributes rewards to publishers, with + any remaining rewards going to the stakers who supported those + publishers. Additionally, as a publisher, you earn delegation + fees from the rewards to your pool. +

+

+ For a detailed breakdown, you can refer to these{" "} + + reward calculation examples + + .

-
    -
  • Oracle Integrity Staking exposes the users to slashing
  • -
  • Oracle Integrity Staking is eligible for rewards
  • -
  • - Oracle Integrity Staking doesn’t provide any voting power -
  • -
), }, { - question: - "How does delegated staking take place from a community member/retail user perspective", - answer: - "Community members use the same portal to stake their tokens.", + question: "What factors affect my reward potential as an MDP?", + answer: ( + <> +

+ The total amount of rewards a stake pool generates is determined + by the total number of tokens staked in the pool (by both the + publisher and stakers). +

+

+ The reward amount increases with the size of the total stake, up + to a limit called the stake cap. The stake cap + is a function how many symbols you are permissioned to publish + on Pythnet. The increase in the cap for adding a new symbol is + inversely proportional to the number of publishers supporting + it. +

+

+ For a detailed explanation, you can refer to the{" "} + + OIS documentation + + . +

+ + ), }, - { - question: - "Are there any plans to make staking a mandatory requirement to publish data on Pythnet?", - answer: "Not right now.", + question: "What is the source of OIS rewards?", + answer: ( + <> +

+ This initial set of OIS rewards is bootstrapped by Pyth Data + Association. Please refer to the{" "} + + official announcemen + + t for more information. +

+ + ), }, - { - question: - "If I dont stake, is there any penalty possible for me as a publisher in case of misprint?", + question: "What triggers a slashing event?", + answer: ( + <> +

+ An on-chain protocol can report a potential data error for the + previous epoch. If a report is raised, the Pythian Council + reviews it by comparing it with the reference data. If a + discrepancy is confirmed, a slashing event is triggered. +

+

+ During the same epoch, the stakes of the subset of publishers + involved in the error and their stakers are slashed. Slashed + amounts are sent to the DAO wallet for future decisions. +

+

+ Please refer to the{" "} + + Slashing Rulebook + {" "} + for more details. +

+ + ), + }, + { + question: "What is the slashing penalty rate?", answer: - "There won’t be any direct penalty. However there are reputational risks.", + "The current slashing rate is capped at 5% of a pool’s total stake. The Pyth DAO can vote to adjust this rate.", }, ]} />