Merge pull request 'fix: onchain/analysis/PARAMETER_SEARCH_RESULTS.md shows stale unconditional pseudocode (#893)' (#910) from fix/issue-893 into master
This commit is contained in:
commit
e12dad3a84
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.
|
||||
|
||||
### 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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue