Skip to content

Reconcile TotalDeposits with share-based TotalAssets after yield #299

Description

@devsimze

Problem

TotalDeposits tracks principal while TotalAssets includes yield. After update_total_assets(), TVL cap checks and get_total_deposits() can disagree with share pricing.

Scope

  • deposit, withdraw, update_total_assets, cap guards

Acceptance criteria

  • Document the relationship between TotalDeposits, TotalAssets, and shares.
  • Either sync TotalDeposits on yield updates or stop using it for caps where TotalAssets is correct.
  • Regression tests for deposit → yield → withdraw → cap check.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Fields

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