Canto Application Specific Dollars and Bonding Curves for 1155s - Pheonix's results

Tokenizable bonding curves using a Stablecoin-as-a-Service token

General Information

Platform: Code4rena

Start Date: 13/11/2023

Pot Size: $24,500 USDC

Total HM: 3

Participants: 120

Period: 4 days

Judge: 0xTheC0der

Id: 306

League: ETH

Canto

Findings Distribution

Researcher Performance

Rank: 68/120

Findings: 2

Award: $5.45

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-11-canto/blob/335930cd53cf9a137504a57f1215be52c6d67cb3/1155tech-contracts/src/Market.sol#L150-L169

Vulnerability details

Impact

A malicious user can FrontRun the transaction to inflate the price of shares.

Proof of Concept

Consider this Scenario -

  1. Alice buys a share for a price X.
  2. Bob Observes that transaction and FrontRuns Alice with a higher price.
  3. Alice got a higher price of share.
  4. If Alice buys regardless, then Bob will sell and profits. If not, then Bob was able to control Alice for not buy at the end.

Tools Used

Manual Review

Introducing a maxPrice parameter (like Uniswap) would help. Letting the user specify a maximum price (that they are willing to pay) and then checking if the actual price is higher.

Assessed type

Other

#0 - c4-pre-sort

2023-11-18T16:51:33Z

minhquanym marked the issue as duplicate of #12

#1 - c4-judge

2023-11-28T23:38:41Z

MarioPoneder marked the issue as satisfactory

Awards

4.0797 USDC - $4.08

Labels

bug
downgraded by judge
grade-b
insufficient quality report
QA (Quality Assurance)
Q-20

External Links

Lines of code

https://github.com/code-423n4/2023-11-canto/blob/335930cd53cf9a137504a57f1215be52c6d67cb3/1155tech-contracts/src/Market.sol#L150-L169

Vulnerability details

Impact

There is no limit to how much shares a user can buy.

Proof of Concept

Consider a Scenario where a new share of art ( a rare one ) is opened by some creator.

  1. The first buyer can corner the competition by buying too many shares from the start
  2. He/she can also dictate the price of shares. This can lead inflation of the shares.

Considering the fact the with each subsequent share, the price will increase with respect to bonding curve and the buyer has to give a huge sums of fees. But in a case where buying shares which are rare(let's say an exclusive art/video etc.) can can get a price increase in future it is possible that this buyer can later dump the shares and get a huge profit. Also, it is not a state of healthy competition for shares

Tools Used

Manual Review

It is recommended that the creator or the platform should be able to specify how much shares can be bought.

Assessed type

Other

#0 - c4-pre-sort

2023-11-20T08:00:21Z

minhquanym marked the issue as insufficient quality report

#1 - minhquanym

2023-11-20T08:00:36Z

QA

#2 - c4-judge

2023-11-29T16:12:34Z

MarioPoneder changed the severity to QA (Quality Assurance)

#3 - c4-judge

2023-11-29T22:32:17Z

MarioPoneder 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