Open sherlock-admin opened 1 year ago
Escalate for 2 USDC.
We do not think this is a duplicate issue of #204. While both are about commitToLiens()
reverting, the triggering locations, conditions and therefore the recommendations are entirely different. This issue is specific to non-initialization of protocol fee variables as described above.
cc @berndartmueller @lucyoa
Escalate for 2 USDC.
We do not think this is a duplicate issue of #204. While both are about
commitToLiens()
reverting, the triggering locations, conditions and therefore the recommendations are entirely different. This issue is specific to non-initialization of protocol fee variables as described above.cc @berndartmueller @lucyoa
You've created a valid escalation for 2 USDC!
To remove the escalation from consideration: Delete your comment. To change the amount you've staked on this escalation: Edit your comment (do not create a new comment).
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Escalation accepted
Escalation accepted
This issue's escalations have been accepted!
Contestants' payouts and scores will be updated according to the changes made on this issue.
0xRajeev
medium
AstariaRouter.commitToLiens
will revert if the protocol fee is enabledSummary
The function
commitToLiens()
will revert ingetProtocolFee()
, which prevents borrowers from depositing collateral and requesting loans in the protocol.Vulnerability Detail
If the protocol fee is enabled by setting
feeTo
to a non-zero address, thengetProtocolFee()
will revert because of division-by-zero given thatprotocolFeeDenominator
is0
without any initialization and no setter (infile()
) for setting it.Impact
The function
commitToLiens()
will revert if the protocol fee is enabled thus preventing borrowers from depositing collateral and requesting loans in the protocol thereby failing to bootstrap its core NFT lending functionality.Code Snippet
Tool used
Manual Review
Recommendation
Initialize protocol fee numerator and denominator in
AstariaRouter
and add their setters tofile()
.