Quipuswap
  • introduction
    • What is QuipuSwap?
    • Participants
    • QuipuSwap subprojects
      • QuipuSwap Farms
      • Quipuswap Stable DEX
      • Token to Token Swaps
      • Governance (text-only)
  • Get Started
    • Install Wallet
    • How to get TEZ
    • How to find my tokens
    • Connect wallet
    • FAQ
  • Dex Guides
    • Overview
    • Types of the exchange (Token/TEZ, Token/Token)
    • How to use the DEX
      • Trade
      • How to add liquidity to an existing liquidity pool
      • How to create a new liquidity pool
      • How to remove liquidity
      • How to vote for a baker
      • How to ban/veto a baker
  • Tezos Tokens
    • What is a Token?
    • What is the difference between FA1.2 and FA2 standards?
    • QUIPU Tokenomics
  • Smart Contracts
    • Dex token edition
      • Overview
      • Dex
      • Exceptions
    • QuipuSwap stable swap DEX
      • 🛠️Developer module
        • 📄Storage & action types
        • 🔵Developer setter entrypoints
          • set_dev_address
          • set_dev_fee
      • 🏠Standalone DEX
        • 📄Storage and types overview
        • 🟡Initialization
          • set_admin_function
          • set_dev_function
          • set_dex_function
          • set_token_function
        • 🟠Add new dex
          • add_pool
        • 🔵DEX methods
          • invest
          • swap
          • 📤Divesting
            • divest
            • divest_imbalanced
            • divest_one_coin
          • 🤑DEX rewards
            • claim_referral
            • stake
        • 🛠️Developer methods
          • claim_developer
          • Dev module entrypoints
        • 🛑Admin methods
          • add_rem_managers
          • ramp_A
          • set_admin
          • set_fees
          • stop_ramp_A
      • 🏭Factory
        • 📄Storage and types overview
        • 🟡Initial setup
          • set_init_function
          • set_dev_function
          • DEX compiled codebase setup
            • set_admin_function
            • set_dex_function
            • set_token_function
        • 🟠Initialize new DEX flow
          • add_pool
          • start_dex
        • 💱Deployed from factory DEX
          • 📄Storage and types overview
          • 🟡Initialization
            • copy_dex_function
            • freeze
          • 🔵DEX methods
          • 🛠️Claim developer rewards
          • 🛑Admin methods
        • 🛑Developer methods
          • claim_rewards
          • 🧑‍💻Factory management
            • 🟢Factory params
              • set_burn_rate
              • set_price
              • set_whitelist
            • 🔵Dev module entrypoints
    • Dex 2.0
      • ⁉️Errors overview
      • 🥐BakerRegistry contract
        • Storage and types overview
        • Entrypoints overview
          • validate
          • register
      • ⚙️FlashSwapsProxy contract
        • Storage and types overview
        • Entrypoints overview
          • default
      • 🧺Bucket contract
        • Storage and types overview
        • Entrypoints overview
          • fill
          • pour_out
          • pour_over
          • withdraw_rewards
          • ban_baker
          • vote
          • default
        • On-chain views overview
          • is_banned_baker
          • get_tez_balance
          • get_user_candidate
      • ⚖️Auction contract
        • Storage and types overview
        • Entrypoints overview
          • Auction entrypoints
            • receive_fee
            • launch_auction
            • place_bid
            • claim
          • Admin entrypoints
            • set_admin
            • confirm_admin
            • set_baker
            • set_fees
            • set_auction_duration
            • set_min_bid
            • update_whitelist
            • withdraw_dev_fee
            • withdraw_public_fee
            • burn_bid_fee
      • 🏦DexCore contract
        • Storage and types overview
        • Entrypoints overview
          • DEX entrypoints
            • launch_exchange
            • invest_liquidity
            • divest_liquidity
            • swap
            • withdraw_profit
            • claim_interface_fee
            • claim_interface_tez_fee
            • withdraw_auction_fee
            • vote
          • Admin entrypoints
            • set_admin
            • confirm_admin
            • set_flash_swaps_proxy
            • set_auction
            • add_managers
            • set_fees
            • set_collecting_period
            • update_token_metadata
            • ban
          • Permits' entrypoints
            • permit
            • set_expiry
          • FA2 entrypoints
            • transfer
            • update_operators
            • balance_of
          • Callbacks
            • launch_callback
            • flash_swap_callback
            • close
        • On-chain views overview
          • check_is_banned_baker
          • get_reserves
          • get_total_supply
          • get_swap_min_res
          • get_toks_per_share
          • get_cumulative_prices
          • get_collecting_period
    • Trusted contracts
    • Farming
      • Referral system overview
      • Fees overview
      • Rewards precision overview
      • BakerRegistry contract
        • Storage and types overview
        • Entrypoints overview
          • validate
          • register
      • Burner contract
        • Storage and types overview
        • Entrypoints overview
          • default
          • burn_callback
      • ProxyMinter contract
        • Storage and types overview
        • Entrypoints overview
          • Admin entrypoints
            • add_minter
            • withdraw_tokens
            • set_admin
            • confirm_admin
          • Minter entrypoint
            • mint_tokens
      • QFarm contract
        • Storage and types overview
        • Entrypoints overview
          • Farming entrypoints
            • deposit
            • withdraw
            • harvest
          • FA2 entrypoints
            • transfer
            • update_operators
            • balance_of
          • Admin entrypoints
            • set_admin
            • confirm_admin
            • set_fees
            • set_reward_per_second
            • set_burner
            • set_proxy_minter
            • set_baker_registry
            • set_is_v1_lp
            • ban_bakers
            • add_new_farm
            • pause_farms
            • burn_tez_rewards
            • withdraw_farm_depo
            • update_token_metadata
          • Other entrypoints
            • burn_farm_rewards
            • default
      • TFarm contract
        • Storage and types overview
        • Entrypoints overview
          • Farming entrypoints
            • deposit
            • withdraw
            • harvest
          • FA2 entrypoints
            • transfer
            • update_operators
            • balance_of
          • Admin entrypoints
            • set_admin
            • confirm_admin
            • set_fees
            • set_reward_per_second
            • set_burner
            • set_baker_registry
            • set_is_v1_lp
            • ban_bakers
            • add_new_farm
            • pause_farms
            • burn_tez_rewards
            • claim_farm_rewards
            • withdraw_farm_depo
            • update_token_metadata
          • Other entrypoints
            • default
  • Brand and Logos
Powered by GitBook
On this page
  • token_t
  • status_auction_t
  • auction_t
  • fees_t
  • storage_t - main contract storage
  • full_storage_t - storage root
  1. Smart Contracts
  2. Dex 2.0
  3. Auction contract

Storage and types overview

token_t

type tez_t              is unit

type fa12_token_t       is address

type fa2_token_t        is [@layout:comb] record [
  token                   : address;
  id                      : nat;
]

type token_t            is
| Tez                     of tez_t
| Fa12                    of fa12_token_t
| Fa2                     of fa2_token_t

status_auction_t

type status_auction_t   is
| Active                  of unit
| Finished                of unit

auction_t

Field
Type
Description

status

Status of auction

token

FA1.2/FA2/TEZ token

end_time

timestamp

Time when auction will be finished

current_bidder

address

Address of a user who made current bid

current_bid

nat

Current bid

amt

nat

Amount of tokens that that were put up for auction

type auction_t          is [@layout:comb] record [
  status                  : status_auction_t;
  token                   : token_t;
  end_time                : timestamp;
  current_bidder          : address;
  current_bid             : nat;
  amt                     : nat;
]

fees_t

Field
Type
Hint
Description

dev_fee_f

nat

Float value multiplied by 1e+18

bid_fee_f

nat

Float value multiplied by 1e+18

type fees_t             is [@layout:comb] record [
  dev_fee_f               : nat;
  bid_fee_f               : nat;
]

storage_t - main contract storage

Field
Type
Hint
Description

auctions

Mapping of auction IDs' to auctions

dev_fee_balances_f

Float value multiplied by 1e+18

public_fee_balances_f

Float value multiplied by 1e+18

Mapping of tokens to their balances for which auction can be launched (except of whitelisted tokens)

whitelist

quipu_token

fees

Fees that applies to each received token

baker

option(key_hash)

admin

address

Administrator of the contract

pending_admin

option(address)

Pending administrator that should accept his new administrator role (if he is not None)

dex_core

address

bid_fee_balance_f

nat

Float value multiplied by 1e+18

auctions_count

nat

Number of auctions created by all users

auction_duration

nat

min_bid

nat

type storage_t          is [@layout:comb] record [
  auctions                : big_map(nat, auction_t);
  dev_fee_balances_f      : big_map(token_t, nat);
  public_fee_balances_f   : big_map(token_t, nat);
  whitelist               : set(token_t);
  quipu_token             : fa2_token_t;
  fees                    : fees_t;
  baker                   : option(key_hash);
  admin                   : address;
  pending_admin           : option(address);
  dex_core                : address;
  bid_fee_balance_f       : nat;
  auctions_count          : nat;
  auction_duration        : int;
  min_bid                 : nat;
]

full_storage_t - storage root

Field
Type
Description

storage

Actual storage of the contract

auction_lambdas

big_map(nat, bytes)

Contract's lambda-methods

metadata

big_map(string, bytes)

type full_storage_t     is [@layout:comb] record [
  storage                 : storage_t;
  auction_lambdas         : big_map(nat, bytes);
  metadata                : big_map(string, bytes);
]
PreviousAuction contractNextEntrypoints overview

Last updated 3 years ago

Fee that goes to the devs fund and can be by an administrator

Fee in that applies on each bid for all auctions

big_map(nat, )

big_map(, nat)

Mapping of tokens to their balances that can be by an administrator

big_map(, nat)

set()

A set of tokens for which an auction can't be started. Can be by an administrator

address and ID

Baker for whom all TEZ tokens on the contract were delegated. Can be by an administrator

contract address

Bid fee balance in that were withdrawn from each bid. Can be by an administrator

Duration of each auction that will be created. Can be by an administrator

Minimum possible bid in time of auction launch. Can be by an administrator

Contract's metadata according to

⚖️
withdrawn
QuipuSwap Governance token
withdrawn
updated
QuipuSwap Governance token
changed
DexCore
QuipuSwap Governance token
burned
changed
changed
TZIP-016
status_auction_t
token_t
auction_t
token_t
token_t
token_t
fa2_token_t
fees_t
storage_t