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
Rank: 42/131
Findings: 2
Award: $150.79
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xStalin
Also found by: 0xCiphky, 0xComfyCat, 0xbepresent, 3docSec, Eigenvectors, Fulum, HChang26, Infect3d, QiuhaoLi, SandNallani, SovaSlava, TrungOre, YusSecurity, ZdravkoHr, ast3ros, ayden, bdmcbri, cu5t0mpeo, elprofesor, gizzy, jasonxiale, kodyvim, marqymarq10, max10afternoon, nisedo, nobody2018, radev_sw, rvierdiiev, serial-coder, xeros
13.1205 USDC - $13.12
Wildcat protocol provides lending with lender backed collateral (considered as reserves and the ratio must be upheld by the borrower). WildcatMarketTokens are provided to lenders in return for their base assets, these tokens are ERC20 meaning tokens can be transferred to and from different users. The protocol team has taken certain steps to prevent interaction with sanctioned users which will send funds to an escrow contract to be held until their sanction status is revoked of a borrower accepts strict liability by overriding their sanction status.
Wildcat does not check sanctions on transfer which can lead lenders who are sanctioned to avoid having their funds locked in the designated escrow contract.
Consider the following scenario;
It is worth noting that there are restrictions on this, namely there is a delay between queueing withdrawal and executing withdrawals. This does provide chain-analysis time to update the list which means the bypass is not guaranteed.
Manual Review
Lenders should have sanction status checked when transferring MarketTokens
ERC20
#0 - c4-pre-sort
2023-10-27T03:14:02Z
minhquanym marked the issue as duplicate of #54
#1 - c4-judge
2023-11-07T14:36:22Z
MarioPoneder changed the severity to 3 (High Risk)
#2 - c4-judge
2023-11-07T14:37:13Z
MarioPoneder marked the issue as satisfactory
🌟 Selected for report: MiloTruck
Also found by: CaeraDenoir, T1MOH, ast3ros, elprofesor, joaovwfreire, rvierdiiev, t0x1c, trachev
137.6749 USDC - $137.67
Wildcat protocol provides borrowers the ability to adjust annual interest BIPs after market deployment. In order to protect lenders the protocol increases the reserve ratio of ratio of the market to 90% for two weeks. The increased reserve ratio allows borrowers to exit if they chose for up to 2 weeks before the reserve ratio is reset back to baseline. This calculation assumes initial reserve ratio starts lower than 90%. If the initial reserve ratio is set higher, the borrower can instantly lower the reserve ratio to 90% by lowering the annual interest BIPs.
This allows the borrower the ability to withdraw up to an additional 10% of the market total supply which previously a lender would have considered part of the reserve ratio (something which under normal conditions can't be lowered below the initial baseline level).
Consider the following scenario;
WildcatMarketController.setAnnualInterestBips()
where the annual interest rate value is lower than expected. This will instantly give them access to an additional 8% of user funds.Further notes: it is important to note that setting reserve ratios of 98% is allowed by the system currently and it is important to consider that the market lenders and borrowers though agreeing to a system perhaps not run as intended by Wildcat, can only agree to how they believe the system to behave. Without strictly inspecting the code a lender would have no idea that despite having a reserve ratio of 98%, the borrower has access to 10%, not 2% of lender funds.
I have set the rating for this as medium due to the setup requirements of this attack. Though it could be argued that 8% of user funds could attribute to a significant portion. The file is both in scope and no notes have been included in the audit about any out of scope aspects of invariant testing.
Manual Review
Lenders should have sanction status checked when transferring.
Rug-Pull
#0 - c4-pre-sort
2023-10-27T17:06:47Z
minhquanym marked the issue as duplicate of #75
#1 - c4-judge
2023-11-07T18:36:22Z
MarioPoneder marked the issue as satisfactory