Skip to content

Taxation reports: per-lot cost-basis tracking with FIFO/LIFO/HIFO strategies #511

Description

@greatest0fallt1me

Description

Tax reports require per-lot cost-basis tracking with pluggable disposal strategies (FIFO, LIFO, HIFO). Add lot lifecycle tables and a strategy selector per investor jurisdiction with immutable historical evaluations.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: taxation service under src/services/
  • Strategy changes require dual-control and are effective forward-only

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/tax-cost-basis-strategies
  • Implement changes
    • Add investment_lots and disposals migrations
    • Implement CostBasisStrategy interface with FIFO/LIFO/HIFO
    • Emit per-jurisdiction gains totals
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • npm test
  • Cover edge cases
    • Fractional-share disposal splits lots correctly
  • Include test output and notes

Example commit message

feat: per-lot cost-basis strategies for tax reports

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

Stellar WaveStellar Wave issue batch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions