This will always revert because the function depositStETH of PUFFER_DEPOSITOR takes two parameters as inputs: a Permit struct, and a receiver address. Only the first parameter is passed by Napier, this means Napier will attempt to call a function that doesn't exist making the whole transaction revert.
This can be verified by looking at the currently deployed PUFFER_DEPOSITOR. The address is hardcoded in the Constants.sol file.
Impact
The PufETHAdapter::_stake() will always revert and funds can't be deposited, rendering the contract useless.
Code Snippet
Tool used
Manual Review
Recommendation
Adjust the IPufferDepositor interface and pass address(this) as second parameter when calling depositStETH:
zzykxx
medium
_stake()
function inPufEthAdapter
will always revertSummary
Vulnerability Detail
The PufETHAdapter::_stake() function deposits
stETH
into Puffer via the following call:This will always revert because the function
depositStETH
ofPUFFER_DEPOSITOR
takes two parameters as inputs: aPermit
struct, and a receiveraddress
. Only the first parameter is passed by Napier, this means Napier will attempt to call a function that doesn't exist making the whole transaction revert.This can be verified by looking at the currently deployed PUFFER_DEPOSITOR. The address is hardcoded in the Constants.sol file.
Impact
The PufETHAdapter::_stake() will always revert and funds can't be deposited, rendering the contract useless.
Code Snippet
Tool used
Manual Review
Recommendation
Adjust the
IPufferDepositor
interface and passaddress(this)
as second parameter when callingdepositStETH
:PufETHAdapter.sol#L82
Duplicate of #21