LogoLogo
  • Discover
    • 🌜About Moonwell
    • 👥Contributors
    • 🌐Networks
    • 🔗Quick Links
  • Moonwell Overview
    • 🌙Getting Started
      • Wallet Connection
    • 🤝Lend
      • Supply
      • Withdraw
      • Claiming Rewards
      • Lend FAQ
    • 🤝Borrow
      • How to Borrow
      • Loan Repayment
      • Credit and Liquidations
      • Borrow FAQ
    • 🏦Vaults
      • Interacting with Morpho Vaults
      • Fund Wallet and Deposit
    • 🌐Virtual Accounts
      • Create Virtual Account
      • Accessing Virtual Account
      • FAQ
    • 🦋Isolated Markets
      • Interacting with Isolated Markets
    • 💲USDC Anywhere
      • Supply USDC
      • Borrow USDC
    • 💳Moonwell Card
      • Get Started
      • Load and Spend
      • Auto Load
      • FAQ
    • 💡Smart Wallet
      • Create
      • Connect
      • Getting Started
    • 🌙Tokens
      • WELL Transparency Report
      • WELL Transfer
      • WELL Migration (Base)
      • MFAM Transparency Report
    • 🫂Stake
      • How to Stake
      • How to Unstake
      • Claim Staking Rewards
  • Governance
    • 🗳️Moonwell Governance
      • 🪙Delegate
      • 📜Proposals
      • 🗳️Voting
      • 🔢Parameters
      • ❔FAQ
      • 📜DAO Constitutions
        • Moonwell DAO Constitution
        • Moonwell Apollo DAO Constitution
      • 🗣️Forum
    • 🏛️Moonwell Foundation
      • 🏦Treasury
      • 🔒Security Council
      • 📃Governing Documents
        • Foundation Bylaws
        • Foundation M&A
  • Protocol Information
    • ‼️Protocol Information
    • 📊Asset Risk Parameters
    • 📈Interest Rate Curves
    • ⚖️Reserve Auctions
    • 🛡️Security
    • 🔎Audits
    • 📜Contracts
    • 🖊️Terms of Service
  • Developers
    • 🪙mTokens
      • 📝Contract Interactions
    • 👮‍♀️Comptroller
      • 📝Contract Interactions
      • 🚦Risk Parameters
      • 🛡️Guardian Roles
    • 🏦4626 Vaults
      • 👷‍♂️ERC20 Vault Deployment
        • 🗒️4626 ERC20 Vault Interface
      • 👷‍♀️ETH Vault Deployment
        • 🗒️4626 ETH Vault Interface
        • 📍4626 ETH Router
    • 💻Moonwell SDK
    • 🔨Contribution Guidelines
Powered by GitBook
On this page
  • Overview
  • Auction Structure
  • Structure
  • Dynamic Pricing System
  • Participation Guide
  • 1. Monitoring Auction Opportunities
  • 2. Preparing to Bid
  • 3. Placing a Bid
  • 4. Best Practices
  • Technical Details
  • Price Calculation Workflow
  • Contract Addresses
  • Base
  • OP Mainnet
  • Frequently Asked Questions
  1. Protocol Information

Reserve Auctions

Overview

Moonwell Reserve Auctions is an automated onchain system that facilitates the exchange of reserve tokens for WELL tokens. The system offers a unique opportunity for searchers to bid and sell WELL tokens at a discounted rate.

Auction Structure

Structure

  • Total Duration: Each auction cycle lasts 2 weeks

  • Mini-Auction Periods: Divided into 56 separate 6-hour mini-auctions

  • Market Separation: Each market has its own dedicated auction contract

Dynamic Pricing System

  • Starting Price: Each 6-hour mini-auction begins with a premium above market price

  • Price Decay: The premium declines linearly throughout the period

  • Ending Price: By the end of each mini-auction, price reaches maximum discount

  • Key Parameters:

    • startingPremium: Initial premium rate (>100%, represented as >1e18)

    • maxDiscount: Maximum discount reached (<100%, represented as <1e18)

Participation Guide

1. Monitoring Auction Opportunities

How to check for active auctions:

  • Query the saleStartTime and saleWindow in the ReserveAutomation contract

  • Use getCurrentPeriodStartTime() to identify the current mini-auction period

  • Check available reserves with getCurrentPeriodRemainingReserves()

Best time to participate:

  • Early in the period: Higher reserve availability but lower discount

  • Later in the period: Better discount but risk of depleted reserves

2. Preparing to Bid

Before bidding, calculate the expected output:

  • Use getAmountOut(uint256 amountWellIn)to calculate how many reserve tokens you'll receive for a given WELL amount

  • Prices are determined using Chainlink price feeds for both WELL and the reserve asset

