fix: onchain/analysis/PARAMETER_SEARCH_RESULTS.md shows stale unconditional pseudocode (#893)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-17 09:47:37 +00:00
parent 4c040e6a30
commit a8e186caac

View file

@ -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. which directly controls how generous the buyback valuation is and thus when scarcity fires.
### OutstandingSupply Fix ### OutstandingSupply Fix
Additionally, `outstandingSupply` now excludes `feeDestination` and `stakingPool` balances: Additionally, `outstandingSupply` now conditionally excludes `feeDestination` and `stakingPool` balances:
```solidity ```solidity
uint256 outstandingSupply = kraiken.totalSupply() uint256 supply = kraiken.outstandingSupply(); // totalSupply minus LM's own tokens
- kraiken.balanceOf(address(this)) // LM's own tokens if (feeDestination != address(0) && feeDestination != address(this)) {
- kraiken.balanceOf(feeDestination) // accumulated fee KRK supply -= kraiken.balanceOf(feeDestination); // accumulated fee KRK
- kraiken.balanceOf(address(stake)); // staked 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 This has zero effect in the test environment (both balances are 0) but prevents false
scarcity on mainnet where fees accumulate. scarcity on mainnet where fees accumulate.