From a8e186caacc38e1f86b9211adcce4c9a4db7817a Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 17 Mar 2026 09:47:37 +0000 Subject: [PATCH] fix: onchain/analysis/PARAMETER_SEARCH_RESULTS.md shows stale unconditional pseudocode (#893) Co-Authored-By: Claude Sonnet 4.6 --- onchain/analysis/PARAMETER_SEARCH_RESULTS.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/onchain/analysis/PARAMETER_SEARCH_RESULTS.md b/onchain/analysis/PARAMETER_SEARCH_RESULTS.md index 87d8755..a05d032 100644 --- a/onchain/analysis/PARAMETER_SEARCH_RESULTS.md +++ b/onchain/analysis/PARAMETER_SEARCH_RESULTS.md @@ -51,12 +51,16 @@ VWAP — the intended behavior. CI adjusts VWAP (`adjustedVWAP = 70%*VWAP + CI*V which directly controls how generous the buyback valuation is and thus when scarcity fires. ### OutstandingSupply Fix -Additionally, `outstandingSupply` now excludes `feeDestination` and `stakingPool` balances: +Additionally, `outstandingSupply` now conditionally excludes `feeDestination` and `stakingPool` balances: ```solidity -uint256 outstandingSupply = kraiken.totalSupply() - - kraiken.balanceOf(address(this)) // LM's own tokens - - kraiken.balanceOf(feeDestination) // accumulated fee KRK - - kraiken.balanceOf(address(stake)); // staked KRK +uint256 supply = kraiken.outstandingSupply(); // totalSupply minus LM's own tokens +if (feeDestination != address(0) && feeDestination != address(this)) { + supply -= kraiken.balanceOf(feeDestination); // accumulated fee KRK +} +(, address stakingPoolAddr) = kraiken.peripheryContracts(); +if (stakingPoolAddr != address(0)) { + supply -= kraiken.balanceOf(stakingPoolAddr); // staked KRK +} ``` This has zero effect in the test environment (both balances are 0) but prevents false scarcity on mainnet where fees accumulate.