Centrifuge - btk's results

The institutional ecosystem for on-chain credit.

General Information

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

Centrifuge

Findings Distribution

Researcher Performance

Rank: 67/84

Findings: 1

Award: $12.79

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

12.7917 USDC - $12.79

Labels

bug
downgraded by judge
grade-b
low quality report
QA (Quality Assurance)
duplicate-41
Q-10

External Links

Lines of code

https://github.com/code-423n4/2023-09-centrifuge/blob/main/src/LiquidityPool.sol#L97-L100

Vulnerability details

Impact

The withApproval modifier in the contract is not functioning as intended, as it restricts access only to the owner of the assets and not to authorized administrators, which is not the expected behavior.

Proof of Concept

    /// @dev Either msg.sender is the owner or a ward on the contract
    modifier withApproval(address owner) {
        require(msg.sender == owner, "LiquidityPool/no-approval");
        _;
    }

Every function with the withApproval modifier is supposed to only be called by the Owner of the assets or an authorized admin, but with the current implementation, the function will revert if called by someone othe than the owner of the asset.

Tools Used

Manual review

To address this isssue, we recommend updating the modifier as follow:

    /// @dev Either msg.sender is the owner or a ward on the contract
    modifier withApproval(address owner) {
        require(msg.sender == owner || wards[msg.sender] == 1, "LiquidityPool/no-approval");
        _;
    }

Assessed type

Invalid Validation

#0 - c4-pre-sort

2023-09-16T00:15:57Z

raymondfam marked the issue as low quality report

#1 - c4-pre-sort

2023-09-16T00:16:08Z

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)

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