The CustomerEngine contract defines ITEM_PRICE = 2 * 10**16 (0.02 ETH) which customers must pay when triggering demand. However, the Cyfrin_Hub contract defines SALE_PRICE = 2 * 10**16 (0.02 ETH) as the revenue per item sold.
While these values currently match, they are defined independently in two separate contracts. If either value is changed during an upgrade or modification, it will cause an accounting mismatch where either:
The company receives more ETH than credited (if ITEM_PRICE > SALE_PRICE)
The company credits more than received (if SALE_PRICE > ITEM_PRICE, causing underflow)
Additionally, since finding C-1 shows that msg.value should be credited instead of calculated revenue, this inconsistency highlights a deeper architectural issue.
Likelihood:
This is currently not exploitable as both values match
Future contract modifications or upgrades could introduce mismatch
Contract maintainers may not realize these must stay synchronized
Impact:
If ITEM_PRICE > SALE_PRICE: Excess customer payments trapped in contract
If SALE_PRICE > ITEM_PRICE: Contract attempts to credit more than received, causing accounting errors
Breaks the economic model and trust in the system
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.