Skip to content

Implement Investment and Insurance #257

@Baskarayelu

Description

@Baskarayelu

Description
Implement investment record creation on accept_bid, insurance coverage add (provider, coverage_percentage, premium), and query.

Requirements and context

  • Must be secure, tested, and documented
  • Only active investments can add insurance; investor auth
  • Smart contracts only (Soroban/Rust)

Suggested execution

  1. Fork the repo and create a branch
    git checkout -b feature/investment-insurance
  2. Implement changes
    • Implement: src/investment.rs (Investment, InsuranceCoverage)
    • Add tests: src/test_insurance.rs
    • Document in docs/contracts/investment.md
  3. Test and commit
    • Run cargo test
    • Cover invalid coverage percentage, zero premium
    • Include test output and security notes

Example commit message
feat: implement investment and insurance with tests and docs

Guidelines

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions