Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: medium
Invalid

Lack of Price Conversion Mechanism for Token Payments

Summary

  • The protocol accepts payments in WETH, USDC, and WBTC. However, it lacks a mechanism to calculate or standardize the value of these tokens based on their real-time market prices. Instead, it directly transfers the number of tokens provided without considering their actual value. This can result in inconsistent or unfair pricing, as the fluctuating values of these tokens are not accounted for during transactions.

Impact

  • Without a proper price conversion mechanism, such as Chainlink V3 price feeds, the protocol risks overcharging or undercharging users depending on token value fluctuations. For example, if a person deposits 1 WBTC, its approximate value is $95,000, while USDC has a fixed value of $1, and Ethereum is valued at around $3,300. If the event participation fee is determined solely by the number of tokens deposited, users paying with USDC will contribute significantly less value compared to those paying with WBTC or Ethereum. This creates an imbalance, leading to unfair financial contributions and potential user dissatisfaction. Implementing a price conversion mechanism would ensure that all participants contribute fairly, based on the real-time value of their payment tokens.

Tools Used

  • Foundry

Recommendations

  • Implement Chainlink Price Feeds (Chainlink V3 Aggregator) to standardize and accurately calculate the value of tokens. By integrating this solution, the protocol can convert the deposited token amounts to their equivalent value in a base currency (e.g., USD) in real-time. This will ensure fair and consistent pricing across WETH, USDC, WBTC, and any other supported tokens, mitigating the risk of imbalances or unfair contributions.

Updates

Lead Judging Commences

0xtimefliez Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.