Skip to content

Fix Soroban contract initialization, pure reads, and string bounds - #212

Open
devfoma wants to merge 4 commits into
Chainmove:mainfrom
devfoma:fix-issues-163-179-169
Open

Fix Soroban contract initialization, pure reads, and string bounds#212
devfoma wants to merge 4 commits into
Chainmove:mainfrom
devfoma:fix-issues-163-179-169

Conversation

@devfoma

@devfoma devfoma commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This PR resolves three critical issues regarding contract security, Soroban API interactions, and resource costs.

Changes

  • Contract Initialization: Introduced an authenticated bootstrap authority for pool creation and initialization in both the repayment and pool contracts. This ensures a canonical trust boundary and prevents unauthorized takeovers.
  • Pure Read Queries: Separated state-mutating keepalive operations from read-only pool queries. Pure read methods are now provided that execute without storage TTL side-effects, while legacy migrations and TTL renewals are moved to explicit, authorized keepalive operations.
  • Contract String Bounds: Applied strict byte-length bounds on asset labels and reference inputs to prevent oversized inputs from causing excessive storage/event costs or exceeding Soroban resource limits.

Closes #163
Closes #179
Closes #169

@Obiajulu-gif

Copy link
Copy Markdown
Collaborator

Thanks for this PR! It currently has merge conflicts against main and can't be merged as-is. Could you rebase/merge main into your branch and resolve the conflicts? I'll take another look once it's conflict-free.

@Obiajulu-gif

Copy link
Copy Markdown
Collaborator

@devfoma resolve conflict and pr differently for the different else if will reflect in ur dashboard

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

Labels

None yet

Projects

None yet

2 participants