Powering Dexordi's Platform : AMM Algorithm and BRC-20/CBR20 Token Standard

4.1 Introduction to Automated Market Maker (AMM) Algorithm

In this chapter, we will explore the underlying technology that powers DexOrdi's platform, specifically the Automated Market Maker (AMM) algorithm. The AMM algorithm plays a crucial role in facilitating decentralized trading by providing liquidity and determining fair prices for assets. DexOrdi's AMM algorithm is designed to ensure efficient and reliable trading experiences for users on the Bitcoin network.

Create new liquidity pool

Factory Contract

▶ type: Wallet ▶ This wallet is only created when dex platform is created. This wallet holds all ordinals which store all information about liquidity pools.

Liquidity Pool

▶ type: Wallet ▶ This wallet holds a pair of BRC20 tokens. Users can swap tokens on this pool. Pool Contract

Pool Contract

▶ type: Wallet ▶ This wallet holds a pair of BRC20 tokens. Users can swap tokens on this pool. Pool Contract

Following data is stored on the contract:

{“version":1// Pool contract version number "pool_address":"0123...6789" // Liquidity pool address "tokenA":0123...6789"// TokenA inscription "tokenB":"0123...6789" // TokenB inscription}

Add Liquidity

Purpose of AddLiquidity event

In DEX on Ethereum, LP tokens are different for each liquidity pools. But on Bitcoin, it’s difficult to mint new tokens per liquidity pools.

So we suggest using same LP tokens on each liquidity pools and storing this info on ordinals. This ordinal is called AddLiquidity event. When platform shares profit or user removes liquidity, this AddLiquidity event is used to calculate profit or reward amount

▶ If there is no liquidity in liquidity pool, then user can add any rate of token pair. None of the token amounts can be O.

▶ If there already exist liquidity in the liquidity pool, then user have to add liquidity according to original rate of token pair. If user does not add liquidity according to original rate of token pair, then amount of rate is added to liquidity pool and remains are sent back to user.

▶ When user adds liquidity, then LP tokens are transferred to user. The amount of LP tokens are calculated by rate of liquidity user added to liquidity pool.

▶ When user adds liquidity to the pool, then AddLiquidity event is emitted. This event holds information of liquidity user added to liquidity pool and is used to share profit or remove liquidity.

Remove Liquidity

This works similar with liquidity and workflow.

User sends LP tokens to liquidity pool and gets reward according to rate of LP tokens he possesses. User can remove entire or some part of Liquidity he or she owns using amount of LP tokens he sent to liquidity pool.

Swap

Original token amount

TokenA amount = AmountA TokenB amount = AmountB

Original token price

PriceA = (AmountB/AmountA) *PriceB PriceA = (AmountA/AmountB) *PriceA

User sends AmountA1 of TokenA

Sent amount = (AmountA1/AmountA + AmountA1))*AmountB

Remain token amount

TokenA amount = AmountA / AmountA1 TokenB amount = (AmountA/(AmountA + AmountA1))* AmountB

Changed token price

PriceA = (AmountA* AmountB) / ((AmountA+ AmountA1)** 2)/(AmountA*AmountB)*PriceA

Enhanced Liquidity and Market Efficiency:

The dual token system allows Dexordi to separate the trading and governance functionalities, ensuring enhanced liquidity and market efficiency. The DEX token serves as the primary trading token within the platform, facilitating seamless and cost-effective transactions. By focusing on trading, the DEX token can maintain high liquidity and provide a smooth trading experience for users.

Governance and Decision-Making:

The Governance token plays a crucial role in enabling community participation and decisionmaking within the Dexordi ecosystem. Holders of the Governance token have the power to propose and vote on platform upgrades, policy changes, fee structures, and other important governance matters. This democratic approach empowers users and ensures that the platform evolves according to the collective interests of its stakeholders.

Incentivizing User Participation:

The dual token system incentivizes users to actively participate in the Dexordi ecosystem. By holding the Governance token, users have the opportunity to shape the future of the platform and contribute to its development. This incentivization mechanism encourages engagement, fosters a sense of ownership, and strengthens the community around Dexordi

Flexibility and Adaptability:

The dual token system provides Dexordi with the flexibility to adapt to evolving market conditions and user preferences. By separating the trading and governance functionalities, Dexordi can independently adjust each token's economic model and tokenomics to meet the specific needs of its user base. This adaptability ensures that Dexordi remains responsive to market dynamics and can introduce new features and incentives as required.

In conclusion, Dexordi's adoption of a dual token system brings numerous benefits to the platform and its users. By separating the trading and governance functionalities, Dexordi enhances liquidity, promotes community participation, incentivizes user engagement, and ensures adaptability to market conditions.

This innovative approach strengthens the overall ecosystem and establishes Dexordi as a leading decentralized exchange at the forefront of the brc 20 protocol.

4.2 Liquidity Provision and Market Efficiency

DexOrdi's AMM algorithm leverages liquidity pools contributed by the community to ensure ample liquidity for traders. Liquidity pools consist of funds provided by users who wish to earn returns by providing liquidity to the platform. The AMM algorithm dynamically adjusts prices based on the ratio of assets in the pool, ensuring fair and competitive pricing. This mechanism improves market efficiency, reducing slippage and enabling traders to execute trades with minimal impact on prices.

4.3 Benefits of the BRC-20 Token Standard

DexOrdi is built on the Bitcoin network, utilizing the BRC-20 token standard. The BRC-20 standard offers several benefits that enhance the functionality and interoperability of tokens on DexOrdi's platform.

With the BRC-20 standard, tokens can be easily created, managed, and traded, providing a seamless experience for users. Additionally, the BRC-20 standard ensures compatibility with various wallets and other platforms within the Bitcoin ecosystem, expanding the reach and usability of DexOrdi's platform.

4.4 Security Measures and Auditing

Security is a top priority for DexOrdi. The platform implements robust security measures to safeguard users' funds and personal information. DexOrdi conducts regular audits to identify and mitigate potential vulnerabilities, ensuring the platform's resilience against attacks. By adhering to industry best practices and employing advanced encryption techniques, DexOrdi maintains a secure trading environment for its users.

4.5 Scalability and Future Developments

DexOrdi's platform is designed with scalability in mind. As the decentralized finance space continues to evolve, DexOrdi is committed to adapting and expanding its infrastructure to accommodate growing user demands. DexOrdi's development team actively explores new technologies and upgrades to enhance the platform's performance and provide users with a cutting-edge trading experience.

4.6 The Vision for DexOrdi's Future

DexOrdi envisions a future where decentralized trading becomes the norm, empowering individuals to have full control over their financial activities. By leveraging advanced AMM algorithms and embracing the BRC-20 token standard, DexOrdi aims to revolutionize the way users trade digital assets on the Bitcoin network. DexOrdi's commitment to innovation, security, and user experience sets the foundation for a transformative future in decentralized finance.

Last updated