The Wildcat Protocol - Silvermist's results

Banking, but worse - a protocol for fixed-rate, undercollateralised credit facilities.

General Information

Platform: Code4rena

Start Date: 16/10/2023

Pot Size: $60,500 USDC

Total HM: 16

Participants: 131

Period: 10 days

Judge: 0xTheC0der

Total Solo HM: 3

Id: 296

League: ETH

Wildcat Protocol

Findings Distribution

Researcher Performance

Rank: 98/131

Findings: 2

Award: $6.73

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-10-wildcat/blob/c5df665f0bc2ca5df6f06938d66494b11e7bdada/src/market/WildcatMarket.sol#L142 https://github.com/code-423n4/2023-10-wildcat/blob/c5df665f0bc2ca5df6f06938d66494b11e7bdada/src/market/WildcatMarketBase.sol#L136-L139

Vulnerability details

Impact

The closeMarket function has the onlyController modifier, which means that the function can only be called from the WildcatMarketController.sol contract, but there is no function in it that calls closeMarket, which means that there is no way to close the market.

Tools Used

Manual Review

Impelement a function inside WildcatMarketController.sol that calls closeMarket()

Assessed type

Other

#0 - c4-pre-sort

2023-10-27T07:17:44Z

minhquanym marked the issue as duplicate of #147

#1 - c4-judge

2023-11-07T14:04:41Z

MarioPoneder marked the issue as partial-50

#2 - c4-judge

2023-11-07T14:16:53Z

MarioPoneder changed the severity to 3 (High Risk)

Awards

6.6715 USDC - $6.67

Labels

bug
3 (High Risk)
satisfactory
upgraded by judge
duplicate-68

External Links

Lines of code

https://github.com/code-423n4/2023-10-wildcat/blob/c5df665f0bc2ca5df6f06938d66494b11e7bdada/src/market/WildcatMarketWithdrawals.sol#L166-L169 https://github.com/code-423n4/2023-10-wildcat/blob/c5df665f0bc2ca5df6f06938d66494b11e7bdada/src/WildcatSanctionsSentinel.sol#L95-L98

Vulnerability details

Impact

The function createEscrow takes three parameters: borrower, account, and asset, in that order. However, when this function is called in executeWithdrawal(), it seems that the order of account and borrower is reversed.

An escrow will be created for the borrower with the lender's assets. Since the borrower's address is not sanctioned, the borrower can call releaseEscrow immediately and steal the sanctioned lender assets.

Proof of Concept

Tools Used

Manual Review

Call the function with the correct order of parameters

Assessed type

Other

#0 - c4-pre-sort

2023-10-27T02:25:30Z

minhquanym marked the issue as duplicate of #515

#1 - c4-judge

2023-11-07T11:46:36Z

MarioPoneder changed the severity to 3 (High Risk)

#2 - c4-judge

2023-11-07T11:51:20Z

MarioPoneder marked the issue as satisfactory

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter