Skip to content

Add forked rebalance scenario 4.#196

Merged
jribbink merged 5 commits intofeature/forked-simulationsfrom
forked-scen45
Mar 31, 2026
Merged

Add forked rebalance scenario 4.#196
jribbink merged 5 commits intofeature/forked-simulationsfrom
forked-scen45

Conversation

@RZhang05
Copy link
Copy Markdown
Contributor

@RZhang05 RZhang05 commented Mar 4, 2026

Closes: #195

Description

Adds new forked scenario 4.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@RZhang05 RZhang05 changed the base branch from main to feature/forked-simulations March 4, 2026 21:25
@RZhang05 RZhang05 changed the title Recreate rebalance scenarios 4, 5 in forked test setup. Merge main into forked scenarios. Mar 16, 2026
@jribbink jribbink force-pushed the feature/forked-simulations branch from e45967b to 82d82ed Compare March 26, 2026 01:50
@RZhang05 RZhang05 requested a review from jribbink March 30, 2026 18:05
@RZhang05 RZhang05 marked this pull request as ready for review March 30, 2026 18:05
@RZhang05 RZhang05 requested a review from a team as a code owner March 30, 2026 18:05
@RZhang05 RZhang05 changed the title Merge main into forked scenarios. Add forked rebalance scenario 4. Mar 30, 2026
@jribbink jribbink merged commit ec511a9 into feature/forked-simulations Mar 31, 2026
6 checks passed
@jribbink jribbink deleted the forked-scen45 branch March 31, 2026 00:18
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>
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.

Recreate Rebalance Scenario 4 With Fork Test Setup

2 participants