Skip to content

Forked scenario 3a and 3b.#181

Merged
RZhang05 merged 5 commits intofeature/forked-simulationsfrom
forked-scen3ab
Mar 3, 2026
Merged

Forked scenario 3a and 3b.#181
RZhang05 merged 5 commits intofeature/forked-simulationsfrom
forked-scen3ab

Conversation

@RZhang05
Copy link

@RZhang05 RZhang05 commented Feb 23, 2026

Closes: #160
Closes: #161

Depends on #173

Description

3a output
2:19PM INF LOG: "[TEST] flow balance before 0.00100000"
2:19PM INF LOG: "\n=== PRECISION COMPARISON (Initial State) ==="
2:19PM INF LOG: "Expected Yield Tokens: 615.38461538"
2:19PM INF LOG: "Actual Yield Tokens:   615.38461537"
2:19PM INF LOG: "Difference:            -0.00000001"
2:19PM INF LOG: ""
2:19PM INF LOG: "Expected Flow Collateral Value: 1000.00000000"
2:19PM INF LOG: "Actual Flow Collateral Value:   1000.00000000"
2:19PM INF LOG: "Difference:                     -0.00000000"
2:19PM INF LOG: ""
2:19PM INF LOG: "Expected MOET Debt: 615.38461538"
2:19PM INF LOG: "Actual MOET Debt:   615.38461538"
2:19PM INF LOG: "Difference:         -0.00000000"
2:19PM INF LOG: "=========================================================\n"
2:19PM INF LOG: "[DEBUG] Position details after rebalance:"
2:19PM INF LOG: "  Health: 1.300000000020312500000317"
2:19PM INF LOG: "  Default token available: 89.51048952"
2:19PM INF LOG: "\n=== PRECISION COMPARISON (After Flow Price Decrease) ==="
2:19PM INF LOG: "Expected Yield Tokens: 492.30769231"
2:19PM INF LOG: "Actual Yield Tokens:   492.30769228"
2:19PM INF LOG: "Difference:            -0.00000003"
2:19PM INF LOG: ""
2:19PM INF LOG: "Expected Flow Collateral Value: 800.00000000"
2:19PM INF LOG: "Actual Flow Collateral Value:   800.00000000"
2:19PM INF LOG: "Actual Flow Collateral Amount:  1000.00000000 Flow tokens"
2:19PM INF LOG: "Difference:                     -0.00000000"
2:19PM INF LOG: ""
2:19PM INF LOG: "Expected MOET Debt: 492.30769231"
2:19PM INF LOG: "Actual MOET Debt:   492.30769230"
2:19PM INF LOG: "Difference:         -0.00000001"
2:19PM INF LOG: "=========================================================\n"
2:19PM INF LOG: "\n=== PRECISION COMPARISON (After Yield Price Increase) ==="
2:19PM INF LOG: "Expected Yield Tokens: 460.74950690"
2:19PM INF LOG: "Actual Yield Tokens:   460.74950645"
2:19PM INF LOG: "Difference:            -0.00000045"
2:19PM INF LOG: ""
2:19PM INF LOG: "Expected Flow Collateral Value: 898.46153846"
2:19PM INF LOG: "Actual Flow Collateral Value:   898.46153760"
2:19PM INF LOG: "Actual Flow Collateral Amount:  1123.07692201 Flow tokens"
2:19PM INF LOG: "Difference:                     -0.00000086"
2:19PM INF LOG: ""
2:19PM INF LOG: "Expected MOET Debt: 552.89940828"
2:19PM INF LOG: "Actual MOET Debt:   552.89940775"
2:19PM INF LOG: "Difference:         -0.00000053"
2:19PM INF LOG: "=========================================================\n"
2:19PM INF LOG: "\n=== DIAGNOSTIC: YieldVault Balance vs Position Available ==="
2:19PM INF LOG: "getYieldVaultBalance() reports: 1123.07692197"
2:19PM INF LOG: "Position Flow balance: 1123.07692201"
2:19PM INF LOG: "Difference: 0.00000004"
2:19PM INF LOG: "========================================\n"
2:19PM INF LOG: "\n=== TEST COMPLETE - All precision checks passed ==="

Test results: "cadence/tests/forked_rebalance_scenario3a_test.cdc"
- PASS: test_RebalanceYieldVaultScenario3A
3b output
2:17PM INF LOG: "[TEST] flow balance before 0.00100000"
2:17PM INF LOG: "\n=== PRECISION COMPARISON (Initial State) ==="
2:17PM INF LOG: "Expected Yield Tokens: 615.38461539"
2:17PM INF LOG: "Actual Yield Tokens:   615.38461537"
2:17PM INF LOG: "Difference:            -0.00000002"
2:17PM INF LOG: ""
2:17PM INF LOG: "Expected Flow Collateral Value: 1000.00000000"
2:17PM INF LOG: "Actual Flow Collateral Value:   1000.00000000"
2:17PM INF LOG: "Difference:                     -0.00000000"
2:17PM INF LOG: ""
2:17PM INF LOG: "Expected MOET Debt: 615.38461539"
2:17PM INF LOG: "Actual MOET Debt:   615.38461538"
2:17PM INF LOG: "Difference:         -0.00000001"
2:17PM INF LOG: "=========================================================\n"
2:17PM INF LOG: "\n=== PRECISION COMPARISON (After Flow Price Increase) ==="
2:17PM INF LOG: "Expected Yield Tokens: 923.07692308"
2:17PM INF LOG: "Actual Yield Tokens:   923.07692305"
2:17PM INF LOG: "Difference:            -0.00000003"
2:17PM INF LOG: ""
2:17PM INF LOG: "Expected Flow Collateral Value: 1500.00000000"
2:17PM INF LOG: "Actual Flow Collateral Value:   1500.00000000"
2:17PM INF LOG: "Actual Flow Collateral Amount:  1000.00000000 Flow tokens"
2:17PM INF LOG: "Difference:                     -0.00000000"
2:17PM INF LOG: ""
2:17PM INF LOG: "Expected MOET Debt: 923.07692308"
2:17PM INF LOG: "Actual MOET Debt:   923.07692307"
2:17PM INF LOG: "Difference:         -0.00000001"
2:17PM INF LOG: "=========================================================\n"
2:17PM INF LOG: "\n=== PRECISION COMPARISON (After Yield Price Increase) ==="
2:17PM INF LOG: "Expected Yield Tokens: 841.14701866"
2:17PM INF LOG: "Actual Yield Tokens:   841.14701783"
2:17PM INF LOG: "Difference:            -0.00000083"
2:17PM INF LOG: ""
2:17PM INF LOG: "Expected Flow Collateral Value: 1776.92307692"
2:17PM INF LOG: "Actual Flow Collateral Value:   1776.92307520"
2:17PM INF LOG: "Actual Flow Collateral Amount:  1184.61538347 Flow tokens"
2:17PM INF LOG: "Difference:                     -0.00000172"
2:17PM INF LOG: ""
2:17PM INF LOG: "Expected MOET Debt: 1093.49112426"
2:17PM INF LOG: "Actual MOET Debt:   1093.49112320"
2:17PM INF LOG: "Difference:         -0.00000106"
2:17PM INF LOG: "=========================================================\n"
2:17PM INF LOG: "\n=== DIAGNOSTIC: YieldVault Balance vs Position Available ==="
2:17PM INF LOG: "getYieldVaultBalance() reports: 1184.61538344"
2:17PM INF LOG: "Position Flow balance: 1184.61538347"
2:17PM INF LOG: "Difference: 0.00000003"
2:17PM INF LOG: "========================================\n"
2:17PM INF LOG: "\n=== TEST COMPLETE ==="

Test results: "cadence/tests/forked_rebalance_scenario3b_test.cdc"
- PASS: test_RebalanceYieldVaultScenario3B
______

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 jribbink/evm-test-helpers February 23, 2026 19:00
Base automatically changed from jribbink/evm-test-helpers to feature/forked-simulations February 25, 2026 18:00
@RZhang05 RZhang05 changed the title [WIP] Forked scenario 3a and 3b. Forked scenario 3a and 3b. Mar 3, 2026
@RZhang05 RZhang05 requested a review from jribbink March 3, 2026 19:38
@RZhang05 RZhang05 marked this pull request as ready for review March 3, 2026 19:38
@RZhang05 RZhang05 requested a review from a team as a code owner March 3, 2026 19:38
@RZhang05 RZhang05 merged commit cb78853 into feature/forked-simulations Mar 3, 2026
2 of 5 checks passed
@RZhang05 RZhang05 deleted the forked-scen3ab branch March 3, 2026 21:22
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 Simulation Scenario 3b With Fork Test Setup Recreate Simulation Scenario 3a With Fork Test Setup

2 participants