Cudos contest - jayjonah8's results

Decentralised cloud computing for Web3.

General Information

Platform: Code4rena

Start Date: 03/05/2022

Pot Size: $75,000 USDC

Total HM: 6

Participants: 55

Period: 7 days

Judge: Albert Chon

Total Solo HM: 2

Id: 116

League: COSMOS

Cudos

Findings Distribution

Researcher Performance

Rank: 23/55

Findings: 1

Award: $453.22

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

453.2192 USDC - $453.22

Labels

bug
QA (Quality Assurance)
sponsor acknowledged

External Links

Lines of code

https://github.com/code-423n4/2022-05-cudos/blob/main/solidity/contracts/CosmosToken.sol#L5

Vulnerability details

Impact

In CosmosToken.sol the amount of tokens minted is set to the max value of uint256. This is a number so large it may render the token worthless from a value standpoint. Adding functionality to mint() additional tokens when needed would be better than minting a max value.

Proof of Concept

https://github.com/code-423n4/2022-05-cudos/blob/main/solidity/contracts/CosmosToken.sol#L5

Tools Used

Manual

Consider setting the number of tokens to mint instead of using the max uint256 value. Looking at the number of tokens minted by other popular tokens can help with this. Also care should be taken so as not to overflow when minting since the version of solidity here is 0.6.6 which does not automatically guard against this.

#0 - maptuhec

2022-05-11T13:41:40Z

Since the token is not used anywhere, and the issue is not critical from vulnerability standpoint, we won't make any changes.

#1 - albertchon

2022-05-18T22:29:39Z

Yes this is a design choice

#2 - JeeberC4

2022-05-19T18:33:56Z

Creating warden QA Report as judge downgraded issue. Preserving original title: CosmosToken.sol mints a max uint256 value

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