Add forked rebalance scenario 4.#196
Merged
jribbink merged 5 commits intofeature/forked-simulationsfrom Mar 31, 2026
Merged
Conversation
e45967b to
82d82ed
Compare
jribbink
approved these changes
Mar 31, 2026
jribbink
added a commit
that referenced
this pull request
Apr 3, 2026
* Recreate scenario 1 using forked testnet. * Remove unused function. * Update for mainnet addresses. * Use mUSDC strategy with real oracles on testnet. * Update symbol prices. * Switch to mainnet. * Add option to transfer flow from whale account instead of minting. * Use fixed mainnet height, new FUSDEV strategy. * Add percent tolerance check to forked test. * Clean up forked scenario 1. * Remove unnecessary imports. * Create forked scenario 2 with placeholder yield token function. * [WIP] Modify EVM storage in forked scen2. Currently fails tolerance. * Add EVM State Manipulation Helpers For Forked Simulations * Clean up. * Prepare for updated strategy. * Fix bugs with decimal offsets & cleanup * tidy comments * Cleanup test helpers & fix precision * Account for fees in pool prices to stay in tolerance. * Update to newer CLI * Create forked scenario 3a, 3b. * address feedback * Add test for EVM state helpers * cleanup test assertion * cleanup test assertion * Fix percent tolerance * Run CI on feature/* branches * Update to new strategy and use new evm helpers. * Clean up. * Add EVM State Manipulation Helpers For Forked Simulations (#173) * Fix band oracle price helper (#188) * Fix merge. * Normalize comments. * Temporarily skip closing of yield vault. * Apply suggestions from code review Co-authored-by: Jordan Ribbink <17958158+jribbink@users.noreply.github.com> * Switch flow.json back to tab spacing. * Fix scenario 2. * Delete unused files. * Improve precision of forked tests * Improve precision of forked tests (#190) * Update scenario 2. * Improve scenario 2 fee accounting and tolerance. * Update forked scen 3a, 3b. * Fix fork height. * Add CI Caching for Forked Mainnet Simulation Tests (#192) * Apply suggestions from code review Co-authored-by: Jordan Ribbink <17958158+jribbink@users.noreply.github.com> * Add Forked Mainnet Simulation Scenario 3C (#169) * Improve final diagnostic precision. * Forked Rebalance Simulation 3d (#172) * Update Flow CLI Install to use Latest Version (#213) * Add forked rebalance scenario 4. (#196) * Add forked rebalance scenarios 4 and 5. * Update forked scenarios to match main. * Update scenarios 4,5. * add boundary test cases * Update fork test block height * Remove unused Test.reset * Restore commented out sections * Apply suggestion from @zhangchiqing Co-authored-by: Leo Zhang <zhangchiqing@gmail.com> * Remove unnecessary yield vault rebalances * Add note about Google Sheet * Update cadence/tests/forked_rebalance_scenario1_test.cdc Co-authored-by: Leo Zhang <zhangchiqing@gmail.com> * add comments and more assertion on forked rebalance tests * add more assertion and comments to forked_rebalance_scenario2_test.cdc --------- Co-authored-by: Raymond Zhang <zhangraymond05@gmail.com> Co-authored-by: Leo Zhang (zhangchiqing) <zhangchiqing@gmail.com>
jribbink
added a commit
that referenced
this pull request
Apr 6, 2026
* Recreate scenario 1 using forked testnet. * Remove unused function. * Update for mainnet addresses. * Use mUSDC strategy with real oracles on testnet. * Update symbol prices. * Switch to mainnet. * Add option to transfer flow from whale account instead of minting. * Use fixed mainnet height, new FUSDEV strategy. * Add percent tolerance check to forked test. * Clean up forked scenario 1. * Remove unnecessary imports. * Create forked scenario 2 with placeholder yield token function. * [WIP] Modify EVM storage in forked scen2. Currently fails tolerance. * Add EVM State Manipulation Helpers For Forked Simulations * Clean up. * Prepare for updated strategy. * Fix bugs with decimal offsets & cleanup * tidy comments * Cleanup test helpers & fix precision * Account for fees in pool prices to stay in tolerance. * Update to newer CLI * Create forked scenario 3a, 3b. * address feedback * Add test for EVM state helpers * cleanup test assertion * cleanup test assertion * Fix percent tolerance * Run CI on feature/* branches * Update to new strategy and use new evm helpers. * Clean up. * Add EVM State Manipulation Helpers For Forked Simulations (#173) * Fix band oracle price helper (#188) * Fix merge. * Normalize comments. * Temporarily skip closing of yield vault. * Apply suggestions from code review Co-authored-by: Jordan Ribbink <17958158+jribbink@users.noreply.github.com> * Switch flow.json back to tab spacing. * Fix scenario 2. * Delete unused files. * Improve precision of forked tests * Improve precision of forked tests (#190) * Update scenario 2. * Improve scenario 2 fee accounting and tolerance. * Update forked scen 3a, 3b. * Fix fork height. * Add CI Caching for Forked Mainnet Simulation Tests (#192) * Apply suggestions from code review Co-authored-by: Jordan Ribbink <17958158+jribbink@users.noreply.github.com> * Add Forked Mainnet Simulation Scenario 3C (#169) * Improve final diagnostic precision. * Forked Rebalance Simulation 3d (#172) * Update Flow CLI Install to use Latest Version (#213) * Add forked rebalance scenario 4. (#196) * Add forked rebalance scenarios 4 and 5. * Update forked scenarios to match main. * Update scenarios 4,5. * add boundary test cases * Update fork test block height * Remove unused Test.reset * Restore commented out sections * Apply suggestion from @zhangchiqing Co-authored-by: Leo Zhang <zhangchiqing@gmail.com> * Remove unnecessary yield vault rebalances * Add note about Google Sheet * Update cadence/tests/forked_rebalance_scenario1_test.cdc Co-authored-by: Leo Zhang <zhangchiqing@gmail.com> * add comments and more assertion on forked rebalance tests * add more assertion and comments to forked_rebalance_scenario2_test.cdc --------- Co-authored-by: Raymond Zhang <zhangraymond05@gmail.com> Co-authored-by: Leo Zhang (zhangchiqing) <zhangchiqing@gmail.com>
jribbink
added a commit
that referenced
this pull request
Apr 7, 2026
* Recreate scenario 1 using forked testnet. * Remove unused function. * Update for mainnet addresses. * Use mUSDC strategy with real oracles on testnet. * Update symbol prices. * Switch to mainnet. * Add option to transfer flow from whale account instead of minting. * Use fixed mainnet height, new FUSDEV strategy. * Add percent tolerance check to forked test. * Clean up forked scenario 1. * Remove unnecessary imports. * Create forked scenario 2 with placeholder yield token function. * [WIP] Modify EVM storage in forked scen2. Currently fails tolerance. * Add EVM State Manipulation Helpers For Forked Simulations * Clean up. * Prepare for updated strategy. * Fix bugs with decimal offsets & cleanup * tidy comments * Cleanup test helpers & fix precision * Account for fees in pool prices to stay in tolerance. * Update to newer CLI * Create forked scenario 3a, 3b. * address feedback * Add test for EVM state helpers * cleanup test assertion * cleanup test assertion * Fix percent tolerance * Run CI on feature/* branches * Update to new strategy and use new evm helpers. * Clean up. * Add EVM State Manipulation Helpers For Forked Simulations (#173) * Fix band oracle price helper (#188) * Fix merge. * Normalize comments. * Temporarily skip closing of yield vault. * Apply suggestions from code review Co-authored-by: Jordan Ribbink <17958158+jribbink@users.noreply.github.com> * Switch flow.json back to tab spacing. * Fix scenario 2. * Delete unused files. * Improve precision of forked tests * Improve precision of forked tests (#190) * Update scenario 2. * Improve scenario 2 fee accounting and tolerance. * Update forked scen 3a, 3b. * Fix fork height. * Add CI Caching for Forked Mainnet Simulation Tests (#192) * Apply suggestions from code review Co-authored-by: Jordan Ribbink <17958158+jribbink@users.noreply.github.com> * Add Forked Mainnet Simulation Scenario 3C (#169) * Improve final diagnostic precision. * Forked Rebalance Simulation 3d (#172) * Update Flow CLI Install to use Latest Version (#213) * Add forked rebalance scenario 4. (#196) * Add forked rebalance scenarios 4 and 5. * Update forked scenarios to match main. * Update scenarios 4,5. * add boundary test cases * Update fork test block height * Remove unused Test.reset * Restore commented out sections * Apply suggestion from @zhangchiqing Co-authored-by: Leo Zhang <zhangchiqing@gmail.com> * Remove unnecessary yield vault rebalances * Add note about Google Sheet * Update cadence/tests/forked_rebalance_scenario1_test.cdc Co-authored-by: Leo Zhang <zhangchiqing@gmail.com> * add comments and more assertion on forked rebalance tests * add more assertion and comments to forked_rebalance_scenario2_test.cdc --------- Co-authored-by: Raymond Zhang <zhangraymond05@gmail.com> Co-authored-by: Leo Zhang (zhangchiqing) <zhangchiqing@gmail.com>
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: #195
Description
Adds new forked scenario 4.
For contributor use:
masterbranchFiles changedin the Github PR explorer