Skip to content

Profit fee formula golden vectors from docs #734

@Baskarayelu

Description

@Baskarayelu

Description

Add table-driven tests matching docs/contracts/profit-fee-formula.md examples.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Align with existing Soroban contract patterns in quicklendx-contracts

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/profit-fee-golden-vectors
  • Implement changes
  • Write contract: src/profits.rs
  • Write comprehensive tests: src/test_profit_fee_formula.rs, src/test_profit_fee.rs
  • Add documentation: docs/contracts/profit-fee-formula.md
  • Include NatSpec-style comments (Rust doc comments on public items)
  • Validate security assumptions

Test and commit

  • Run tests
  • Cover edge cases
  • Include test output and security notes

Example commit message

test: add profit fee golden vectors from docs

Guidelines

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programcalculationsAuto label for contract issues: calculationspriority-mediumAuto label for contract issues: priority-mediumprofitsAuto label for contract issues: profitssmart-contractsAuto label for contract issues: smart-contractstestingAuto label for contract issues: testing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions