Frankencoin - 0xTheC0der's results

A decentralized and fully collateralized stablecoin.

General Information

Platform: Code4rena

Start Date: 12/04/2023

Pot Size: $60,500 USDC

Total HM: 21

Participants: 199

Period: 7 days

Judge: hansfriese

Total Solo HM: 5

Id: 231

League: ETH

Frankencoin

Findings Distribution

Researcher Performance

Rank: 136/199

Findings: 1

Award: $22.60

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Low 1: Suggested minter can be denied while already being an accepted minter

A suggested minter can be denied as long as block.timestamp <= minters[_minter] accordring to the denyMinter() method of the Frankencoin contract.
However, a suggested minter can already act as an accepted minter as soon as block.timestamp >= minters[_minter] according to the isMinter() method of the Frankencoin contract.
Therefore, we have an overlap at block.timestamp == minters[_minter]. Although it's unlikely that this edge case ever occurs, it's still something that needs to be fixed.

Low 2: No way to handle compromised collateral after cooldown

Following scenario: There is an open position with a perfectly valid but heavily centralized collateral token and the cooldown period has already expired, i.e. the owner of the position can mint ZCHF and cannot be denied anymore. However, the collateral token is secretly compromised by an attacker who also happens to be the owner of the position.
The attacker having full control over the collateral token might stop transfers which makes it impossible to challenge the position due to the transferFrom() call in the launchChallenge() method of the MintingHub contract.
Moreover, the attacker might mint additional collateral to the position.
Consequently, there is nothing that can stop the attacker (owner of the position) from minting ZCHF until the limit (specified at construction of position) is reached or the position expires naturally (see alive modifier of mint() method).

In conclusion, the impact is absolutely critical and leads to severe loss of funds, but the attack path is highly hypothetical, therefore I decided to submit this as low severity. Anyways, it's technically possible to exploit this attack vector and I suggest to discuss how to handle broken / compromised collateral tokens after the cooldown period.

#0 - 0xA5DF

2023-04-27T09:05:48Z

#2 is dupe of #589

#1 - c4-pre-sort

2023-04-27T09:06:27Z

0xA5DF marked the issue as high quality report

#2 - luziusmeisser

2023-04-30T15:20:14Z

The first one is also a duplicate from another report.

#3 - luziusmeisser

2023-04-30T15:25:26Z

The second one is invalid, see my comment there. I still choose "confirm" as the first one is valid (although of very low severity) and being addressed.

#4 - c4-sponsor

2023-04-30T15:25:33Z

luziusmeisser marked the issue as sponsor confirmed

#5 - c4-judge

2023-05-18T05:54:14Z

hansfriese 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