Skip to content

feat(vault): deposit flow with auth, token transfer, pause - #294

Merged
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
Escelit:feature/vault-deposit-flow
Apr 23, 2026
Merged

feat(vault): deposit flow with auth, token transfer, pause#294
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
Escelit:feature/vault-deposit-flow

Conversation

@Escelit

@Escelit Escelit commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

feat(vault): deposit flow with auth, token transfer, pause

Closes #224

Changes

Hardened deposit guard ordering: pause → require_auth → amount positivity → authorization → min_deposit → transfer → persist → emit
Fixed event schema: removed caller from topics to match EVENT_SCHEMA.md (topic 0 = Symbol("deposit") only)
Cleaned up stray AllowedDepositors write in set_allowed_depositor
Removed duplicate get_max_deduct definition that blocked compilation
Tests — 155 passing

Unit: owner deposit, allowed depositor deposit, unauthorized rejection, below-minimum, at-minimum boundary, paused vault, balance unchanged on failure, event schema alignment
Property: balance round-trip invariant (100 iterations), unauthorized rejection (100), non-positive amount rejection (100), idempotent depositor management (100)
Security notes

Pause check fires before require_auth — prevents leaking which addresses are authorized during an incident
Transfer-before-persist ensures no internal state mutates if the on-ledger USDC transfer fails
Checked arithmetic on balance update with explicit "balance overflow" panic

@drips-wave

drips-wave Bot commented Apr 23, 2026

Copy link
Copy Markdown

@Escelit 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

Escelit and others added 2 commits April 23, 2026 15:25
Fix unused variable warning in settlement test (third_party shadowed binding)
@greatest0fallt1me
greatest0fallt1me merged commit 83b764b into CalloraOrg:main Apr 23, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vault: deposit — auth, USDC transfer_from, min_deposit, pause

2 participants