more docs

This commit is contained in:
johba 2025-08-18 00:16:09 +02:00
parent 50eac74b18
commit 01471b7037
9 changed files with 80 additions and 11 deletions

View file

@ -8,9 +8,18 @@ import {Initializable} from "@openzeppelin/proxy/utils/Initializable.sol";
/**
* @title Optimizer
* @notice This contract (formerly Sentimenter) calculates a sentiment value and liquidity parameters
* @notice This contract (formerly Sentimenter) calculates a "sentiment" value and liquidity parameters
* based on the tax rate and the percentage of Kraiken staked.
* @dev It is upgradeable using UUPS. Only the admin (set during initialization) can upgrade.
*
* Key features:
* - Analyzes staking sentiment (% staked, average tax rate)
* - Returns four key parameters for liquidity management:
* 1. capitalInefficiency (0 to 1e18): Capital buffer level
* 2. anchorShare (0 to 1e18): % of non-floor ETH in anchor
* 3. anchorWidth (0 to 100): Anchor position width %
* 4. discoveryDepth (0 to 1e18): Discovery liquidity density (2x-10x)
* - Upgradeable for future algorithm improvements
*/
contract Optimizer is Initializable, UUPSUpgradeable {
Kraiken private harberg;
@ -92,9 +101,9 @@ contract Optimizer is Initializable, UUPSUpgradeable {
/**
* @notice Returns liquidity parameters for the liquidity manager.
* @return capitalInefficiency Calculated as (1e18 - sentiment).
* @return anchorShare Set equal to the sentiment.
* @return anchorWidth Here set to a constant 100 (adjust as needed).
* @return capitalInefficiency Calculated as (1e18 - sentiment). Capital buffer level (0-1e18)
* @return anchorShare Set equal to the sentiment. % of non-floor ETH in anchor (0-1e18)
* @return anchorWidth Here set to a constant 100. Anchor position width % (1-100)
* @return discoveryDepth Set equal to the sentiment.
*/
function getLiquidityParams()