Skip to content

Pythathon - Guards | Risk Leveled Treasury#100

Open
f0x1777 wants to merge 9 commits intopyth-network:mainfrom
SOLx-AR:codex/guards-one-submission
Open

Pythathon - Guards | Risk Leveled Treasury#100
f0x1777 wants to merge 9 commits intopyth-network:mainfrom
SOLx-AR:codex/guards-one-submission

Conversation

@f0x1777
Copy link

@f0x1777 f0x1777 commented Mar 22, 2026

Pyth Examples Contribution

Team Name: Guards
Submission Name: Guards One
Team Members: @f0x1777 @kevan1 @joaco05
Contact: @f0x1777

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: Guards One

Pyth Product Used:

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

Blockchain/Platform:

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

Description

What does this contribution do?

Guards is a multichain treasury protection workflow focused on monitoring liquid portfolio value, fiat/stable floors, and automated de-risking conditions. This submission focuses on the Cardano deployment surface.

How does it integrate with Pyth?

It uses Pyth price feeds as the oracle layer for treasury risk evaluation and oracle-aware execution decisions, with Cardano as the primary live surface for this hackathon submission.

What problem does it solve or demonstrate?

It demonstrates how a treasury can use Pyth data to protect stable-denominated value and react to market deterioration with objective rules across chains, while delivering the Cardano implementation in this submission.

Testing & Verification

How to Test This Contribution

The current implementation can be verified in three layers:

  1. Static checks: typecheck and unit/integration tests
  2. Local simulation: deterministic breach -> de-risk -> exit -> recovery flow
  3. Live oracle wiring: fetch a real signed Pyth update for Cardano preprod

Prerequisites

  • Node.js >= 24.0.0
  • pnpm
  • A .env file based on .env.example
  • A valid PYTH_API_KEY
  • Cardano preprod configuration for live verification:
    • PYTH_PREPROD_POLICY_ID
    • CARDANO_BLOCKFROST_PROJECT_ID
    • CARDANO_PYTH_STATE_REFERENCE

Setup & Run Instructions

pnpm install
cp .env.example .env

# Static validation
pnpm typecheck
pnpm test

# Deterministic treasury simulation
pnpm simulate

# Fetch a live signed Pyth update for the Cardano preprod flow
pnpm pyth:fetch-live

# Run the UI locally
pnpm --dir apps/ui dev

Local UI routes:

  • Landing: http://localhost:3000
  • Dashboard: http://localhost:3000/dashboard

Deployment Information (if applicable)

Current deployment target for the hackathon is Cardano preprod.

Relevant deployment/runtime notes:

  • Pyth preprod policy id:
    d799d287105dea9377cdf9ea8502a83d2b9eb2d2050a8aea800a21e6
  • Frontend can be deployed from apps/ui
  • Off-chain oracle/keeper services require a Node 24 runtime plus the Cardano/Pyth environment variables listed above
  • The multichain control-plane logic is shared, but this submission's live execution path is centered on Cardano preprod

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)

Additional Context

Related Issues

N/A

Screenshots/Demo (if applicable)

Not added yet.

Notes for Reviewers

Draft bootstrap only. This PR currently contains the initial project description under lazer/cardano/guards/ and will be updated incrementally.

@f0x1777 f0x1777 changed the title Pythathon: guards.one Cardano treasury control plane DRAFT: guards.one placeholder only Mar 22, 2026
@f0x1777 f0x1777 changed the title DRAFT: guards.one placeholder only DRAFT: guards | initial Cardano submission bootstrap Mar 22, 2026
@f0x1777 f0x1777 changed the title DRAFT: guards | initial Cardano submission bootstrap Pythathon - Guards | Risk Leveled Treasury Mar 22, 2026
@f0x1777 f0x1777 marked this pull request as ready for review March 23, 2026 00:05
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