Skip to content

Commit

Permalink
Merge pull request #190 from etherfi-protocol/syko/feature/restake_stEth
Browse files Browse the repository at this point in the history
[PoC] Restaking of stETH holdings
  • Loading branch information
jtfirek authored Nov 11, 2024
2 parents 6825721 + 740d9ec commit 3fbc6ac
Show file tree
Hide file tree
Showing 9 changed files with 767 additions and 525 deletions.
36 changes: 36 additions & 0 deletions audits/NM-0217 - EtherFi Restaking Of stETH Holdings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# [NM-0217] Restaking of stETH holdings

**File(s)**: [EtherFiRestaker.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/EtherFiRestaker.sol#L19), [Liquifier.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/Liquifier.sol#L50),
[ILiquifier.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/interfaces/ILiquifier.sol)

### Summary

Restaking of stETH holdings. Ether.fi is holding ~250k stETH in deVamp contract. However, it is suffering from the low capital efficiency being not deployed to EigenLayer restaking. This PR addresses this issue.

---

### Findings

### [Best practice] Lack of access control in the `undelegate` function

**File(s)**: [EtherFiRestaker.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/EtherFiRestaker.sol#L147)

**Description**: The `EtherFiRestaker::undelegate` function lacks access controls. The call will still revert because of the `onlyOwner` modifier that's used on the `queueWithdrawals` function, but this is the only "main" function in the contract without access controls.

**Recommendation(s)**: Consider adding access control to this function.

**Update from client**: fixed

---

### [Best practice] Typo in function name `getEthAmountInEigenLayerPnedingForWithdrawals`

**File(s)**: [EtherFiRestaker.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/EtherFiRestaker.sol#L330)

**Description**: The function name has a typo `getEthAmountInEigenLayerPnedingForWithdrawals`. Instead if Pending, it is written Pneding.

**Recommendation(s)**: Rename the function accordingly.

**Update from client**: fixed

---
25 changes: 25 additions & 0 deletions operations/20241028_upgrade_liquifier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [
{
"to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761",
"value": "0",
"data": "0x01d5062a0000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b27b1dc838898368e9a81f69c626aec7e71f02c100000000000000000000000000000000000000000000000000000000"
}
,
{
"to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761",
"value": "0",
"data": "0x134008d30000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b27b1dc838898368e9a81f69c626aec7e71f02c100000000000000000000000000000000000000000000000000000000"
}
,
{
"to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761",
"value": "0",
"data": "0x01d5062a0000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f4800000000000000000000000000000000000000000000000000000000000000024e587a6170000000000000000000000001b7a4c3797236a1c37f8741c0be35c2c72736fff00000000000000000000000000000000000000000000000000000000"
}
,
{
"to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761",
"value": "0",
"data": "0x134008d30000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024e587a6170000000000000000000000001b7a4c3797236a1c37f8741c0be35c2c72736fff00000000000000000000000000000000000000000000000000000000"
}
] }
Loading

0 comments on commit 3fbc6ac

Please sign in to comment.