logo
In Basta, every bid is either a MaxBid or a NormalBid. These types define how the auction engine responds when bids are placed โ€” either reactively (MaxBid) or directly (NormalBid).

๐Ÿ“ˆ MaxBid

A MaxBid allows a user to define the maximum amount they're willing to pay. The auction engine will automatically place incremental bids on their behalf until:
  • They win the item
  • They are outbid by a higher max bid
  • Or their maximum amount is reached

โš™๏ธ MaxBid Highlights

  • The winning amount may be lower than the max amount
  • If outbid, the engine reacts automatically (unless max is reached)

๐Ÿ“˜ Example: MaxBid Behavior

Bid Increment Table

LowRange
HighRange
Step
0
200000
1000
  • startingBid: 1000

Bid Flow

  1. User-1 places MaxBid of 5000
  1. User-2 places MaxBid of 3000
  1. System places a reactive bid for User-1 at 4000

Resulting State

UserID
MaxBid Amount
Winning Amount
Active MaxBid
Bid Accepted
User-1
5000
1000
5000
โœ…
User-2
3000
3000
3000
โœ…
User-1
โ€”
4000
5000
โœ… (reactive)
๐Ÿ’ฌ
Explanation
Although User-2 places a valid MaxBid of 3000 they are never the leading bidder.
As soon as their bid is placed, the system automatically places a reactive bid for User-1
at 4000. This means User-2 is immediately outbid, and their MaxBid is recorded as losing.

๐Ÿงพ NormalBid

A NormalBid is a one-time bid at a specified amount. It must align with the bid increment table and does not react to counter-bids.

๐Ÿ“˜ Example: NormalBid Behavior

UserID
NormalBid Amount
Winning Amount
Active MaxBid
Bid Accepted
User-1
5000
5000
0
โœ…
User-2
3000
โ€”
0
โŒ (too low)
User-2
8000
8000
0
โœ…

โš ๏ธ Edge Cases to Know

๐ŸŸฐ Equal MaxBids

  • If two users place identical MaxBids, the first bidder wins
  • The second bid is accepted but marked as losing

๐Ÿ”„ MaxBid overtakes NormalBid

  • If a NormalBid leads and a MaxBid is placed after, the engine will outbid it reactively, assuming the MaxBid is higher

๐Ÿšซ MaxBid below Reserve

  • Even if a user is winning, they must meet the item's Reserve or no winner is declared

Powered by Notaku