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:
parent
4c040e6a30
commit
a8e186caac
1 changed files with 9 additions and 5 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue