Skip to content

Commit

Permalink
chore: fix assessment
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Feb 7, 2025
1 parent 5d3dd3c commit 2a5de07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions contracts/0.8.25/interfaces/IStakingRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ interface IStakingRouter {
external
view
returns (
address[] memory recipients,
uint256[] memory stakingModuleIds,
uint96[] memory stakingModuleFees,
address[] calldata recipients,
uint256[] calldata stakingModuleIds,
uint96[] calldata stakingModuleFees,
uint96 totalFee,
uint256 precisionPoints
);

function reportRewardsMinted(uint256[] memory _stakingModuleIds, uint256[] memory _totalShares) external;
function reportRewardsMinted(uint256[] calldata _stakingModuleIds, uint256[] calldata _totalShares) external;
}
6 changes: 3 additions & 3 deletions contracts/0.8.25/vaults/VaultHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,10 @@ abstract contract VaultHub is PausableUntilWithRoles {
socket.sharesMinted += uint96(treasuryFeeShares);
}

uint256 mintedStETH = (socket.sharesMinted * _postTotalPooledEther) / _postTotalShares; //TODO: check rounding
uint256 mintedStETH = (socket.sharesMinted * _postTotalPooledEther) / _postTotalShares; //TODO: Should use round up?
uint256 threshold = (mintedStETH * TOTAL_BASIS_POINTS) / (TOTAL_BASIS_POINTS - socket.reserveRatioThresholdBP);
_epicrisis(_valuations[i], threshold, socket);


IStakingVault(socket.vault).report(_valuations[i], _inOutDeltas[i], _locked[i]);
}

Expand All @@ -527,7 +526,8 @@ abstract contract VaultHub is PausableUntilWithRoles {
/// @notice Evaluates if vault's valuation meets minimum threshold and marks it as unbalanced if below threshold
function _vaultAssessment(address _vault, VaultSocket storage _socket) internal {
uint256 valuation = IStakingVault(_vault).valuation();
uint256 threshold = (_socket.sharesMinted * TOTAL_BASIS_POINTS) / (TOTAL_BASIS_POINTS - _socket.reserveRatioThresholdBP);
uint256 mintedStETH = STETH.getPooledEthByShares(_socket.sharesMinted); //TODO: Should use round up?
uint256 threshold = (mintedStETH * TOTAL_BASIS_POINTS) / (TOTAL_BASIS_POINTS - _socket.reserveRatioThresholdBP);

_epicrisis(valuation, threshold, _socket);
}
Expand Down

0 comments on commit 2a5de07

Please sign in to comment.