-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Dmitry Olegovich Sorokin (@sorydima) edited this page Jul 3, 2025
·
1 revision
Welcome to the wiki for the Autonomous Agent for Pythagorean Perpetual Futures (pyth-), part of the REChain Network Solutions stack.
This smart agent autonomously trades and balances perpetual derivatives using a Pythagorean-styled mathematical model, which maintains risk equilibrium through geometric positioning of long/short and margin scaling.
The pyth- agent:
- Tracks perpetual markets (price, volatility, funding)
- Calculates geometrically optimal entry/exit
- Self-adjusts position sizing based on risk distribution
- Integrates with decentralized oracles (e.g. Katya-Oracle, Pyth, REChain-native)
- Deploys trades through smart contract interfaces or relayers
Autonomous-Agent-pyth-/
โโโ models/ # Pythagorean logic, geometric balance algorithms
โโโ strategies/ # Trade entry/exit strategies
โโโ oracles/ # Oracle data ingestion layer
โโโ relayers/ # Blockchain execution adapters
โโโ state/ # Position memory, exposure logs
โโโ agents/ # Main loop: strategy selection + execution
โโโ tests/ # Unit tests
โโโ README.md
The core model works by assuming:
- Each side of the triangle (long, short, neutral) represents a risk exposure vector.
- The hypotenuse represents total position risk.
- The agent calculates exposure adjustments so that
longยฒ + shortยฒ = totalยฒ.
This creates a self-balancing leverage system for derivatives.
| Function | Description |
|---|---|
| ๐ Market Monitoring | Live monitoring of perpetual futures |
| ๐ Position Rebalancing | Adjusts positions geometrically based on Pythagorean logic |
| ๐ Strategy Switching | Switches strategy based on market conditions (volatility, funding) |
| โ Risk Control | Caps risk through risk score engine |
| ๐ง Oracle Integration | Uses real-time price feeds via Katya oracles or external APIs |
| ๐ Smart Contract Execution | Directly interacts with DeFi protocols or on-chain contracts |
RPC_URL=https://rpc.rechain.network
PRIVATE_KEY=your_private_key
ORACLE_PROVIDER=katya
MAX_RISK=0.05
STRATEGY=pyth_balancergit clone https://github.com/REChain-Network-Solutions/Autonomous-Agent-for-Pythagorean-perpetual-futures-pyth-.git
cd Autonomous-Agent-for-Pythagorean-perpetual-futures-pyth-
npm install # or pip install -r requirements.txt
npm start # or python main.pySupports:
- Katya ยฎ Oracles
- Pyth Network (via adapter)
- Chainlink or custom REChain oracles
- Private key stored securely (never exposed to logs)
- Rate limiting for market entries
- Automated fallback and shutdown if oracle fails
| System | Use Case |
|---|---|
| dChange DeFi | Trade execution |
| REChain Perp DEX | Order routing |
| PerpStats | Data visualization |
| Katya OS | Autonomous environment execution |
- zkML module for private trade decisioning
- Real-time swarm coordination with other agents
- Multi-agent reinforcement learning
- Web3 front-end for agent management
We're building a new standard for autonomous DeFi trading on top of mathematical rigor and open-source ethics.
Join us: