diff --git a/apps/staking/src/components/AccountSummary/index.tsx b/apps/staking/src/components/AccountSummary/index.tsx index 6ba1fe5ff..4cff979d7 100644 --- a/apps/staking/src/components/AccountSummary/index.tsx +++ b/apps/staking/src/components/AccountSummary/index.tsx @@ -482,7 +482,7 @@ const ClaimDialogContents = ({ .finally(() => { setCloseDisabled(false); }); - }, [execute, toast]); + }, [execute, toast, close, setCloseDisabled]); return ( <> diff --git a/apps/staking/src/components/OracleIntegrityStakingGuide/index.tsx b/apps/staking/src/components/OracleIntegrityStakingGuide/index.tsx index cb5149387..1d44f3789 100644 --- a/apps/staking/src/components/OracleIntegrityStakingGuide/index.tsx +++ b/apps/staking/src/components/OracleIntegrityStakingGuide/index.tsx @@ -15,6 +15,7 @@ import totalBalance from "./total-balance.png"; import unlockedAndUnstaked from "./unlocked-and-unstaked.png"; import warmupPeriods from "./warmup-periods.png"; import { Guide } from "../Guide"; +import { Link } from "../Link"; import ObtainRewards from "../NoWalletHome/obtain-rewards.svg"; import Safebox from "../NoWalletHome/safebox.svg"; import SelectPublishers from "../NoWalletHome/select-publishers.svg"; @@ -105,8 +106,8 @@ export const OracleIntegrityStakingGuide = ( This balance refers to the amount of (unlocked) tokens that are not staked in either Oracle Integrity Staking or Pyth Governance. (Locked tokens refer to tokens that have not - vested.) Unlocked & Unstaked tokens are therefore tokens you can - withdraw at any time. + vested.) Unlocked & Unstaked tokens are + therefore tokens you can withdraw at any time.

), }, @@ -117,8 +118,9 @@ export const OracleIntegrityStakingGuide = (

This balance refers to your total accumulated amount of tokens programmatically rewarded for participating in Oracle Integrity - Staking. Available Rewards can be claimed at any time. Claimed - rewards will move to the Unlocked & Unstaked balance. + Staking. Available Rewards can be claimed at + any time. Claimed rewards will move to the{" "} + Unlocked & Unstaked balance.

), }, @@ -199,30 +201,190 @@ export const OracleIntegrityStakingGuide = ( { title: "Publisher Quality", description: ( -

- Oracle Integrity Staking incentivizes publishers to deliver - high-quality data, which is measured by a quality ranking - system. This ranking is based on three key factors: Uptime, - Price Deviation, and Price Staleness. Stakers can use these - rankings to help ensure the security of the price oracle. -

+ <> +

+ Oracle Integrity Staking incentivizes publishers to deliver + high-quality data, which is measured by a quality ranking + system. This ranking is based on three key factors: Uptime, + Price Deviation, and Price Staleness. Stakers can use these + rankings to help ensure the security of the price oracle. +

+

+ Learn more about how quality rankings are calculated from the{" "} + + documentation + + . +

+ ), image: publisherQuality, }, + { + title: "Staking Rewards", + description: ( + <> +

+ The total rewards generated by a stake pool depends on the + total number of tokens staked by the publisher and any + stakers. +

+

+ As more tokens are staked to that pool, the stake pool’s total + potential rewards increases, up to a limit called the stake + cap. Publishers can raise their stake cap by supporting more + symbols (price feeds). Rewards are programmatically + distributed to publishers who provided high quality price data + that epoch. Any remaining rewards are distributed among the + stakers who supported these publishers. Publishers have + priority over rewards. +

+

+ The Pyth DAO sets a maximum reward rate for + stake pools, currently set at 10%. This rate is achieved for a + pool when the total stake is below the stake cap. If the stake + cap is exceeded, the reward rate for stakers is reduced. +

+

+ Publishers charge a fixed percentage (20%) of the rewards from + stakers in their stake pool as a delegation fee (net of any + slashed amount). The Pyth DAO can vote to adjust this fee + structure. Learn more about staking rewards in the + documentation. +

+ + ), + image: stakingRewards, + }, + { + title: "Slashing", + description: ( + <> +

+ Slashing helps ensures the integrity of Pyth Price Feeds by + penalizing publishers who provide inaccurate data. This + mechanism protects the oracle network but may affect your + stake if a publisher pool you delegate tokens towards is + penalized. +

+

+ The current slashing rate is capped at 5% of publisher and + delegated stakes, and this rate can be adjusted by the Pyth + DAO. The slashed amounts are sent to the DAO wallet. The Pyth + DAO can choose to vote on future decisions for these slashed + amounts, such as opting to send them to parties affected by an + oracle misprint or using them in another way to support Pyth + Network. +

+ + ), + image: slashing, + }, ], faq: { title: "Publisher Selection FAQ", questions: [ { - question: "Where do Oracle Integrity Staking rewards come from?", - answer: - "The yield for Oracle Integrity Staking currently comes from an allocation of 100M unlocked PYTH tokens by the Pyth Data Association. The Pyth DAO can vote to introduce new sources of yield in the future.", + question: "What factors can increase a stake pool’s yield?", + answer: ( + <> +

+ A higher stake cap for a stake pool allows that publisher to + increase the pool’s notional rewards. +

+

+ A publisher can increase their stake cap by supporting more + symbols. The pool’s notional rewards may be a factor to + consider when selecting a publisher to stake with. The + maximum reward rate functions as an absolute limit to any + publisher stake pool’s yield potential. +

+

+ The Pyth DAO can vote to adjust these parameters. Learn more + about how rewards are calculated in the{" "} + + documentation + + . +

+ + ), }, { question: - "What is the denomination of the Oracle Integrity Staking rewards?", + "Can I still stake to pool whose total stake exceeds its stake cap?", + answer: ( + <> +

+ Yes, you can still stake tokens to a pool whose total stake + exceeds its stake cap. In this situation, the programmatic + reward rate for stakers mathematically decreases as the + amount of remaining rewards in the pool must be shared with + more delegated tokens. Learn more about how rewards are + calculated in the{" "} + + documentation + + . +

+ + ), + }, + { + question: "What do Estimated Next APY and Historical APY mean?", answer: - "The yield for Oracle Integrity Staking is currently denominated in PYTH tokens. The Pyth DAO can vote to include other digital assets in the reward set in the future.", + "Estimated Next APY shows an estimated annualized reward rate for tokens staked to this stake pool based on the current stake pool composition plus the amount of tokens currently in warmup. Historical APY displays in a spark chart the past instantaneous annualized reward rates for that publisher for past epochs.", + }, + { + question: "What are delegation fees?", + answer: + "Delegation fees act as an incentive for publishers to publish data for more symbols (price feeds) to increase their stake cap. Publishers currently charge a fixed percentage of the rewards from stakers in their stake pool as a delegation fee (net of any slashed amount). The Pyth DAO can vote to adjust this fee structure.", + }, + { + question: "How are slashing events determined?", + answer: ( + <> +

+ Anyone can choose to raise a report for a plausible data + misprint. The Pythian Council of the Pyth DAO will then + review the reference data provided and compare against the + Pyth data to determine whether a slashing event should + occur. The council will have until the end of the epoch + after the epoch of the reported incident to review the + report. The tokens subject to slashing are the tokens + eligible for rewards{" "} + during the epoch of the misprint incident. +

+

+ In the unlikely event that a published aggregate has been + found to be erroneous, a slashing event would then be + triggered. The stakes of the subset of publishers who + contributed to this incorrect aggregate are programmatically + slashed, along with the stakes of anyone who delegated + tokens towards them. Such slashing event occurs during the + epoch after the epoch of the reported incident. +

+

+ The slashed amounts are sent to the Pyth DAO’s wallet. The + Pyth DAO can choose to vote on future decisions for these + slashed amounts, such as opting to send them to parties + affected by the oracle misprint or using them in another way + to support Pyth Network. +

+ + ), }, { question: "Does the slashing mechanism affect stakers?", @@ -239,16 +401,17 @@ export const OracleIntegrityStakingGuide = ( <>

Once you confirm your choice to stake to a publisher, your tokens - will first enter a Warmup Period, which lasts until the end of the - current epoch. An epoch is a one-week period starting every - Thursday at 00:00 UTC. + will first enter a Warmup Period, which lasts + until the end of the current epoch. An epoch is a one-week period + starting every Thursday at 00:00 UTC.

- Tokens in the Warmup Period do not contribute to oracle security - and are not eligible for sharing in publisher rewards or - penalties. Once the Warmup Period ends, these tokens become staked - and will play an active role in strengthening oracle integrity. + Tokens in the Warmup Period do not contribute to + oracle security and are not eligible for sharing in publisher + rewards or penalties. Once the Warmup Period{" "} + ends, these tokens become staked and will play an active role in + strengthening oracle integrity.

), @@ -289,11 +452,11 @@ export const OracleIntegrityStakingGuide = ( title: "Staked Tokens", description: (

- Tokens that complete the Warmup Period become officially staked. - Staked tokens contribute to oracle integrity by enhancing - potential publisher rewards and incentivizing high quality data - contributions. Accordingly, staked tokens are subject to both - programmatic rewards and slashing penalties. + Tokens that complete the Warmup Period become + officially staked. Staked tokens contribute to oracle integrity + by enhancing potential publisher rewards and incentivizing high + quality data contributions. Accordingly, staked tokens are + subject to both programmatic rewards and slashing penalties.

), image: stakedTokens, @@ -337,9 +500,10 @@ export const OracleIntegrityStakingGuide = (

Rewards for stakers are calculated at the end of each epoch and - added to the Available Rewards balance. When you claim your - rewards, the tokens move to Unlocked & Unstaked, where you can - choose to restake or withdraw them to your wallet. + added to the Available Rewards balance. When you + claim your rewards, the tokens move to{" "} + Unlocked & Unstaked, where you can choose to + restake or withdraw them to your wallet.

@@ -355,12 +519,16 @@ export const OracleIntegrityStakingGuide = ( <>

Rewards from helping secure the oracle will accumulate as - Available Rewards at the top of the dashboard. Click Claim to - move these rewards to Unlocked & Unstaked. + Available Rewards at the top of the + dashboard. Click Claim to move these rewards + to Unlocked & Unstaked.

Rewards must be claimed within one year of the epoch in which - they were generated. + they were generated. Claiming rewards from each pool + constitutes a separate transaction which incurs a very small + Solana transaction fee. You may have to click Claim multiple + times to fully claim the rewards.

), @@ -388,92 +556,10 @@ export const OracleIntegrityStakingGuide = ( ), image: cooldownPeriods, }, - { - title: "Staking Rewards", - description: ( - <> -

- The total rewards generated by a stake pool depends on the - total number of tokens staked by the publisher and any - stakers. -

-

- As more tokens are staked to that pool, the stake pool’s total - potential rewards increases, up to a limit called the stake - cap. Publishers can raise their stake cap by supporting more - symbols (price feeds). Rewards are programmatically - distributed to publishers who provided high quality price data - that epoch. Any remaining rewards are distributed among the - stakers who supported these publishers. Publishers have - priority over rewards. -

-

- The Pyth DAO sets a maximum reward rate for stake pools, - currently set at 10%. This rate is achieved for a pool when - the total stake is below the stake cap. If the stake cap is - exceeded, the reward rate for stakers is reduced. -

-

- Publishers charge a fixed percentage (20%) of the rewards from - stakers in their stake pool as a delegation fee (net of any - slashed amount). The Pyth DAO can vote to adjust this fee - structure. Learn more about staking rewards in the - documentation. -

- - ), - image: stakingRewards, - }, - { - title: "Slashing", - description: ( - <> -

- Slashing helps ensures the integrity of Pyth Price Feeds by - penalizing publishers who provide inaccurate data. This - mechanism protects the oracle network but may affect your - stake if a publisher pool you delegate tokens towards is - penalized. -

-

- The current slashing rate is capped at 5% of publisher and - delegated stakes, and this rate can be adjusted by the Pyth - DAO. The slashed amounts are sent to the DAO wallet. The Pyth - DAO can choose to vote on future decisions for these slashed - amounts, such as opting to send them to parties affected by an - oracle misprint or using them in another way to support Pyth - Network. -

- - ), - image: slashing, - }, ], faq: { title: "Oracle Integrity Yield FAQ", questions: [ - { - question: "What factors can increase a stake pool’s yield?", - answer: ( - <> -

- A higher stake cap for a stake pool allows that publisher to - increase the pool’s notional rewards. -

-

- A publisher can increase their stake cap by supporting more - symbols. The pool’s notional rewards may be a factor to - consider when selecting a publisher to stake with. The - maximum reward rate functions as an absolute limit to any - publisher stake pool’s yield potential. -

-

- The Pyth DAO can vote to adjust these parameters. Learn more - about how rewards are calculated in the documentation. -

- - ), - }, { question: "What do the two phases of a Cooldown Period mean?", answer: ( @@ -499,54 +585,15 @@ export const OracleIntegrityStakingGuide = ( ), }, { - question: - "Can I still stake to pool whose total stake exceeds its stake cap?", - answer: - "Yes, you can still stake tokens to a pool whose total stake exceeds its stake cap. In this situation, the programmatic reward rate for stakers mathematically decreases as the amount of remaining rewards in the pool must be shared with more delegated tokens. Learn more about how rewards are calculated in the documentation.", - }, - { - question: "How are slashing events determined?", - answer: ( - <> -

- Anyone can choose to raise a report for a plausible data - misprint. The Pythian Council of the Pyth DAO will then - review the reference data provided and compare against the - Pyth data to determine whether a slashing event should - occur. The council will have until the end of the epoch - after the epoch of the reported incident to review the - report. The tokens subject to slashing are the tokens - eligible for rewards{" "} - during the epoch of the misprint incident. -

-

- In the unlikely event that a published aggregate has been - found to be erroneous, a slashing event would then be - triggered. The stakes of the subset of publishers who - contributed to this incorrect aggregate are programmatically - slashed, along with the stakes of anyone who delegated - tokens towards them. Such slashing event occurs during the - epoch after the epoch of the reported incident. -

-

- The slashed amounts are sent to the Pyth DAO’s wallet. The - Pyth DAO can choose to vote on future decisions for these - slashed amounts, such as opting to send them to parties - affected by the oracle misprint or using them in another way - to support Pyth Network. -

- - ), - }, - { - question: "What do Estimated Next APY and Historical APY mean?", + question: "Where do Oracle Integrity Staking rewards come from?", answer: - "Estimated Next APY shows an estimated annualized reward rate for tokens staked to this stake pool based on the current stake pool composition plus the amount of tokens currently in warmup. Historical APY displays in a spark chart the past instantaneous annualized reward rates for that publisher for past epochs.", + "The yield for Oracle Integrity Staking currently comes from an allocation of 100M unlocked PYTH tokens by the Pyth Data Association. The Pyth DAO can vote to introduce new sources of yield in the future.", }, { - question: "What are delegation fees?", + question: + "What is the denomination of the Oracle Integrity Staking rewards?", answer: - "Delegation fees act as an incentive for publishers to publish data for more symbols (price feeds) to increase their stake cap. Publishers currently charge a fixed percentage of the rewards from stakers in their stake pool as a delegation fee (net of any slashed amount). The Pyth DAO can vote to adjust this fee structure.", + "The yield for Oracle Integrity Staking is currently denominated in PYTH tokens. The Pyth DAO can vote to include other digital assets in the reward set in the future.", }, ], }, diff --git a/apps/staking/src/components/OracleIntegrityStakingGuide/staking-rewards.png b/apps/staking/src/components/OracleIntegrityStakingGuide/staking-rewards.png index 5047e12bd..cc3b034d2 100644 Binary files a/apps/staking/src/components/OracleIntegrityStakingGuide/staking-rewards.png and b/apps/staking/src/components/OracleIntegrityStakingGuide/staking-rewards.png differ diff --git a/apps/staking/src/components/TransferButton/index.tsx b/apps/staking/src/components/TransferButton/index.tsx index 4e6b98cf3..bcf5544e8 100644 --- a/apps/staking/src/components/TransferButton/index.tsx +++ b/apps/staking/src/components/TransferButton/index.tsx @@ -187,7 +187,7 @@ const DialogContents = ({ setCloseDisabled(false); }); }, - [execute, close, setCloseDisabled, toast], + [execute, close, setCloseDisabled, toast, successMessage], ); return (