diff --git a/contracts/src/instances/steth/StETHTarget0.sol b/contracts/src/instances/steth/StETHTarget0.sol index 9429c7a2f..447b45bdd 100644 --- a/contracts/src/instances/steth/StETHTarget0.sol +++ b/contracts/src/instances/steth/StETHTarget0.sol @@ -22,11 +22,11 @@ contract StETHTarget0 is HyperdriveTarget0, StETHBase { /// @notice Initializes the target0 contract. /// @param _config The configuration of the Hyperdrive pool. - /// @param _lido The Lido contract. + /// @param __lido The Lido contract. constructor( IHyperdrive.PoolConfig memory _config, - ILido _lido - ) HyperdriveTarget0(_config) StETHBase(_lido) {} + ILido __lido + ) HyperdriveTarget0(_config) StETHBase(__lido) {} /// Extras /// diff --git a/contracts/src/instances/steth/StETHTarget1.sol b/contracts/src/instances/steth/StETHTarget1.sol index f1f3ff8c1..7a3a36428 100644 --- a/contracts/src/instances/steth/StETHTarget1.sol +++ b/contracts/src/instances/steth/StETHTarget1.sol @@ -15,9 +15,9 @@ import { StETHBase } from "./StETHBase.sol"; contract StETHTarget1 is HyperdriveTarget1, StETHBase { /// @notice Initializes the target1 contract. /// @param _config The configuration of the Hyperdrive pool. - /// @param _lido The Lido contract. + /// @param __lido The Lido contract. constructor( IHyperdrive.PoolConfig memory _config, - ILido _lido - ) HyperdriveTarget1(_config) StETHBase(_lido) {} + ILido __lido + ) HyperdriveTarget1(_config) StETHBase(__lido) {} } diff --git a/contracts/src/instances/steth/StETHTarget2.sol b/contracts/src/instances/steth/StETHTarget2.sol index e11a4fb81..570671133 100644 --- a/contracts/src/instances/steth/StETHTarget2.sol +++ b/contracts/src/instances/steth/StETHTarget2.sol @@ -15,9 +15,9 @@ import { StETHBase } from "./StETHBase.sol"; contract StETHTarget2 is HyperdriveTarget2, StETHBase { /// @notice Initializes the target2 contract. /// @param _config The configuration of the Hyperdrive pool. - /// @param _lido The Lido contract. + /// @param __lido The Lido contract. constructor( IHyperdrive.PoolConfig memory _config, - ILido _lido - ) HyperdriveTarget2(_config) StETHBase(_lido) {} + ILido __lido + ) HyperdriveTarget2(_config) StETHBase(__lido) {} } diff --git a/contracts/src/instances/steth/StETHTarget3.sol b/contracts/src/instances/steth/StETHTarget3.sol index 6abf7c590..e78555c89 100644 --- a/contracts/src/instances/steth/StETHTarget3.sol +++ b/contracts/src/instances/steth/StETHTarget3.sol @@ -15,9 +15,9 @@ import { StETHBase } from "./StETHBase.sol"; contract StETHTarget3 is HyperdriveTarget3, StETHBase { /// @notice Initializes the target3 contract. /// @param _config The configuration of the Hyperdrive pool. - /// @param _lido The Lido contract. + /// @param __lido The Lido contract. constructor( IHyperdrive.PoolConfig memory _config, - ILido _lido - ) HyperdriveTarget3(_config) StETHBase(_lido) {} + ILido __lido + ) HyperdriveTarget3(_config) StETHBase(__lido) {} } diff --git a/contracts/src/instances/steth/StETHTarget4.sol b/contracts/src/instances/steth/StETHTarget4.sol index 63f605aa2..03e15f9d8 100644 --- a/contracts/src/instances/steth/StETHTarget4.sol +++ b/contracts/src/instances/steth/StETHTarget4.sol @@ -15,9 +15,9 @@ import { StETHBase } from "./StETHBase.sol"; contract StETHTarget4 is HyperdriveTarget4, StETHBase { /// @notice Initializes the target4 contract. /// @param _config The configuration of the Hyperdrive pool. - /// @param _lido The Lido contract. + /// @param __lido The Lido contract. constructor( IHyperdrive.PoolConfig memory _config, - ILido _lido - ) HyperdriveTarget4(_config) StETHBase(_lido) {} + ILido __lido + ) HyperdriveTarget4(_config) StETHBase(__lido) {} } diff --git a/contracts/src/interfaces/IHyperdrive.sol b/contracts/src/interfaces/IHyperdrive.sol index df84bf8fa..63099def0 100644 --- a/contracts/src/interfaces/IHyperdrive.sol +++ b/contracts/src/interfaces/IHyperdrive.sol @@ -239,6 +239,9 @@ interface IHyperdrive is /// price of the underlying yield source on deployment. error InvalidInitialVaultSharePrice(); + /// @notice Thrown when the present value calculation fails. + error InvalidPresentValue(); + /// @notice Thrown when update liquidity brings the share reserves below /// the minimum share reserves. error InvalidShareReserves(); @@ -266,10 +269,6 @@ interface IHyperdrive is /// LPs from losses of precision that can occur at small scales. error MinimumTransactionAmount(); - /// @notice Thrown when the present value is negative. Whatever proceeded - /// a negative present value should be reverted. - error NegativePresentValue(); - /// @notice Thrown when the present value prior to adding liquidity results in a /// decrease in present value after liquidity. This is caused by a /// shortage in liquidity that prevents all the open positions being diff --git a/contracts/src/libraries/LPMath.sol b/contracts/src/libraries/LPMath.sol index d8453418c..dfeeffc4d 100644 --- a/contracts/src/libraries/LPMath.sol +++ b/contracts/src/libraries/LPMath.sol @@ -144,7 +144,7 @@ library LPMath { _params ); if (!success) { - revert IHyperdrive.NegativePresentValue(); + revert IHyperdrive.InvalidPresentValue(); } return presentValue; }