Equiteez
  • Introduction
    • What is Equiteez?
    • Our Mission and Vision
  • Platform
    • What are RWAs?
      • Understanding Tokenization
    • Secondary Markets
      • Equiteez’s Proactive Market Maker (PMM) and Liquidity Pools
      • Technical Overview of the PMM
      • RWA Orderbook DEX
      • Technical Overview of the RWA Orderbook DEX
      • Equiteez OTC Markets
    • How to Buy on Equiteez
      • Step-By-Step Guide
      • Payment Methods
    • How to Sell on Equiteez
      • Selling Options
      • Liquidity Considerations
    • Earning Returns
      • Dividend Distributions
      • Asset Appreciation
    • Revenue Share Tokens
    • RWA Loans
      • Maven Finance Integration
      • Borrowing Against your Assets
    • (Self) Custody
      • Self-Custody Model
      • Importance of Wallet Security
  • FAQs
    • Frequently Asked Questions
Powered by GitBook
On this page
  1. Platform
  2. Secondary Markets

Technical Overview of the PMM

Technical Overview of Entry Points and Contract Functions

A) SuperAdmin Entry Points

%setSuperAdmin

Parameters: newSuperAdminAddress : address

Entrypoint that can only be called by the superAdmin contract to set a new superAdmin contract.

%claimSuperAdmin

Parameters: none

Entrypoint that can only be called by a new superAdmin contract that had previously been set.

B) Admin Entrypoints

%setGuidePrice

Parameters: setGuidePriceAction : setGuidePriceActionType

type setGuidePriceActionType is [@layout:comb] record [

configType : string;

natOption : option(nat);

stringOption : option(string);

]

// configType:

// "priceModel" -> fixed or dynamic

// "appraisalPrice" -> newAppraisalPrice

// "fixedPricePercent" -> newFixedPricePercent

// "orderbookPricePercent" -> newOrderbookPricePercent

Admin can set the guide price config (price model, appraisal price, fixed price percent, and orderbook price percent.

For the fixed price model, only the appraisal price is used.

For the dynamic price model, appraisal price, fixed price percent, and orderbook price percent is used. The final guide price used will be determined from the last matched price from the corresponding RWA Orderbook and the price configurations.

const lastMatchedPrice : nat = getOrderbookLastMatchedPrice(s);

// adjust for decimals

const adjustedLastMatchedPrice : nat = (lastMatchedPrice * const_REBASE_QUOTE_TOKEN_DECIMALS);

guidePrice := mul(appraisalPrice, fixedPricePercent) + mul(orderbookPricePercent, adjustedLastMatchedPrice);

Decimals used for percentages: 18

%updateGuidePrice

Parameters: _ : unit

Admin can call this entrypoint to update the guide price regularly from changes in the RWA Orderbook when the last matched price changes.

%updateMetadata

Parameters: updateMetadataParams : updateMetadataType

type updateMetadataType is [@layout:comb] record [

metadataKey : string;

metadataHash : bytes;

]

Admin can update the contract metadata

%updateConfig

Parameters: updateConfigParams : dodoUpdateConfigParamsType

type dodoUpdateConfigParamsType is [@layout:comb] record [

configName : string;

newConfigValue : nat;

];

Admin can update the configurations for LP Fee, maintainer Fee, and fee decimals.

C) Pause / Break Glass Entry points

%togglePauseEntrypoint

Parameters: togglePauseParams : dodoTogglePauseEntrypointType

type dodoTogglePauseEntrypoinSingleType is [@layout:comb] record [

targetEntrypoint : string;

pauseBool : bool;

];

type dodoTogglePauseEntrypointType is list(dodoTogglePauseEntrypoinSingleType)

// valid target entrypoints:

// buyBaseToken, sellBaseToken, withdrawQuoteToken, withdrawBaseToken,

// withdrawAllQuoteTokens, withdrawAllBaseTokens, depositQuoteToken,

// depositBaseToken

Admin can pause a given entrypoint on the DodoMav contract

D) Dodo Dex Entry Points

%buyBaseToken

Parameters: tradeBaseTokenAction : tradeBaseTokenActionType

type tradeBaseTokenActionType is [@layout:comb] record [

amount : nat;

minMaxQuote : nat;

]

Users can buy base tokens (RWA Tokens). Max Pay Quote is used here to determine the maximum amount of Quote Tokens (e.g. USDT) that the buyer wants to use to purchase the given amount of Base Tokens (RWA Tokens)

%sellBaseToken

Parameters: tradeBaseTokenAction : tradeBaseTokenActionType

type tradeBaseTokenActionType is [@layout:comb] record [

amount : nat;

minMaxQuote : nat;

]

Users can sell base tokens (RWA Tokens).

Min receive Quote is used here to determine the minimum amount of Quote Tokens (e.g. USDT) that the seller wants to receive from selling the given amount of Base Tokens (RWA Tokens)

%withdrawQuoteToken

Parameters: withdrawAmount : nat

User can withdraw Quote Tokens (e.g. USDT) from the DodoMav liquidity pool. Users may incur a withdrawalQuotePenalty if the rStatus is BELOW_ONE to balance the liquidity based on the expected target.

%withdrawBaseToken

Parameters: withdrawAmount : nat

User can withdraw Base Tokens (RWA Tokens) from the DodoMav liquidity pool. Users may incur a withdrawal Base Penalty if the rStatus is ABOVE_ONE to balance the liquidity based on the expected target.

%withdrawAllQuoteTokens

Parameters: _ : unit

Users can withdraw all their Quote Tokens (e.g. USDT) from the DodoMav liquidity pool. Users may incur a withdrawalQuotePenalty if the rStatus is BELOW_ONE to balance the liquidity based on the expected target.

%withdrawAllBaseTokens

Parameters: _ : unit

User can withdraw all his Base Tokens (RWA Token) from the DodoMav liquidity pool. Users may incur a withdrawal Base Penalty if the rStatus is ABOVE_ONE to balance the liquidity based on the expected target.

%depositQuoteToken

Parameters: depositAmount : nat

User can deposit Quote Tokens (e.g. USDT) to the DodoMav liquidity pool.

%depositBaseToken

Parameters: depositAmount : nat

User can deposit Base Tokens (RWA Tokens) to the DodoMav liquidity pool.

E) Lambda Entry Points

%setLambda

Parameters: setLambdaParams : setLambdaType

Admin to set lambdas for contract

PreviousEquiteez’s Proactive Market Maker (PMM) and Liquidity PoolsNextRWA Orderbook DEX

Last updated 3 months ago