Remove changes that we'ren't covered in v0.2+ audits#193
Open
OisinKyne wants to merge 2 commits into
Open
Conversation
Comment on lines
+76
to
+99
| function distribute() external returns (uint256 amount) { | ||
| // get current balance | ||
| uint256 balance = stETH.balanceOf(address(this)); | ||
| // approve the wstETH | ||
| stETH.approve(address(wstETH), balance); | ||
| // wrap into wstETH | ||
| // wrap into wseth | ||
| // we ignore the return value | ||
| IwstETH(address(wstETH)).wrap(balance); | ||
| // we use balanceOf here in case some wstETH is stuck in the | ||
| // contract we would be able to rescue it | ||
| amount = ERC20(wstETH).balanceOf(address(this)); | ||
|
|
||
| if (feeShare > 0) { | ||
| uint256 fee = (amount * feeShare) / PERCENTAGE_SCALE; | ||
| // transfer to split wallet | ||
| // update amount to reflect fee charged | ||
| ERC20(wstETH).safeTransfer(splitWallet(), amount -= fee); | ||
| // transfer to fee address | ||
| ERC20(wstETH).safeTransfer(feeRecipient, fee); | ||
| } else { | ||
| // transfer to split wallet | ||
| ERC20(wstETH).safeTransfer(splitWallet(), amount); | ||
| } | ||
| } |
Check warning
Code scanning / Slither
Unused return Medium
Comment on lines
+76
to
+99
| function distribute() external returns (uint256 amount) { | ||
| // get current balance | ||
| uint256 balance = stETH.balanceOf(address(this)); | ||
| // approve the wstETH | ||
| stETH.approve(address(wstETH), balance); | ||
| // wrap into wstETH | ||
| // wrap into wseth | ||
| // we ignore the return value | ||
| IwstETH(address(wstETH)).wrap(balance); | ||
| // we use balanceOf here in case some wstETH is stuck in the | ||
| // contract we would be able to rescue it | ||
| amount = ERC20(wstETH).balanceOf(address(this)); | ||
|
|
||
| if (feeShare > 0) { | ||
| uint256 fee = (amount * feeShare) / PERCENTAGE_SCALE; | ||
| // transfer to split wallet | ||
| // update amount to reflect fee charged | ||
| ERC20(wstETH).safeTransfer(splitWallet(), amount -= fee); | ||
| // transfer to fee address | ||
| ERC20(wstETH).safeTransfer(feeRecipient, fee); | ||
| } else { | ||
| // transfer to split wallet | ||
| ERC20(wstETH).safeTransfer(splitWallet(), amount); | ||
| } | ||
| } |
Check warning
Code scanning / Slither
Unused return Medium
pinebit
approved these changes
Mar 20, 2026
5ebf81a to
2c55578
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The latest main ObolLidoSplits are not the ones we should use. I always check back out v0.1 but someone eventually won't. This PR brings the 0.1 code back to main, it removed the base collector feature entirely, and takes out the etherfi splitter we don't use too.
Details
How to test it
ticket: #000