🔴Application and Integration of AMM in Auctions

Upction integrates the Automated Market Maker (AMM) model within its auction framework to dynamically adjust token pricing, ensuring a fair and demand-driven market environment. By leveraging AMM’s liquidity curve combined with auction demand, the platform establishes a final auction price without manual intervention, creating a price purely driven by market forces.

  • Dynamic Price Adjustment with AMM: The AMM model operates based on the constant product formula k=x×y, where x represents ETH in the pool and y represents UPT. As participants place bids to purchase UPT, the ratio of ETH to UPT in the pool shifts, causing the price to adjust along the AMM curve. As demand increases, the AMM mechanism automatically raises the price, ensuring that each participant is effectively bidding at market-driven rates. This dynamic adjustment keeps the auction price aligned with current demand, smoothing out large price swings throughout the auction process.

  • Auction-Specific AMM Price Multiplier: To optimize auction outcomes and improve the ratio of successful bids, Upction enhances the standard AMM formula with an auction-specific price multiplier. This multiplier is dynamically adjusted based on the number of participants and bidding demand, aiming to balance the price at a level that maximizes successful participation. At the end of the auction, all bids at or above the final determined price are filled at the same price. This optimized AMM model combines fairness with efficiency, maintaining market-driven pricing while boosting users’ chances of winning their bids.

  • Automated, Manipulation-Resistant Pricing: The decentralized and automated nature of the AMM model eliminates the potential for price manipulation, as prices are set solely by the AMM and market demand. Project teams and the platform have no means to interfere with pricing, resulting in a fully transparent auction environment. This structure ensures that all participants bid under the same market-driven conditions, maintaining fairness and trustworthiness throughout the auction process.

Implementation

# Process each participant individually
for i, participant in enumerate(participants, start=1):
   bid = participant["bid"]
   units = participant["units"]
   upt_needed = units * upt_per_unit


   # Calculate the ETH required for the purchase
   new_upt_pool = current_upt_pool - upt_needed
   if new_upt_pool <= 0:
       results.append({
           "participant": i,
           "bid": bid,
           "units_requested": units,
           "successful_units": 0,
           "cost": 0.0,
           "refund": bid
       })
       continue


  # Calculate the ETH required for the purchase
   new_eth_pool = k / new_upt_pool
   eth_needed_base = new_eth_pool - current_eth_pool


   # Determine if the bid is successful
  if eth_needed <= bid:
       # Successful purchase
       results.append({
           "participant": i,
           "bid": bid,
           "units_requested": units,
           "successful_units": units,
           "cost": round(eth_needed, 4),
           "refund": round(bid - eth_needed, 4)
       })
       successful_bids += 1


      # Update pool status
       current_eth_pool += eth_needed_base  # Update base ETH pool (not multiplied by price_multiplier) 
       current_upt_pool = new_upt_pool
   else:
       # Bidding failed
       results.append({
           "participant": i,
           "bid": bid,
           "units_requested": units,
           "successful_units": 0,
           "cost": 0.0,
           "refund": bid
       })

Last updated