Add Dark Forest Underground OTC Integration #142
+3,771
−1,320
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR introduces a comprehensive integration of the Dark Forest Underground OTC (Over-the-Counter) trading system into the ZerePy agent framework, with a focus on Sonic testnet and ERC20 gem token trading. Key features and changes include:
Key Features
Sonic/OTC Agent (zeotc1):
New agent configuration (agents/zeotc1.json) for a chaotic, Gen-Z, female crypto degen persona.
Automated tasks for Sonic balance checks, gem token management, OTC ask creation/filling, and social activity (Twitter/X).
Customizable trading logic and tweet style.
OTC Contract Actions:
Actions for making, filling, and fetching OTC asks, including auto-cleanup of expired asks.
Support for ERC20 gem tokens and rarity-based pricing.
All actions are modular and can be scheduled as agent tasks.
Conversational Logging:
All Sonic/OTC actions are logged in a conversational, chat-like format and sent to a backend API (https://server.zeotc.xyz/api/message/create).
Logging is handled via a decorator (log_sonic_action) for easy extensibility.
Productionization:
Docker-ready setup with persistent storage, health checks, and automatic agent startup.
Startup script automates agent loading and execution on container/service boot.
Documentation:
Added a comprehensive section to README.md detailing the Sonic/OTC agent setup, production deployment, conversational logging, and customization instructions.
How to Use
See the new section in README.md for step-by-step setup, configuration, and deployment instructions.
Customize agent behavior, trading logic, and social persona via agents/zeotc1.json and the relevant action files.
Troubleshooting
Ensure .env contains the required API credentials for backend logging.
Check Docker/container logs for errors if the agent or logging is not functioning as expected.
Files Changed:
README.md (major new section)
agents/zeotc1.json (agent config)
src/actions/sonic_actions.py, src/actions/zeotc_actions.py (OTC actions)
src/helpers/init.py (logging decorator)