Skip to content

dealflow-id/lp-strategy-backtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTrade Agent · DeFi LP Strategy Explorer

Status Backtest SOL/USDC

An automated LP agent for Meteora DLMM. Built, tested, and learned why absolute return is hard.


🎯 What This Project Is

Aspect Description
Goal Explore automated LP strategies for absolute return
Status Research / Learning (not live trading)
Pair SOL/USDC (Meteora DLMM)
Period Dec 2024 – May 2026 (SOL $261 → $78, -70%)

📊 Key Results

Metric Best Strategy (30% exit / 168h delay)
LP Return -11.47%
HOLD Return -46.68%
Outperform +35.21%
Exits 6
Gas Cost $1.80 (realistic $0.15/tx)

Conclusion: No strategy achieved absolute profit in this bear market, but exit strategy significantly minimized loss.


🛠️ Tech Stack

  • Backend: Node.js, PM2, Solana Web3.js
  • Infra: VPS (Ubuntu), Helius RPC + Fallback
  • Monitoring: Telegram bot, Web Dashboard
  • Backtesting: Python, pandas, real Binance data

🤖 AI Orchestration, Not Vibe Coding

This project was built using AI-as-Engineer methodology, not "vibe coding" or random prompting.

My Role: AI Orchestrator

Aspect Approach
Strategic Direction Problem framing, hypothesis generation, experiment design
AI Management Directed multiple AI models (DeepSeek as lead architect, Claude, Gemini, Kimi for expert validation)
Quality Control Reviewing outputs, rejecting bad code, maintaining consistency
Integration Merging AI-generated modules into production-ready system

AI Stack (Zero Cost)

AI Role Cost
DeepSeek Lead Tech Architect + Strategic Advisor $0
Claude DeFi Expert (brutal analysis) $0
Gemini Strategy Consultant $0
Kimi DLMM Specialist $0

Why This Matters

  • Not "prompt and pray" — Every AI output was reviewed, tested, and integrated intentionally
  • Cost-effective — $0 infrastructure for ideation to execution
  • Reproducible — Method can be applied to any DeFi strategy exploration
  • Transparent — Full development log shows AI collaboration process

"I don't code. I orchestrate AIs who code."

This project is a case study in AI-augmented engineering — leveraging LLMs as domain experts, code generators, and reviewers while maintaining human strategic control.

📖 See DEVELOPMENT_LOG.md for the full AI collaboration timeline.


🧠 What I Learned

  • DLMM on volatile pairs is better for DCA than absolute return
  • Exit strategy (30%/168h) outperforms no-exit by +11%
  • Gas optimization is secondary to strategy viability
  • Knowing when to stop is a feature, not a bug

📖 Full Lessons Learned


📁 Repository Structure

gtrade/ ├── src/ # Engine modules (reusable) ├── scripts/ # Backtesting & data fetching ├── data/ # Historical candles ├── docs/ # Blueprint, lessons, AI insights ├── DEVELOPMENT_LOG.md └── README.md


🔜 Next Steps

  • Research alternative pools: USDC/USDT, SOL/JitoSOL
  • Apply same framework to correlated pairs
  • Backtest for absolute positive return

🙏 Acknowledgments

Expert insights from Claude, Gemini, and Kimi (DeFi LP specialists).


Built with curiosity and rigor.
Not every experiment yields profit. But every experiment yields knowledge.

About

Automated LP strategy experiment on Meteora DLMM (SOL/USDC). Backtest, lessons learned, AI orchestration.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors