You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issueWill FixThe sponsor confirmed this issue will be fixed
eETH, brought to you by ether.fi, is a Liquid Restaking Token that allows users to stake their ETH to accrue staking rewards and automatically restake their ETH in EigenLayer.
@>> weETH is the wrapped non rebasing version of eETH that can be used throughout the DeFI ecosystem. ether.fi will >be working with DeFi partners to create utility for weETH including Balancer, Gravita, Pendle, Aura, Maverick, and many >more, as well as other layer two protocols proceeding the launch date.
Rebasing tokens, such as eETH, have a dynamic supply that can complicate their integration with DeFi platforms.
function depositStEth(uint256_amount, uint256_boostAmount) external {
IERC20(stETH).safeTransferFrom(
msg.sender,
address(this),
_amount
);
_depositPredefinedAsset(_amount, _amount, _boostAmount, PredefinedPool.wstETH);
}
function depositeEth(uint256_amount, uint256_boostAmount) external {
IERC20(eETH).safeTransferFrom(
msg.sender,
address(this),
_amount
);
_depositPredefinedAsset(_amount, _amount, _boostAmount, PredefinedPool.weETH);
}
function _depositPredefinedAsset(uint256_amount, uint256_initalAmount, uint256_boostAmount, PredefinedPool _predefinedPool) internal {
uint256 _finalAmount;
if (_predefinedPool == PredefinedPool.sDAI) {
_finalAmount =_daiTOsDai(_amount);
} elseif (_predefinedPool == PredefinedPool.wstETH) {
_finalAmount =_stEthTOwstEth(_amount);
} elseif (_predefinedPool == PredefinedPool.weETH) {
_finalAmount =_eethTOweEth(_amount);
} else {
revertInvalidDeposit();
}
// adjust boostAmount for the new asset
_boostAmount = _boostAmount * _finalAmount / _initalAmount;
_deposit(typeToId[_predefinedPool], _finalAmount, _boostAmount);
}
function _ethTOstEth(uint256_amount) internalreturns (uint256) {
// submit function does not return exact amount of stETH so we need to check balancesuint256 balanceBefore =IERC20(stETH).balanceOf(address(this));
IstETH(stETH).submit{value: _amount}(address(this));
return (IERC20(stETH).balanceOf(address(this)) - balanceBefore);
}
function _stEthTOwstEth(uint256_amount) internalreturns (uint256) {
// wrap returns exact amount of wstETHreturnIwstETH(wstETH).wrap(_amount);
}
function _ethTOeEth(uint256_amount) internalreturns (uint256) {
// deposit returns exact amount of eETH
@>>returnIeETHLiquidityPool(eETHLiquidityPool).deposit{value: _amount}(address(this));
}
sherlock-admin3
changed the title
Amusing Coconut Lark - Protocol supports eETH but doesn't consider its also a rebase token like stETH
hunter_w3b - Protocol supports eETH but doesn't consider its also a rebase token like stETHJun 1, 2024
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issueWill FixThe sponsor confirmed this issue will be fixed
hunter_w3b
high
Protocol supports
eETH
but doesn't consider its also a rebase token likestETH
Summary
eETH
is also a rebasing token likestETH
it should check it's value before and after the transferVulnerability Detail
eETH
is also a rebasing token likestETH
it should check it's value before and after the transferDocs for eETH
Rebasing tokens, such as eETH, have a dynamic supply that can complicate their integration with DeFi platforms.
Impact
Code Snippet
https://github.com/sherlock-audit/2024-05-sophon/blob/main/farming-contracts/contracts/farm/SophonFarming.sol#L832-L836
Tool used
Manual Review
Recommendation
Duplicate of #4
The text was updated successfully, but these errors were encountered: