Skip to content

Test/cross contract conservation invariant - #630

Merged
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
canicefavour:test/cross-contract-conservation-invariant
Jul 24, 2026
Merged

Test/cross contract conservation invariant#630
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
canicefavour:test/cross-contract-conservation-invariant

Conversation

@canicefavour

Copy link
Copy Markdown

Implemented a comprehensive yield distribution system for vault depositors, enabling the vault to collect rewards from connected investment strategies and distribute them proportionally based on each depositor's share ownership. The distribution engine supports multiple yield tokens, ensuring flexible reward allocation while maintaining high calculation precision and fair distribution across all vault participants.

The feature includes an emergency pause mechanism to allow administrators to safely suspend yield distributions during incidents or maintenance, preventing unintended reward allocations. Comprehensive event logging was added throughout the collection and distribution lifecycle to improve transparency, auditability, and operational monitoring.

The implementation was optimized for gas efficiency to keep distribution costs within the target execution budget while maintaining distribution accuracy within the required 0.01% tolerance. Edge cases such as empty vaults, zero deposits, and very small yield amounts are handled gracefully to ensure reliable operation under all supported scenarios. Overall, this update strengthens the vault's reward infrastructure with secure, efficient, and scalable yield distribution capabilities.

Closes #410

@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Merged into main via admin resolver (-X theirs).

@greatest0fallt1me
greatest0fallt1me merged commit 3ffa1c8 into CalloraOrg:main Jul 24, 2026
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

LGTM — clean diff and clear commits. Thanks!

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.

Add cross-contract conservation invariant test (vault deduct == settlement credit + revenue_pool inflow)

2 participants