3. Placing a Bid

  • Ensure you have sufficient WELL tokens in your wallet

  • Approve the ReserveAutomation contract to spend your WELL tokens

  • Call getReserves(uint256, uint256)with your desired WELL amount and the expected reserve amount

  • Reserve tokens are transferred immediately after the transaction succeeds

4. Best Practices

  • Monitor Chainlink price feeds to identify optimal bidding opportunities

  • Check remaining reserves in the current period before bidding

  • Be aware of the current discount rate based on time elapsed

  • Ensure you have sufficient WELL tokens before bidding

Technical Details

Price Calculation Workflow

  1. Oracle Price Retrieval:

    • System fetches normalized prices (18 decimals) from Chainlink oracles for both WELL and reserve assets

  2. Calculate Current Discount Rate:

decayDelta = startingPremium - maxDiscount
periodDuration = periodEnd - periodStart
timeRemaining = periodEnd - block.timestampe
currentDiscount = maxDiscount + (decayDelta * timeRemaining) / periodDuration
  1. Calculate Final Amount:

// Convert WELL to USD value
wellAmountUSD = amountWellIn * normalizedWellPrice

// Apply discount to reserve asset price
discountedReservePrice = normalizedReservePrice * currentDiscount / 1e18

// Calculate output amount
amountOut = wellAmountUSD / discountedReservePrice

Contract Addresses

Base

Market
Address
Explorer

USDC

0x8373155335839e3D078f3F224E8B6618Fc26eF17

USDBC

0x89b89c30E2f60Bd30059c3924eF5b8c0Fcd1B64A

DAI

0x9f2ca3c6Cd1dddb7aD473a0a893C3104E2af15Ad

WETH

0x064D8Cb3B7a22F4cFBdd602eBC7E722Bb71405D8

cbETH

0x48bc4876D33Db30929c373c3B949b66CB8d641F3

wstETH

0xbd22DaFeF550094A32f388CD256FE133a0A14387

rETH

0xEfE30785362225106367039971d82715dcB35192

AERO

0xc7840e86A0aa22c23BCbC153CE61f6009733bf2C

weETH

0x75494780E76bB41c0fDf29DBA4b2Ce82501c12b0

cbBTC

0x83D37e3df05F1507667AF4dfc83Ec8A38Cf2dA08

EURC

0x7bBe5972e01BAc64fE3AD7EFfBa6D164f0a1F15f

wrsETH

0xe34D7D109B97e1b1DAc9A9920e6A6769814Ac7eE

USDS

0xA078017f827DC7B8540C98A3bF7b2153B2aF6cB3

TBTC

0x84C74431200Bcd3Ba4b557024734891857b43354

LBTC

0xf8f7b937a4CC6Cc16b600B3611ce0c1152a5b3F9

OP Mainnet

Market
Address
Explorer

USDC

0x475d7c6999dc27E640d260aBf9f2fA9333E472CF

USDT

0x9E58891D8DF4e6Dd8bAfD3082A59B72C51202841

DAI

0xE6Aea947c0F082c5Dc751BB9C7f44Ce059590962

WETH

0x080D64570a58FF87E14CC5Cb91d1aaB26b15CFDc

cbETH

0x8455D94e412A498Df8727D904252892Fb111a4cD

wstETH

0x01c369a6238226702E48C9C3fBB1de33F4b05D74

rETH

0x9E530e9F3f9b1046e223cc3eB97fA0bBab5Dd993

OP

0x6427D36153dE11b694d70604B0715790769024f7

VELO

0x589F59fBDB5952920fA557c924F6f5CFf184b155

weETH

0x3B40085872eaEA59CF39FCafFb3dc36085aE48f6

wrsETH

0xFfF466528fE1a18b95Fa910C96540A70EC2727FB

WBTC

0x78a9C06188195CEE3cBf67303a1708cb8765b9ec

Frequently Asked Questions

What is the benefit of participating in reserve auctions?

Participants can acquire reserve tokens at potentially discounted rates compared to market prices, with discounts improving as each mini-auction progresses.

How is the price determined in an auction?

Prices are derived from Chainlink oracle feeds for both WELL and reserve tokens, with a dynamic discount that increases linearly throughout each 6-hour mini-auction period.

Can I participate in multiple auctions simultaneously?

Yes, each market has its own auction contract, allowing you to participate in multiple auctions across different reserve assets.

What happens if the reserves run out during an auction period?

You'll need to wait for the next mini-auction period when new reserves become available.

Is there a minimum or maximum bid amount?

There is no enforced minimum or maximum, but transaction costs should be considered for smaller bids, and larger bids may be limited by available reserves.

PreviousInterest Rate CurvesNextSecurity

Last updated 2 months ago

⚖️
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View
View