diff --git a/contracts/strategies/G3MStrategyLib.sol b/contracts/strategies/G3MStrategyLib.sol index 15dc455b..49078f46 100644 --- a/contracts/strategies/G3MStrategyLib.sol +++ b/contracts/strategies/G3MStrategyLib.sol @@ -159,4 +159,15 @@ library G3MStrategyLib { return FixedPointMathLib.WAD - (FixedPointMathLib.WAD.divWadUp(FixedPointMathLib.WAD + boop)); } + + function computeISFunction(uint256 t) internal pure returns (uint256 x) { + uint256 boop = uint256( + int256( + FixedPointMathLib.WAD.divWadUp( + FixedPointMathLib.WAD - t - FixedPointMathLib.WAD + ) + ).powWad(-(int256(FixedPointMathLib.WAD.divWadUp(2)))) + ); + return FixedPointMathLib.WAD.divWadUp(FixedPointMathLib.WAD + boop); + } }