harb/onchain/test/mocks/BullMarketOptimizer.sol
johba 2205ae719b feat: Optimize discovery position depth calculation
- Implement dynamic discovery depth based on anchor position share
- Add configurable discovery_max_multiple (1.5-4x) for flexible adjustment
- Update BullMarketOptimizer with new depth calculation logic
- Fix scenario visualizer floor position visibility
- Add comprehensive tests for discovery depth behavior

The discovery position now dynamically adjusts its depth based on the anchor
position's share of total liquidity, allowing for more effective price discovery
while maintaining protection against manipulation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 16:45:24 +02:00

37 lines
1.5 KiB
Solidity

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.19;
import {Kraiken} from "../../src/Kraiken.sol";
import {Stake} from "../../src/Stake.sol";
contract BullMarketOptimizer {
/// @notice Calculate sentiment (not used, but required for interface compatibility)
function calculateSentiment(uint256, uint256) public pure returns (uint256) {
return 0; // Placeholder implementation
}
/// @notice Get sentiment (not used, but required for interface compatibility)
function getSentiment() external pure returns (uint256) {
return 0; // Placeholder implementation
}
/// @notice Returns whale attack liquidity parameters
/// @return capitalInefficiency 0% - very aggressive
/// @return anchorShare 95% - massive anchor concentration
/// @return anchorWidth 1000 - moderate width
/// @return discoveryDepth Testing value: 1e18
function getLiquidityParams()
external
pure
returns (uint256 capitalInefficiency, uint256 anchorShare, uint24 anchorWidth, uint256 discoveryDepth)
{
capitalInefficiency = 0; // 0% - very aggressive
anchorShare = 95 * 10 ** 16; // 95% - massive anchor position
anchorWidth = 50; // 50% - medium width for concentrated liquidity
discoveryDepth = 1e18; // Testing this value
}
function getDescription() external pure returns (string memory) {
return "Bull Market (Testing discoveryDepth)";
}
}