Skip to content

Add explicit deposit/withdrawal path limits and gas accounting #35

Description

@grantfox-oss

Complex escrow operations can consume unpredictable Soroban resources. Without explicit deposit/withdrawal limits or gas accounting, transactions can fail unpredictably or expose denial-of-service vectors.

Affected areas: app/contract/contracts/Folder/src/escrow.rs, app/contract/contracts/Folder/src/lib.rs, app/contract/contracts/Folder/src/error.rs, app/contract/contracts/Folder/src/test.rs.

Implementation scope:

  • Define maximum supported token counts, arbiter counts, and fee recipient counts for deposit and withdraw paths.
  • Add explicit gas estimates and reject requests that exceed safe bounds.
  • Emit contract errors for oversize payloads or resource limits.
  • Add tests for limit boundaries and large input rejection.

Acceptance criteria:

  • Deposit and withdrawal operations enforce bounded parameters and fail with clear errors when exceeded.
  • The contract reports predictable gas usage for supported payload sizes.
  • Documentation includes the supported contract limits.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignbugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomers

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