DEV Community

Md Mijanur Molla
Md Mijanur Molla

Posted on

# I Created a Coupon System Challenge… And AI Allowed Unlimited Discounts 💸

Coupons look simple.

Apply code → get discount → done.

That’s what most systems do.

But what if I told you…

👉 A small logic mistake can let users get unlimited discounts?

So I created a challenge on VibeCode Arena to test this.

And the results were surprising.


🚨 The Problem

Here’s the basic idea:

  • User applies a coupon
  • Discount is calculated
  • Final price is updated

Simple, right?

But the real problem is hidden.


⚠️ What Can Go Wrong?

In real-world systems:

• Users can apply the same coupon multiple times

• Discounts can stack incorrectly

• No validation for expiry or usage limits

• System doesn’t check user eligibility

And suddenly:

👉 Total becomes incorrect

👉 Business loses money

👉 System becomes exploitable

This is a real production issue.

🧠 What I Observed

When AI models tried this challenge:

  • Some handled basic discount logic
  • Some ignored duplicate coupon usage
  • Some didn’t validate conditions
  • Very few handled real-world constraints properly

The code works.

But the system is not safe.

🔥 Try My Challenge

I created this challenge to test real-world product and backend thinking.

👉 Try it here:
https://vibecodearena.ai/duel/54ea165c-eb09-438b-941e-7315e8e224ac

Can you:

  • Prevent coupon abuse?
  • Handle multiple discounts correctly?
  • Design a secure pricing system?

💡 What Makes This Interesting

This is not just a coding problem.

It’s about:

• Business logic

• Data validation

• System reliability

• Preventing misuse

And that’s where most AI solutions struggle.

🎯 Final Thought

Coupons don’t fail because of math.

They fail because of logic and validation.

And one small mistake…

👉 Can cost a business real money.


Try it and tell me 👇

Did AI handle it correctly… or did it miss something important?

Top comments (0)