test: add integration tests for bonding curve ten-buy price monotonicity - #731
Merged
Chucks1093 merged 1 commit intoAug 24, 2026
Conversation
Member
|
The regression guard with the flat curve is a really good addition. Without it you could have a test that passes trivially if the monotonicity assertion was accidentally always true. Having a test that is designed to fail with a zero slope curve proves the main assertion is actually doing meaningful work. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #697
Summary
creator-keys/tests/bonding_curve_ten_buy_monotonicity.rswith 3 integration tests covering all four acceptance criteria for issue Add integration test confirming the bonding curve price increases monotonically with each successive buy #697.base_price = 5000,slope = 100), and registers a creator.get_buy_quoteprice at supply 0 and asserts it equals the configured base price (AC-3).base_price + slope * supplyexactly.Test plan
test_ten_sequential_buys_price_strictly_increases_and_sell_decreasespassestest_flat_curve_prices_do_not_strictly_increase_across_ten_buyspassestest_ten_buy_prices_match_bonding_curve_formulapasses