Skip to content

fix(maintenance-pool): cap deposits per pool with MAX_DEPOSITS - #427

Merged
chonilius merged 1 commit into
MergeFi:mainfrom
gerani1:fix/maintenance-pool-max-deposits
Sep 29, 2026
Merged

chonilius merged 1 commit into
MergeFi:mainfrom
gerani1:fix/maintenance-pool-max-deposits

Conversation

@gerani1

@gerani1 gerani1 commented Sep 28, 2026

Copy link
Copy Markdown

Add MAX_DEPOSITS (50) and a TooManyDeposits error, mirroring MAX_SPONSORS in escrow/milestones. deposit() and withdraw() loop over deposit_count to refresh TTLs, and a Soroban transaction footprint is limited to 100 ledger entries, so an unbounded count eventually makes those calls fail.

Also fix maintenance-pool test compilation: close a truncated test, re-export the contract from the crate root, and dereference an address comparison.

Closes #94
closes #130

Summary

Related issues

Changes

Test plan

  • Existing tests pass (make test)
  • New tests added for changed behaviour
  • Manually verified against a local node / testnet where applicable

Checklist

  • Branch is up to date with main
  • No debug / dead code left in
  • cargo fmt and cargo clippy are clean

Add MAX_DEPOSITS (50) and a TooManyDeposits error, mirroring MAX_SPONSORS in
escrow/milestones. deposit() and withdraw() loop over deposit_count to refresh
TTLs, and a Soroban transaction footprint is limited to 100 ledger entries, so
an unbounded count eventually makes those calls fail.

Also fix maintenance-pool test compilation: close a truncated test, re-export
the contract from the crate root, and dereference an address comparison.

Closes MergeFi#94
@gerani1
gerani1 requested a review from chonilius as a code owner September 28, 2026 22:39
@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@Godbrand0 is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@gerani1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@chonilius
chonilius merged commit d2258aa into MergeFi:main Sep 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants