Canto Identity Subprotocols contest - Matin's results

Subprotocols for Canto Identity Protocol.

General Information

Platform: Code4rena

Start Date: 17/03/2023

Pot Size: $36,500 USDC

Total HM: 10

Participants: 98

Period: 3 days

Judge: leastwood

Total Solo HM: 5

Id: 223

League: ETH

Canto Identity Subprotocols

Findings Distribution

Researcher Performance

Rank: 55/98

Findings: 1

Award: $22.77

QA:
grade-b

🌟 Selected for report: 0

šŸš€ Solo Findings: 0

Awards

22.7749 USDC - $22.77

Labels

bug
grade-b
QA (Quality Assurance)
Q-23

External Links

Summary

Low-Risk Issues

IssueInstances
[L‑01]indexed keyword for reference type variables such as string in events may lead to data loss.2

Total: 2 instances over 1 issue

Non-critical Issues

IssueInstances
[N‑01]Use a more recent version of solidity5
[N‑02]File is missing NatSpec1
[N‑03]Consider using delete rather than assigning zero to default values2

Total: 8 instances over 3 issues

Note: The table above was created considering the automatic findings and thus, those are not included.

Low-Risk Issues

[L‑01] indexed keyword for reference type variables such as string in events may lead to data loss.

when the indexed keyword is used for reference typed variables such as string, it will return the hash of the mentioned string. Thus, the event which is supposed to inform all of the applications subscribed to its emitting transaction (e.g. front-end of the DApp), would get a meaningless and obscure 32 bytes that correspond to keccak256 of an encoded string. For more information about the indexed events, one can check here(https://docs.soliditylang.org/en/v0.8.17/abi-spec.html?highlight=indexed#events).

There are 2 instances of this issue:

    event NamespaceFused(address indexed fuser, uint256 indexed namespaceId, string indexed name);

https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-namespace-protocol/src/Namespace.sol#L54

    event BioAdded(address indexed minter, uint256 indexed nftID, string indexed bio);

https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-bio-protocol/src/Bio.sol#L23

Non-critical Issues

[N‑01] Use a more recent version of solidity.

Using version 0.8.17 for the solidity compiler is better.

There are 5 instances of this issue:

    pragma solidity >=0.8.0;

https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-pfp-protocol/src/ProfilePicture.sol#L2 https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-namespace-protocol/src/Tray.sol#L2 https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-namespace-protocol/src/Namespace.sol#L2 https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-bio-protocol/src/Bio.sol#L2 https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-namespace-protocol/src/Utils.sol#L2

[N‑02] File is missing NatSpec

Some functions miss NatSpec (@inheritdoc)

There is 1 instance of this issue:

    function _drawing(uint256 _seed) private pure returns (TileData memory tileData) {...}
}

https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-namespace-protocol/src/Tray.sol#L245

[N‑03] Consider using delete rather than assigning zero to default values

There are 2 instances of this issue:

    nftContract = address(0);
  

https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-pfp-protocol/src/ProfilePicture.sol#L102

    nftID = 0;
  

https://github.com/code-423n4/2023-03-canto-identity/blob/main/canto-pfp-protocol/src/ProfilePicture.sol#L103

#0 - c4-judge

2023-04-11T06:00:03Z

0xleastwood marked the issue as grade-a

#1 - c4-judge

2023-04-12T00:38:05Z

0xleastwood 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