XRPL AMM Auction Slot Bidding Mechanics and Refund Dynamics
In an empty or expired auction slot, the minimum bid is derived from the outstanding LP token count and the trading fee, with the result divided by 25. This baseline calculation ensures that new bidders meet a foundational threshold to claim the slot. The formula reflects a proportional relationship between token supply and fee rate, establishing a minimum entry point for any bid. This mechanism applies only when no active holder exists, and does not account for time-based adjustments or current holder bids. The calculation remains consistent regardless of the slot's state beyond expiration, maintaining a uniform starting point for new participants. This baseline is essential for fair access to discounted trading under fee structures that require minimum participation thresholds. [AMM-S01]
Minimum Bid Determination in Empty and Expired Slots
The minimum bid for an empty or expired auction slot is defined by the product of outstanding LP tokens and the trading fee, then divided by 25. This calculation establishes a baseline threshold for any new bidder seeking to claim the slot. The result is independent of time or current holder status, applying only when no active slot holder exists. This ensures that all participants face a uniform entry point for acquiring discounted trading access. The formula is directly tied to the pool's token supply and fee rate, reflecting a proportional relationship between liquidity and cost. It serves as the foundational value for bid evaluation in unoccupied or expired slots, without incorporating time-based or competitive adjustments. This baseline is critical for maintaining equitable access to discounted trading under fee structures that require minimum participation thresholds. [AMM-S01]
When the slot is empty or expired, the minimum bid is computed using the current outstanding LP token count and the trading fee, with the result divided by 25. This value represents the lowest acceptable bid to initiate a new slot. It does not include any adjustment for time remaining or current holder bids, as those factors only apply when the slot is occupied. The calculation remains consistent across all such states, ensuring that new bidders face a predictable and transparent entry point. This mechanism prevents arbitrary or unbounded entry, maintaining a stable and verifiable foundation for auction dynamics. The formula is applied directly to the pool's token balance and fee, forming a core element of bid evaluation in unoccupied slots. It is not modified by time or competitive conditions, preserving its role as a static baseline for participation. [AMM-S01]
Time-Dependent Pricing and Interval Structure
The 24-hour duration of an auction slot is segmented into twenty 72-minute intervals, with the current interval reported as an index from 0 to 19 in the amm_info response. This structure enables dynamic bid pricing based on the remaining time in the cycle. The current interval index directly influences the minimum bid required to outbid the current holder, with adjustments reflecting the time remaining. The interval system provides a granular timeline for bid evaluation, allowing for time-sensitive pricing. As the slot progresses, the effective bid requirement increases or decreases depending on how much time remains. This design ensures that early intervals carry higher bid thresholds, while later intervals reduce the competitive pressure. The interval structure supports a time-weighted pricing model that reflects the slot's lifecycle. [AMM-S01] [AMM-S04]
The auction slot is divided into twenty 72-minute intervals, with the current interval reported as an index from 0 to 19 in the amm_info response. This segmentation enables bid pricing that varies with time remaining in the 24-hour cycle. The current interval index determines how much weight is applied to the current holder's bid when calculating the minimum required to displace them. In early intervals, the minimum bid is higher due to greater time remaining, while in later intervals, the threshold decreases. This structure introduces a time-dependent adjustment to the bid requirement, reflecting the diminishing value of time. The interval system ensures that bid dynamics evolve over the slot's lifecycle, with pricing responding to proximity to expiration. The mechanism supports a progressive reduction in competitive pressure as the slot nears its end. [AMM-S01] [AMM-S04]
Slot Holder Designation and Fee Access Authorization
The auction slot holder can designate up to four additional accounts to receive discounted trading fees through the auth_accounts field in the auction slot object. This field lists accounts that are granted access to the discounted fee structure, enabling broader participation without altering the slot's ownership. The designation is explicit and stored within the auction slot object, ensuring transparency and verifiability. Each entry in the list represents a participant eligible for reduced trading costs. This mechanism allows the holder to extend benefits to trusted or cooperative accounts. The limit of four accounts ensures a manageable scope of access while preventing overextension of privileges. The field is part of the official auction slot object, making it accessible in ledger data for audit and verification purposes. [AMM-S04]
The auction slot object contains a field named auth_accounts, which lists up to four additional accounts authorized to receive discounted trading fees. These accounts are designated by the slot holder and are included in the auction slot object stored in the ledger. The field is directly accessible and reflects the holder's authorization decisions. This structure enables selective distribution of discounted access without requiring additional governance. The maximum of four accounts ensures a balanced and controllable scope of access. The field is part of the official auction slot object, allowing for real-time verification of fee eligibility. This design supports both operational flexibility and accountability in fee distribution. [AMM-S03] [AMM-S04]
Refund Mechanics Upon Outbidding
The partial refund to a previous slot holder is mathematically derived from the bid amount and the fraction of time remaining in the slot cycle. This relationship is defined by the formula R = B * (1 - t), where B represents the bid amount in LP tokens and t denotes the proportion of time remaining in the 24-hour cycle. The time fraction t is computed based on the current interval index relative to the full cycle of twenty intervals. As the slot progresses, the refund diminishes proportionally, reflecting the decreasing value of time-based discounts. This mechanism ensures that the longer a slot remains active, the greater the refund, up to the full bid amount. The refund is zero when the slot reaches its final interval, as no further time-based discount is applicable. This condition is explicitly defined in the protocol, ensuring consistency in the final phase of the auction cycle. [AMM-S02] [AMM-S04]
The refund mechanism is temporally bounded by the structure of the 24-hour cycle, which is partitioned into twenty 72-minute intervals. The current interval index, ranging from 0 to 19, serves as a reference point for calculating the time fraction t. As the slot advances through these intervals, the remaining time decreases linearly, and the refund amount decreases accordingly. In the final interval, the time fraction t reaches its maximum value, resulting in a zero refund. This design prevents any residual incentive for holding a slot beyond its end. The absence of a refund in the final interval aligns with the protocol's requirement that no further time-based discount is applied. This ensures that the auction slot terminates cleanly and that no partial value remains unaccounted for at closure. [AMM-S02] [AMM-S04]
Transaction Validation and Error Conditions in ammbid
The ammbid transaction can fail due to insufficient LP token balance or an invalid bid value that exceeds the defined BidMax limit. These conditions are explicitly recognized in the protocol error codes, where tecAMM_FAILED and tecAMM_INVALID_TOKENS indicate failure due to insufficient funds or an unmet bid requirement. The sender must possess sufficient LP tokens to cover both the bid amount and any associated transaction costs. If the bid exceeds the BidMax value specified in the transaction, the transaction is rejected. This restriction prevents overvaluation and maintains the integrity of the auction mechanism. The protocol enforces these limits to ensure that only valid and feasible bids are processed. [AMM-S02]
Failure conditions are triggered when the sender lacks the required LP tokens or when the bid amount surpasses the BidMax threshold. These validations are implemented at the transaction level and are reported through specific error codes. The presence of tecAMM_INVALID_TOKENS confirms a lack of sufficient LP tokens, while tecAMM_FAILED indicates either a funding shortfall or an invalid bid price. The protocol does not permit transactions that violate these constraints, ensuring that the auction remains fair and secure. These checks are essential for maintaining the economic stability of the AMM system and preventing malicious or oversized bids from disrupting the market. [AMM-S02]
Ledger Representation of the Auction Slot
The auction slot object in the ledger stores the current holder's account address and a list of designated accounts authorized to access discounted trading fees. The account field contains the address of the entity currently holding the slot, while the auth_accounts array lists additional accounts granted fee privileges. This structure enables the slot holder to delegate access without altering the core ownership. The fields are directly accessible via the amm_info response, providing real-time visibility into the slot's operational state. This representation supports transparency and accountability in fee distribution across the network. [AMM-S04] [AMM-S03]
The auction slot object is embedded within the amm object and is structured to reflect both ownership and access control. The account field identifies the current holder, and the auth_accounts field specifies which accounts are eligible for discounted trading fees. These fields are critical for enabling fee delegation and ensuring that only authorized participants benefit from reduced trading costs. The current interval index, reported as a number from 0 to 19, is part of the amm_info response and provides context for the slot's temporal state. This structure allows the network to maintain accurate, real-time tracking of slot status and access rights. [AMM-S04] [AMM-S03]
Temporal Dynamics of Bid Displacement and Refund Cancellation
The refund mechanism for outbidding an active slot is structured to diminish as the slot nears its end. According to the design, the refund amount is derived from the bid size and the fraction of time remaining. As the slot progresses through its 24-hour cycle, the time-based discount component diminishes. In the final interval, the time remaining reaches zero, and the formula for refund ceases to apply. This ensures no residual incentive remains for participants to hold or extend bids beyond the cycle's conclusion. The absence of a refund in the final interval prevents incentive loops that could distort market behavior or encourage prolonged slot occupancy. This temporal cancellation reflects a deliberate design to maintain fee stability and prevent manipulation of the auction mechanism. [AMM-S02] [AMM-S04]
The final interval acts as a termination point for all time-dependent adjustments in the bid refund structure. When the slot reaches its end, the time fraction t becomes zero, resulting in a refund amount of zero. This outcome is consistent with the rule that no further time-based discount is applied at the cycle's close. The design choice eliminates any residual financial benefit to the previous holder, ensuring that the auction concludes with a clean transition. Without a refund, the market signal remains unambiguous, reinforcing the idea that the slot is no longer active. This structural feature supports a predictable and fair trading environment, where participants are not rewarded for holding a slot past its end. [AMM-S04]
Integration of AMM Fee Logic with Slot Lifecycle Events
The trading fee policy directly influences the minimum bid required to win an auction slot, especially when the slot is empty or expired. The fee is applied to the outstanding LP token balance, and the result is divided by 25 to determine the base bid. This establishes a baseline that governs entry into the auction. When the slot is occupied, the minimum bid increases to account for the current holder's bid, adjusted by the time remaining. This integration ensures that fee distribution is proportional to the slot's duration and active use, aligning fee collection with the lifecycle of the slot. The structure maintains a balance between accessibility and incentive alignment across participants. [AMM-S01] [AMM-S04]
The slot's 24-hour duration is segmented into twenty 72-minute intervals, each indexed from zero to nineteen. This segmentation enables dynamic adjustments to the minimum bid based on time remaining. When the slot is occupied, the bid requirement includes up to 105% of the current holder's bid, scaled by the fraction of time left. This interaction ensures that fee distribution evolves over time, reflecting real-time market engagement. As the slot nears its end, the time-based multiplier diminishes, reducing the bid premium. This design ensures that fee collection remains consistent with the slot's operational phase, supporting both liquidity and fee stability over the slot's lifecycle. [AMM-S01] [AMM-S04]
Frequently asked questions
What is the formula for calculating the minimum bid when the auction slot is empty or expired?
The minimum bid is calculated as the product of the outstanding LP token balance and the trading fee, divided by 25. This formula establishes a baseline for entry into the auction when the slot is unoccupied or has expired. It ensures that the fee structure is applied uniformly across all participants, regardless of current holder status. The result provides a clear, deterministic threshold for initiating a bid, supporting transparency and consistency in the auction mechanism. [AMM-S01]
How does the time remaining in the auction slot affect the bid required to outbid the current holder?
The time remaining in the auction slot directly affects the bid required to outbid the current holder. When the slot is occupied, the minimum bid exceeds the empty-slot minimum and includes up to 105% of the current holder's bid, adjusted by the remaining time in the 24-hour cycle. Less time remaining increases the bid amount, as the discount factor diminishes. This ensures that bids reflect the time value of the slot. [AMM-S01]
Under what conditions does the previous slot holder receive a refund when outbid?
The previous slot holder receives a partial refund when outbid if there is remaining time in the slot cycle. The refund amount is calculated as R = B * (1 - t), where t is the fraction of time remaining. However, no refund is issued in the final time interval of the 24-hour cycle, as the time interval reaches its end and no further time-based discount is applied. This ensures a consistent refund structure across time intervals. [AMM-S02] [AMM-S04]
Official sources
- https://xrpl.org/docs/concepts/tokens/decentralized-exchange/automated-market-makers
- https://xrpl.org/docs/references/protocol/transactions/types/ammbid
- https://xrpl.org/docs/references/protocol/ledger-data/ledger-entry-types/amm
- https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/amm_info
