Centrifuge - 0xLook'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: 75/84

Findings: 1

Award: $12.79

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

12.7917 USDC - $12.79

Labels

bug
grade-b
QA (Quality Assurance)
sufficient quality report
Q-02

External Links

The comment is wrong

LiquidityPool.sol Line 96

96: /// @dev Either msg.sender is the owner or a ward on the contract @audit comment is wrong 97: modifier withApproval(address owner) { 98: require(msg.sender == owner, "LiquidityPool/no-approval"); 99: _; 100: }

This modifier should only check that the owner is the msg.sender.

Remove commented out code

LiquidityPool.sol Line 149

148: function mint(uint256 shares, address receiver) public returns (uint256 assets) { 149: // require(receiver == msg.sender, "LiquidityPool/not-authorized-to-mint"); 150: assets = investmentManager.processMint(receiver, shares); 151: emit Deposit(address(this), receiver, assets, shares); 152: }

No same value input control

Auth.sol#L14-L17

14: function rely(address user) external auth { 15: wards[user] = 1; 16: emit Rely(user); 17: }

Auth.sol#L20-L23

20: function deny(address user) external auth { 21: wards[user] = 0; 22: emit Deny(user); 23: }

PauseAdmin#L34-L37

34: function addPauser(address user) external auth { 35: pausers[user] = 1; 36: emit AddPauser(user); 37: }

PauseAdmin#L39-L42

39: function removePauser(address user) external auth { 40: pausers[user] = 0; 41: emit RemovePauser(user); 42: }

According to the syntax rules, use => mapping ( instead of => mapping( using spaces as keyword

InvestmentManager#L81

81: mapping(address => mapping(address => LPValues)) public orderbook;

PoolManager#L56-L57

56: mapping(bytes16 => Tranche) tranches; 57: mapping(address => bool) allowedCurrencies;

PoolManager#L72

72: mapping(address => address) liquidityPools; // currency -> liquidity pool address

PoolManager#L88

88: mapping(uint64 => Pool) public pools;

PoolManager#L91-L92

91: mapping(uint128 => address) public currencyIdToAddress; 92: mapping(address => uint128) public currencyAddressToId;

Root#L21

21: mapping(address => uint256) public schedule;

UseEscrow#L17

17: mapping(address => mapping(address => uint256)) destinations;

PauseAdmin#L13

13: mapping(address => uint256) public pausers;

Gateway#L89

89: mapping(address => bool) public incomingRouters;

ERC20#L17

17: mapping(address => uint256) public wards;

ERC20#L25-L26-L27

25: mapping(address => uint256) public balanceOf; 26: mapping(address => mapping(address => uint256)) public allowance; 27: mapping(address => uint256) public nonces;

RestrictionManager#L20

20: mapping(address => uint256) public members;

Tranche#L26

26: mapping(address => bool) public liquidityPools;

Auth#L8

8: mapping(address => uint256) public wards;

Use SMTChecker

the highest tier of smart contract behavior assurance is formal mathematical verification. All assertions that are made are guaranteed to be true across all inputs → The quality of your asserts is the quality of your verification. https://twitter.com/0xOwenThurm/status/1614359896350425088?t=dbG9gHFigBX85Rv29lOjIQ&s=19

#0 - c4-pre-sort

2023-09-17T01:50:57Z

raymondfam marked the issue as sufficient quality report

#1 - c4-judge

2023-09-26T17:33:06Z

gzeon-c4 marked the issue as grade-b

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