Skip to content

test: add property tests for pool calculate_interest (#622)#821

Merged
sanmipaul merged 1 commit into
astera-hq:mainfrom
codewithzubair07:test/622-property-tests-calculate-interest
Jul 2, 2026
Merged

test: add property tests for pool calculate_interest (#622)#821
sanmipaul merged 1 commit into
astera-hq:mainfrom
codewithzubair07:test/622-property-tests-calculate-interest

Conversation

@codewithzubair07

Copy link
Copy Markdown
Contributor

Adds property tests for calculate_interest covering all 3 acceptance criteria in #622. No new dev-deps — uses a small deterministic PRNG instead of proptest/quickcheck. Bounds match the contract's existing limits (yield_bps ≤ 5000 per set_yield, duration ≤ 10yrs matching the existing overflow test). Verified the underlying math separately before writing the Rust tests — 20k samples, zero violations.

@sanmipaul sanmipaul merged commit 1149c8f into astera-hq:main Jul 2, 2026
1 check 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.

2 participants