Attacker can burn his Credit tokens to DoS the protocol #663
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-1170
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/main/src/governance/ProfitManager.sol#L172-L176
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/main/src/loan/LendingTerm.sol#L379-L380
Vulnerability details
Impact
User can mint credit tokens in the SimplePSM contract
and then burn them making
totalBorrowedCredit
to underflowSince we use
totalBorrowedCredit
function in borrowing operations users won't be able to use protocol terms .Proof of Concept
The protocol uses
totalBorrowedCredit
value to assess debt across multiple terms, it is basically amount of credit tokens that we can redeem for collateral in SimplePSM subtracted from the credit total supply. We can inflateredeemableCredit
while simultaneously decreasingtargetTotalSupply
by minting tokens in SimplePSM and burning them. If we manage to burn more tokens that were borrowed,redeemableCredit
will be greater thantargetTotalSupply
andtotalBorrowedCredit
will underflow.Test case for
LendingTerm.t.sol
, set psm as MINTER insetUp
The text was updated successfully, but these errors were encountered: