Lenders lose funds if deposits continue to operate when Borrower has been sanctioned #16
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-a
primary issue
Highest quality submission among a set of duplicates
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
🤖_primary
AI based primary recommendation
🤖_04_group
AI based duplicate group recommendation
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarket.sol#L104-L108
https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarket.sol#L117-L120
https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarket.sol#L146-L166
Vulnerability details
Impact
Lenders lose funds and access to deposits
Vulnerability Details
The only function which checks whether the market's borrower is sanctioned is the
borrow()
function, leaving the rest of the market's functionality operational, such as deposits.However, deposits should also contain a check because it is very liekly that a sancioned borrower is not going to repay the debts that they owe into the market.
Therefore there would be three impacts on any lenders who deposit after the borrower is sanctioned:
POC
Tools Used
Manual Review
Foundry Testing
Recommendations
Add the same check in
borrow()
to the deposit functions and prevent users depositing if borrower is sanctioned.Assessed type
Access Control
The text was updated successfully, but these errors were encountered: