Unnecessary max approve puts node delegator assets at risk #266
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-70
grade-b
insufficient quality report
This report is not of sufficient quality
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/main/src/NodeDelegator.sol#L45
Vulnerability details
Impact
In
NodeDelegator.sol
, the only method to deposit assets into an EigenLayer Strategy requires theMANAGER
role to callmaxApproveToEigenStrategyManager(address)
which approves the maximum allowance of an asset to an EigenLayer strategy. This allowance stays at the maximum and cannot be updated or revoked.https://github.com/code-423n4/2023-11-kelp/blob/main/src/NodeDelegator.sol#L45
If any vulnerability is found in a particular EigenLayer strategy that takes advantage of this allowance, all assets deposited to a node delegator are at risk.
This is medium severity due to having an external requirement in EigenLayer.
Proof of Concept
MANAGER
ofNodeDelegator
callsmaxApproveToEigenStrategyManager(address)
https://github.com/code-423n4/2023-11-kelp/blob/main/src/LRTDepositPool.sol#L162EIGEN_STRATEGY_MANAGER
contract has full allowance of asset held byNodeDelegator
. A vulnerability in this contract could put all assets at riskTools Used
Manual review
Recommended Mitigation Steps
A potential mitigation is to only approve the amount needed at the time of deposit.
Current:
https://github.com/code-423n4/2023-11-kelp/blob/main/src/NodeDelegator.sol#L67
Recommended:
Assessed type
ERC20
The text was updated successfully, but these errors were encountered: