Centrifuge - T1MOH'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: 40/84

Findings: 1

Award: $132.86

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

132.8565 USDC - $132.86

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
upgraded by judge
duplicate-146

External Links

1. DOMAIN_SEPARATOR is calculated with empty name

https://github.com/code-423n4/2023-09-centrifuge/blob/512e7a71ebd9ae76384f837204216f26380c9f91/src/token/ERC20.sol#L67-L77

_DOMAIN_SEPARATOR is calculated in constructor, and cached until block.chainId is updated. Parameter name is used, on the moment of deploy it is empty string. Name is supposed to be later via function file(). It introduces inconsistency between real name and name used in domainSeparator

    constructor(uint8 decimals_) {
        decimals = decimals_;
        wards[_msgSender()] = 1;
        emit Rely(_msgSender());

        deploymentChainId = block.chainid;
        _DOMAIN_SEPARATOR = _calculateDomainSeparator(block.chainid);
    }

    function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) {
        return keccak256(
            abi.encode(
                keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                keccak256(bytes(name)),
                keccak256(bytes(version)),
                chainId,
                address(this)
            )
        );
    }

#0 - c4-pre-sort

2023-09-17T00:56:36Z

raymondfam marked the issue as sufficient quality report

#1 - c4-judge

2023-09-26T17:53:54Z

gzeon-c4 marked the issue as grade-c

#2 - c4-judge

2023-09-26T18:02:54Z

gzeon-c4 removed the grade

#3 - c4-judge

2023-09-26T18:03:08Z

gzeon-c4 changed the severity to 2 (Med Risk)

#4 - c4-judge

2023-09-26T18:03:08Z

gzeon-c4 changed the severity to 2 (Med Risk)

#5 - c4-judge

2023-09-26T18:03:31Z

gzeon-c4 marked the issue as duplicate of #146

#6 - c4-judge

2023-09-26T18:03:37Z

gzeon-c4 marked the issue as satisfactory

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