Frankencoin - deadrxsezzz'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: 62/199

Findings: 3

Award: $56.50

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L313

Vulnerability details

Impact

restructureCapTable will always only burn the tokens of the first address in addressesToWipe. Any function that relies on restructureCapTable will malfunction.

Proof of Concept

When going through the for-loop on #L312-#L315, the current variable always gets the value of addressesToWipe[0], basically only burning its tokens rather than the tokens of all of the addresses in the array.

Tools Used

Manual review

- address current = addressesToWipe[0];
+ address current = addressesToWipe[i];

#0 - c4-pre-sort

2023-04-20T14:24:42Z

0xA5DF marked the issue as duplicate of #941

#1 - c4-judge

2023-05-18T14:29:15Z

hansfriese marked the issue as satisfactory

Findings Information

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
duplicate-745

Awards

33.835 USDC - $33.83

External Links

Lines of code

https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Position.sol#L263-#L266 https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Position.sol#L380-#L383

Vulnerability details

Impact

Position owners may never be able to withdraw any collateral

Proof of Concept

https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Position.sol#L380-#L383 Consider the following scenario: Alice mints 1000 ZCHF against a collateral worth 1500 ZCHF and sets minCollateral to 1200 ZCHF A malicious user might constantly create challenges with challenge collateral == 1300 ZCHF and instantly bid 1300 ZCHF on them. This way he assures that he will never lose any tokens on the challenge and he could make such challenges for an indefinite amount of time. Since the position owner cannot withdraw any collateral while there are ongoing challenges, his collateral becomes permanently stuck.

Tools Used

Manual review

Add regular timeframes at which position owners cannot be challenged/ can withdraw collateral even if challenged.

#0 - c4-pre-sort

2023-04-28T10:53:47Z

0xA5DF marked the issue as duplicate of #745

#1 - c4-judge

2023-05-18T13:47:47Z

hansfriese changed the severity to 2 (Med Risk)

#2 - c4-judge

2023-05-18T13:53:59Z

hansfriese 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