Files
mev-beta/orig/@prompts/database.md
Administrator c54c569f30 refactor: move all remaining files to orig/ directory
Completed clean root directory structure:
- Root now contains only: .git, .env, docs/, orig/
- Moved all remaining files and directories to orig/:
  - Config files (.claude, .dockerignore, .drone.yml, etc.)
  - All .env variants (except active .env)
  - Git config (.gitconfig, .github, .gitignore, etc.)
  - Tool configs (.golangci.yml, .revive.toml, etc.)
  - Documentation (*.md files, @prompts)
  - Build files (Dockerfiles, Makefile, go.mod, go.sum)
  - Docker compose files
  - All source directories (scripts, tests, tools, etc.)
  - Runtime directories (logs, monitoring, reports)
  - Dependency files (node_modules, lib, cache)
  - Special files (--delete)

- Removed empty runtime directories (bin/, data/)

V2 structure is now clean:
- docs/planning/ - V2 planning documents
- orig/ - Complete V1 codebase preserved
- .env - Active environment config (not in git)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 10:53:05 +01:00

973 B

You are an expert in Go database integration and data persistence. I'm building an MEV bot in Go that needs to store and query historical data for analysis and strategy optimization.

I need help with:

  1. Setting up a database for storing transaction data, token data, enchange and pool data
  2. Designing efficient database schemas for MEV data
  3. Implementing efficient data access patterns
  4. Handling database migrations
  5. Optimizing queries for performance
  6. Implementing data retention policies

Please provide production-ready Go code that:

  • Uses an embedded database like SQLite or BadgerDB
  • Implements efficient data access patterns
  • Handles database connections properly
  • Follows Go best practices
  • Includes comprehensive comments

The code should:

  • Store transaction and swap data efficiently
  • Support fast querying of historical data
  • Implement proper indexing for performance
  • Handle concurrent access safely
  • Include backup and recovery mechanisms