Platform: Code4rena
Start Date: 08/09/2023
Pot Size: $70,000 USDC
Total HM: 8
Participants: 84
Period: 6 days
Judge: gzeon
Total Solo HM: 2
Id: 285
League: ETH
Rank: 76/84
Findings: 1
Award: $12.79
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: castle_chain
Also found by: 0xAadi, 0xHelium, 0xLook, 0xblackskull, 0xfuje, 0xmystery, 0xnev, 0xpiken, 7ashraf, BARW, Bauchibred, Bughunter101, Ch_301, JP_Courses, Kaysoft, Krace, MohammedRizwan, SanketKogekar, Sathish9098, alexzoid, ast3ros, btk, catellatech, degensec, fatherOfBlocks, grearlake, imtybik, jkoppel, jolah1, klau5, lsaudit, m_Rassska, merlin, mrudenko, nobody2018, rokinot, rvierdiiev, sandy
12.7917 USDC - $12.79
withApproval in LiquidityManager.sol has the documentation
/// @dev Either msg.sender is the owner or a ward on the contract
However, the code makes it very clear that only owners have approval, never wards.
modifier withApproval(address owner) { require(msg.sender == owner, "LiquidityPool/no-approval"); _; }
The upshot is that only owners of positions can modify them. Wards cannot, even though the documentation makes it clear they should be able to.
I modified testDepositWithApproval in Liquidity.t.sol to try the deposit where the test contract is a ward.
root.relyContract(lPool_, self); // give self auth permissions lPool.requestDeposit(amount, address(investor));
However, the transaction reverted with "LiquidityPool/no-approval", even though the caller is a ward and should have this power according to the docs.
Manuel inspection
modifier withApproval(address owner) { require(msg.sender == owner || wards[msg.sender] == 1, "LiquidityPool/no-approval"); _; }
Access Control
#0 - c4-pre-sort
2023-09-16T01:48:25Z
raymondfam marked the issue as low quality report
#1 - c4-pre-sort
2023-09-16T01:48:35Z
raymondfam marked the issue as duplicate of #41
#2 - c4-judge
2023-09-25T16:09:58Z
gzeon-c4 changed the severity to QA (Quality Assurance)
#3 - c4-judge
2023-09-26T18:21:24Z
gzeon-c4 marked the issue as grade-c
#4 - c4-judge
2023-09-29T11:52:20Z
gzeon-c4 marked the issue as grade-b