Skip to content

Conversation

@ericliujt
Copy link

@ericliujt ericliujt commented Nov 23, 2025

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: goddid.money

Pyth Product Used:

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

Blockchain/Platform:

  • Ethereum/EVM
  • Solana
  • Aptos
  • Sui
  • Fuel
  • Starknet
  • TON
  • Other: Flare (Coston2 testnet)

Description

What does this contribution do?

Check our main repo for the full project: https://github.com/ericliujt/goddid-polymarket
goddid.money converts a Polymarket trader’s verified trading history into an on chain credit profile and enables borrowing FXRP against their performance. The protocol integrates Pyth Entropy for anti-gaming loan variability.

How does it integrate with Pyth?

Each loan quote consumes verifiable randomness.
Randomness introduces controlled LTV and max borrow variation.
Prevents deterministic loan farming.
Removes backend and miner influence from credit pricing.
Deployed contract address: 0x2e951d54caD20ff3CeA95bFc79CF11FfC62E0134

What problem does it solve or demonstrate?

It demonstrates how Pyth Entropy can be used to add anti-gaming variability into credit terms (LTV and max borrow) so that users cannot deterministically farm “perfect” loan quotes from a fixed credit formula, while still keeping all randomness on-chain and verifiable.

Directory Structure (for new examples)

entropy/goddid-money/
entropy/goddid-money/
├── creditContract
│ └── CreditScore.sol
│--creditEngine
│ └── credit calculation files

Testing & Verification

How to Test This Contribution

Prerequisites

  • Node.js version: >= 18
  • pnpm / yarn / npm
  • RPC URL for Flare Coston2 testnet
  • A funded EVM wallet private key for Coston2
  • Pyth Entropy contract address on Coston2 (set via environment variables)

Setup & Run Instructions

# 1. Clone repo and move into example
git clone https://github.com/ericliujt/goddid-polymarket
cd entropy/goddid-money

# 2. Install dependencies
# choose one
yarn
# or
npm install
# or
pnpm install

# 3. Configure environment
cp .env.example .env
# then edit .env to add:
# - PRIVATE_KEY
# - COSTON2_RPC_URL
# - PYTH_ENTROPY_ADDRESS
# - XRPL + Privy/Frontend keys as needed

# 4. Compile contracts
npx hardhat compile

# 5. (Optional) Run tests
npx hardhat test

# 6. Ingest Polymarket data and compute credit score
# (these scripts hit the Polymarket endpoint, persist user data, and run the credit formula)
npx hardhat run scripts/polymarket/PolymarketUserData.ts --network coston2
npx hardhat run scripts/polymarket/PolymarketPosition.ts --network coston2
npx hardhat run scripts/creditEngine/submitPolymarketData.ts --network coston2
npx hardhat run scripts/creditEngine/runCreditScore.ts --network coston2

# 7. FXRP and FAssets operations (optional demo)
npx hardhat run scripts/fassets/getFXRP.ts --network coston2
npx hardhat run scripts/fassets/swapAndRedeem.ts --network coston2

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