GM Pythians,
At Trebuchet, we are committed to advancing pricing consensus protocols through transparent and verifiable simulations that are accessible to all stakeholders within the Pyth network, including data publishers. In response to discussions surrounding the Community Integrity Pool (CIP), we propose a system where executable code can be run by anyone with access to Pyth RPC. This initiative is designed to deepen understanding and foster broader consensus among network participants.
Links for Reference:
Problem Statement
-
With the latest quality score function introductions, the price is more “compressed,” and there is a penalty on the confidence score which discourages publishers from reporting higher variances. There is no incentive for alpha price deviations. How do we reward alpha? - audentes Fortuna iuvat
-
How do we make publisher staking more interactive? - Panem et circenses
The proposed enhancements introduce complex dynamics with multiple variables, such as:
- Determining the optimal predictive timeline for pricing accuracy.
- Deciding the frequency of polling for publisher price submissions.
- Deciding whether to use raw price submissions or their averages over time.
We are also evaluating different distribution mechanisms, either using centralized incentive pools or adopting closed-loop delegated stake vaults. Challenges include:
- Designing an effective reward distribution scheme based on deviations from future prices.
- Aligning rewards and penalties within a publisher-delegated staking system.
- Addressing the absence of stakes for some data publishers.
- Ensuring verifiability for all network participants and preventing potential publisher collusion, possibly through mechanisms like commit-and-reveal.
- Managing the frequency of transactions between predictive staked vaults and addressing inactivity in publishing, including setting the allowable past duration for pricing submissions for reward or penalty determination.
Proposed Solution
As an initial step, we have developed Python code that interfaces with existing Pyth RPCs. This foundational tool aims to help us quickly achieve “Pythsensus” and support the development of a smart contract extension in Rust. The code’s functionality includes:
- Data Handling: Capturing snapshots of publisher data from the Pyth network every N seconds, establishing 50% LONG and 50% SHORT positions based on the median price.
- Simulation Process: Comparing the current median aggregate price against previous snapshots to simulate transactions after M periods (or MĂ—N seconds).
- Distribution Model: Handling distributions from a single address by sorting prices by deviation for incentive distributions from a centralized source.
- Staking Considerations: Introducing publisher staking significantly alters the dynamics. The script aims to balance ratios between these variables, proposing a closed-loop system where rewards are transferred between CIP publisher accounts, emulating delegated staking and enhancing user interaction on the Pyth network.
System Configuration and Operation
- Tracking Length: The system captures and analyzes data over a fixed window of 15 updates or 60 seconds.
- Interval Duration: Observations are made every 4 seconds.
- Initial Stake: Each publisher starts with a stake of 100 units.
- Symbol for Observation: The code in github specifically monitors the “Crypto.BTC/USD” symbol.
Initial results
We ran the system for 3 days (approx 55,000 data entries) and observed a min-max reward/penalty around 7% with the current penalty function, which does not consider the absolute deviation number, just the position in the sorted outlier array.
First Thoughts:
Most stable financial products do not show more than a 7% reward per month. Thus, adding a zero in the penalty exponent limit might make the limit number 7% per month, equating to a compounded 125% APR if the publisher is alpha all year long. This could be more aligned with standard DEFI products.
Or maybe we can come up with a better penalty/reward function? We have some brilliant people here on the forum
@CMS @XBTO @ed_pyth @TheDetective @guibescos @abwrld @RealPythGod @Munoz @Auros @Stan
def exponential_penalty_function(outlier_number,total_price_components):
a = 0.0000001
b = 10 ** (2 / total_price_components)
y = a * (b ** (outlier_number - 1))
return y
Invitation for Collaboration
Following a great conversation with Michael and Jayant, we concluded it is best to run this by the community. We value your feedback and invite the community to engage with this proposal and contribute to refining this crucial infrastructure.
Questions for the Community:
- What concerns might others see in terms of publisher behavior?
- How can we refine the reward distribution scheme to align with the goals of transparency and accuracy?
Thank you for your attention. We look forward to your thoughts and contributions.
Best regards,
The Trebuchet Team