Skip to content

[CRITICAL][SOROBAN AUTHORITY] Secure contract initialization and authorize the canonical pool registry #163

Description

@Obiajulu-gif

Summary

Pool creation is currently self-authorized by the caller, while the repayment contract initializer stores an administrator without requiring that administrator's authorization. This leaves deployment and global pool-ID ownership without a canonical trust boundary.

Repository evidence

  • contracts/repayment/src/lib.rs initializes and stores the admin without calling admin.require_auth().
  • contracts/chainmove-pool/src/lib.rs lets any caller self-authorize as owner and create a globally keyed DataKey::Pool(pool_id).

Scope

  • Introduce an authenticated bootstrap/factory authority for initialization and pool creation.
  • Bind pool IDs to the canonical registry/factory and emit authority/version metadata in creation events.
  • Define a one-time initialization path that cannot be replayed or taken over.

Acceptance criteria

  • Unauthorized initialization and direct pool creation fail deterministically.
  • The configured factory/admin must authorize every bootstrap or pool-registration transition.
  • Existing authorized flows remain usable through an explicit migration/compatibility path.

Tests

  • Unit tests for missing, wrong, and valid bootstrap authorization.
  • Property/integration tests proving a pool ID cannot be preempted by an unrelated account.

Non-goals

  • Redesigning pool economics or the repayment schedule.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions