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
- Bids follow the Bid Increment Table
- 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
- User-1 places MaxBid of
5000
- User-2 places MaxBid of
3000
- 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