Skip to content

Remove changes that we'ren't covered in v0.2+ audits#193

Open
OisinKyne wants to merge 2 commits into
mainfrom
oisin/cleanup
Open

Remove changes that we'ren't covered in v0.2+ audits#193
OisinKyne wants to merge 2 commits into
mainfrom
oisin/cleanup

Conversation

@OisinKyne
Copy link
Copy Markdown
Contributor

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

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

@OisinKyne OisinKyne requested a review from pinebit March 19, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants