Skip to content

Commit

Permalink
addressing feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaiton committed Jun 17, 2024
1 parent 02efffd commit 61d0be0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/utils/HyperdriveUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1247,13 +1247,11 @@ library HyperdriveUtils {
if (shareAmount < tradeFees) {
return (0, false);
}

uint256 tradeDelta = shareAmount - tradeFees;
if (_params.shareReserves < tradeDelta) {
uint256 shareReservesDelta = shareAmount - tradeFees;
if (_params.shareReserves < shareReservesDelta) {
return (0, false);
}

uint256 shareReserves = _params.shareReserves - tradeDelta;
uint256 shareReserves = _params.shareReserves - shareReservesDelta;
uint256 exposure = (_params.longExposure -
uint256(_checkpointExposure.max(0))).divDown(
_params.vaultSharePrice
Expand Down

0 comments on commit 61d0be0

Please sign in to comment.