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>
23 lines
1.1 KiB
Markdown
23 lines
1.1 KiB
Markdown
# Uniswap V3 Pricing Function Implementation
|
|
|
|
Implement the following Uniswap V3 pricing function with high precision: $ARGUMENTS
|
|
|
|
## Requirements:
|
|
1. Use `github.com/holiman/uint256` for all uint256 arithmetic
|
|
2. Ensure mathematical precision and numerical stability
|
|
3. Handle edge cases and boundary conditions
|
|
4. Include comprehensive test coverage
|
|
5. Provide performance benchmarks
|
|
|
|
## Implementation Guidelines:
|
|
- Follow the official Uniswap V3 whitepaper specifications
|
|
- Implement proper error handling for invalid inputs
|
|
- Document mathematical formulas and implementation decisions
|
|
- Optimize for performance while maintaining precision
|
|
- Consider caching strategies for expensive computations (Reference: SqrtPriceX96ToPriceCached achieved 24% performance improvement)
|
|
|
|
## Optimization Techniques (Based on Successful Implementations):
|
|
- Precompute expensive constants (e.g., `2^96`, `2^192`) to reduce computation time
|
|
- Minimize memory allocations in hot paths
|
|
- Consider object pooling for frequently created mathematical objects
|
|
- Use benchmarks to validate performance improvements |