Skip to content

Conversation

@csking101
Copy link

Pyth Examples Contribution

Type of Contribution

  • New Example Project (Adding a new example to demonstrate Pyth integration)
  • Bug Fix (Fixing an issue in existing examples)
  • Documentation Update (Improving README, comments, or guides)
  • Enhancement (Improving existing functionality or adding features)
  • Hackathon Submission (Submitting a project from a hackathon)

Project Information

Project/Example Name:

Pyth Product Used:

  • Pyth Price Feeds
  • Pyth Entropy
  • Multiple Products
  • Other: ___________

Blockchain/Platform:

  • Ethereum/EVM
  • Solana
  • Aptos
  • Sui
  • Fuel
  • Starknet
  • TON
  • Other: Hedera

Deployed both on Ethereum and Hedera

Description

What does this contribution do?

This project demonstrates how to build a comprehensive token reputation system that:

  • Integrates Pyth Entropy for verifiable randomness in score computations for stochastic computation models
  • Fetches real-time price data from Pyth Network's oracle
  • Calculates reputation scores based on market stability, fundamental strength, and risk metrics
  • Enables autonomous agents to make portfolio rebalancing decisions
  • Supports multiple blockchain networks (EVM-compatible chains)

How does it integrate with Pyth?

Entropy-Powered Randomness

  • Uses Pyth Entropy for verifiable random number generation
  • Dynamic score adjustments based on entropy and price movements
  • Prevents predictable manipulation of reputation scores

Real-Time Price Integration

  • Fetches live cryptocurrency prices from Pyth Network
  • Supports multiple tokens (BTC, ETH, SOL, MATIC, AAVE, DOGE, USDC, etc.)
  • Price staleness checks to ensure data freshness
  • Confidence intervals for risk assessment

What problem does it solve or demonstrate?

It solves the problem of fetching real prices feeds fast, and creating a stochastic model on chain, so that the reputation information of a chain/coin can be obtained and updated in one shot. This is one component of our hackathon project.

Directory Structure (for new examples)

entropy/sentinel_protocol/
├── contract/          # Smart contracts (if applicable)
├── app/              # Frontend application (if applicable)  
├── README.md         # Project documentation
└── ...

Testing & Verification

How to Test This Contribution

This has been deployed to Base Sepolia (0x672273a0f08D25EbFF13748cDFb3Fb45105070B3) and Hedera (0x479d9f5ea676ad97e129f15724e31f770f952a3a).

Prerequisites

  • Node.js v18+ and npm/yarn
  • Solidity ^0.8.20
  • An Ethereum wallet with testnet funds
  • Basic understanding of smart contracts and oracles

Setup & Run Instructions

Instructions in the readme

Deployment Information (if applicable)

Network: Base Sepolia (Ethereum) & Hedera

Contract Address(es): Base Sepolia (0x672273a0f08D25EbFF13748cDFb3Fb45105070B3) and Hedera (0x479d9f5ea676ad97e129f15724e31f770f952a3a)

Demo URL: Please check our project - Sentinel Protocol

Checklist

Code Quality

  • Code follows existing patterns in the repository
  • Proper error handling implemented
  • No hardcoded values (use environment variables where appropriate)

Testing

  • Tested locally and works as expected
  • All existing functionality still works (no breaking changes)

Thank you for contributing to Pyth Examples!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant