Skip to content

[P1] Implement Soroban pool ownership contract logic #11

Description

@Obiajulu-gif

Priority

P1

Difficulty

Advanced

Task

Implement pool ownership logic for ChainMove vehicle investment pools in the Soroban contract workspace.

Expected behavior

The contract should support:

  • creating a vehicle pool
  • setting total pool units or shares
  • recording investor contribution
  • calculating investor share percentage
  • preventing oversubscription
  • reading investor position

Acceptance criteria

  • Pool cannot exceed total available units.
  • Investor position is calculated consistently.
  • Duplicate investments are handled safely.
  • Contract stores enough data for later indexing.
  • Unit tests cover success and failure paths.

Test requirement

Add tests for successful pool creation, successful investment, oversubscription rejection, duplicate investor update, and investor share calculation.

Evidence required

  • Screenshot of cargo test passing.
  • Screenshot showing contract function output or test logs.

Commands

cargo test
npm run lint
npm run build

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions