Skip to content

Validate before state update - #642

Open
ashleychandy wants to merge 1 commit into
0dotxyz:0.1.10-mainfrom
ashleychandy:validate-before-state-update
Open

Validate before state update#642
ashleychandy wants to merge 1 commit into
0dotxyz:0.1.10-mainfrom
ashleychandy:validate-before-state-update

Conversation

@ashleychandy

Copy link
Copy Markdown
Contributor

Description

Defers the total_asset_shares update until deposit limit validation succeeds, following a compute → validate → commit flow and avoiding premature state mutation.

Changes

  • Compute new_total_shares without immediately updating total_asset_shares.
  • Validate deposit limits using new_total_shares.
  • Commit total_asset_shares only after all validations pass.
  • No functional changes to deposit limit enforcement or accounting logic.

@ashleychandy
ashleychandy changed the base branch from main to 0.1.10-main August 7, 2026 13:07
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.

1 participant