Skip to content

Add Access Control for Vault Deduct (Authorized Caller Only) #3

@greatest0fallt1me

Description

@greatest0fallt1me

Description
Restrict deduct so only an authorized caller (e.g. backend billing service) can decrease balance. Prevent arbitrary addresses from draining the vault.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Define authorized deduct caller (single address or role)
  • Document integration with backend signers

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/deduct-access-control
  • Implement changes
    • Add storage for authorized deduct caller (or use Soroban auth with backend key)
    • In deduct, require caller to be authorized
    • Add owner-only function to set/update authorized deduct caller
  • Test and commit
    • Run tests; add cases: authorized caller can deduct, others cannot; edge case exact balance
    • Include test output and security notes
  • Example commit message: feat: restrict deduct to authorized caller

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours
  • Project details: #

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions