deployed to Sepolia; liqp-deployments.json

This commit is contained in:
tim
2025-10-16 16:16:41 -04:00
parent 38371614fc
commit e948067167
18 changed files with 304 additions and 64 deletions

View File

@@ -873,7 +873,7 @@ library LMSRStabilized {
/// @notice Internal helper to compute kappa from slippage parameters.
/// @dev Returns κ in Q64.64. Implemented as internal so callers within the library can use it
/// without resorting to external calls.
function _computeKappaFromSlippage(
function computeKappaFromSlippage(
uint256 nAssets,
int128 tradeFrac,
int128 targetSlippage
@@ -920,16 +920,6 @@ library LMSRStabilized {
return kappa;
}
/// @notice Compute kappa from slippage parameters.
/// @dev External wrapper that delegates to internal implementation.
function computeKappaFromSlippage(
uint256 nAssets,
int128 tradeFrac,
int128 targetSlippage
) external pure returns (int128) {
return _computeKappaFromSlippage(nAssets, tradeFrac, targetSlippage);
}
/// @notice Legacy-compatible init: compute kappa from slippage parameters and delegate to kappa-based init.
/// @dev Provides backward compatibility for callers that still use the (q, tradeFrac, targetSlippage) init signature.
function init(
@@ -939,7 +929,7 @@ library LMSRStabilized {
int128 targetSlippage
) internal {
// compute kappa using the internal helper
int128 kappa = _computeKappaFromSlippage(initialQInternal.length, tradeFrac, targetSlippage);
int128 kappa = computeKappaFromSlippage(initialQInternal.length, tradeFrac, targetSlippage);
// forward to the new kappa-based init
init(s, initialQInternal, kappa);
}