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: 102/131
Findings: 1
Award: $6.67
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: YusSecurity
Also found by: 0xAsen, 0xCiphky, 0xDING99YA, 0xKbl, 0xSwahili, 0xbepresent, 3docSec, AS, Aymen0909, DeFiHackLabs, GREY-HAWK-REACH, KeyKiril, MiloTruck, QiuhaoLi, Silvermist, SovaSlava, TrungOre, VAD37, Vagner, Yanchuan, ZdravkoHr, ast3ros, cartlex_, d3e4, deth, ggg_ttt_hhh, gizzy, kodyvim, nirlin, nobody2018, rvierdiiev, serial-coder, sl1, tallo, xeros
6.6715 USDC - $6.67
The accountAddress, (address of the lender) is set instead of "borrowerAddress" when creating Escrow. Therefore a Lender is called instead of the borrower.
In the following code, the sentinel is creating a Escrow but the parameters set are wrong.
if (IWildcatSanctionsSentinel(sentinel).isSanctioned(borrower, accountAddress)) { _blockAccount(state, accountAddress); address escrow = IWildcatSanctionsSentinel(sentinel).createEscrow( accountAddress, borrower, address(asset) );
The parameters are set as follows: accountAddress, borrower, address(asset).
But, in the function that we are calling "createEscrow" in the "WildcatSanctionsSentinel.sol" the parameters are set in a different order: address borrower, address account, address asset.
function createEscrow( address borrower, address account, address asset ) public override returns (address escrowContract) { if (!IWildcatArchController(archController).isRegisteredMarket(msg.sender)) { revert NotRegisteredMarket(); }
Therefore, setting the Lender as a Borrower might lead to several issues. For example, the lender might be blocked but still eligible to call "releaseEscrow" and etc.
VS Code Manual Review
Change the order of the parameters in the "executeWithdrawal" function as follows in the "createEscrow" function: address borrower, address account, address asset.
Error
#0 - c4-pre-sort
2023-10-27T02:31:28Z
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:56:58Z
MarioPoneder marked the issue as satisfactory