Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contracts/src/instances/steth/StETHTarget0.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 ///

Expand Down
6 changes: 3 additions & 3 deletions contracts/src/instances/steth/StETHTarget1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
}
6 changes: 3 additions & 3 deletions contracts/src/instances/steth/StETHTarget2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
}
6 changes: 3 additions & 3 deletions contracts/src/instances/steth/StETHTarget3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
}
6 changes: 3 additions & 3 deletions contracts/src/instances/steth/StETHTarget4.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
}
7 changes: 3 additions & 4 deletions contracts/src/interfaces/IHyperdrive.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/libraries/LPMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ library LPMath {
_params
);
if (!success) {
revert IHyperdrive.NegativePresentValue();
revert IHyperdrive.InvalidPresentValue();
}
return presentValue;
}
Expand Down