Open sherlock-admin2 opened 5 months ago
The protocol team fixed this issue in the following PRs/commits: https://github.com/napierfi/napier-uups-adapters/pull/10
This has been fixed by changing the functionality of the _stake()
function, now it deposits WETH
instead of stETH
.
The Lead Senior Watson signed off on the fix.
Ironsidesec
high
Depositing
stETH
to puffer finance will revert due to wrong implementation ofPufETHAdapter._stake
callSummary
Reason:
PufETHAdapter._stake
will always revert due to wrong external call implementation. Impact: Can't deposit to Puffer. Likelihood: always.Vulnerability Detail
https://github.com/sherlock-audit/2024-05-napier-update/blob/c31af59c6399182fd04b40530d79d98632d2bfa7/napier-uups-adapters/src/adapters/puffer/PufETHAdapter.sol#L82
Issue flow:
PUFFER_DEPOSITOR.depositStETH(Permit)
,PufETHAdapter
passes only one parameterPermit
look at line 82 above.PUFFER_DEPOSITOR.depositStETH
has 2 parameters (Permit, address recipient). Check https://etherscan.io/address/0x4aA799C5dfc01ee7d790e3bf1a7C2257CE1DcefF#writeProxyContract#F1.PUFFER_DEPOSITOR
from implementation v1 to implementation v2.To check upgares of
PUFFER_DEPOSITOR
, scroll on https://etherscan.io/address/0x4aA799C5dfc01ee7d790e3bf1a7C2257CE1DcefF#writeProxyContractPrevious implementation where it had only one param https://etherscan.io/address/0x7276925e42f9c4054afa2fad80fa79520c453d6a#code#F1#L182
Latest implementation has 2 params https://etherscan.io/address/0x8c9517a9e99c74cd072a118d3dc6b4f3217f8b9b#code#F1#L67
Impact
Depositing stETH to puffer finance is not possible with current
PufETHAdapter
Code Snippet
https://github.com/sherlock-audit/2024-05-napier-update/blob/c31af59c6399182fd04b40530d79d98632d2bfa7/napier-uups-adapters/src/adapters/puffer/PufETHAdapter.sol#L82
https://etherscan.io/address/0x8c9517a9e99c74cd072a118d3dc6b4f3217f8b9b#code#F1#L41
https://etherscan.io/address/0x4aA799C5dfc01ee7d790e3bf1a7C2257CE1DcefF#writeProxyContract
Tool used
Manual Review
Recommendation
https://github.com/sherlock-audit/2024-05-napier-update/blob/c31af59c6399182fd04b40530d79d98632d2bfa7/napier-uups-adapters/src/adapters/puffer/PufETHAdapter.sol#L82