Case Study: Sienna Swap – AMM Decentralized exchange (DEX)

Cover Image for Case Study: Sienna Swap – AMM Decentralized exchange (DEX)


The Sienna Swap is an exemplary showcase of HackBG‘s expertise in full-stack blockchain application development. This project runs on the Secret Network mainnet (Cosmos), leveraging the privacy properties of the chain to achieve a privacy-preserving and front-running resistant implementation of smart contract based automated market maker decentralized exchange. The project is built with CosmWasm.

Project Specifications

  • Liquidity pools: Users can provide liquidity to the platform by depositing pairs of tokens into liquidity pools. These pools are used to facilitate trades on the platform.
  • Automated trading: Sienna Swap AMM DEXs use algorithms and smart contracts to automatically match buy and sell orders. Instead of relying on order books, trades are executed against liquidity pools, allowing for continuous and automated price discovery.
  • Constant Product Formula: Sienna Swap AMM DEX use a constant product formula (e.g. the one showcased in Uniswap and an industry standard x * y = k) to maintain a balance between the quantities of the two tokens in a liquidity pool. This formula ensures that the product of the token quantities remains constant, allowing for price adjustments with each trade.
  • Permissionless Access: Users can access AMM DEXs without the need for intermediaries or approval. Anyone with a compatible wallet can trade on the platform, promoting financial inclusion.
  • Token Swapping: Users can easily swap one cryptocurrency for another directly through the DEX without the need for an intermediary. This process is facilitated by the liquidity pools and automated trading algorithms.

Development Process

  • Development Aspects: HackBG‘s role spanned across several domains including the development of smart contracts, Azure serverless backend components, and front-end implementation with React.
  • Integration: The project’s front-end integrates with browser based wallets efficiently, including Keplr Wallet.
  • Technological Stack: The project was built using a range of technologies such as Cosmos, Rust, CosmWasm, Fadroma, along with React, TypeScript, and JavaScript.
  • The project was developed by a team of five HackBG developers, specializing in full-stack blockchain development and Cosmos, over a four months period, efficiency and skill in blockchain development.
  • HackBG‘s collaboration with Sienna Network continued after the project, focusing on building a comprehensive library for interacting with the DEX using JavaScript and TypeScript applications and easy integration. Additionally building surrounding infrastructure for managing the more complex additional operational processes such as management of tokens vesting and partner-funded dual rewards distribution contracts and services.

Unique Features and User Experience

  • Privacy: The decentralized exchange (DEX), was designed with a privacy-centric approach and cross-chain functionality utilizing Cosmos’ IBC (inter blockchain communication protocol). Users can seamlessly execute private token swaps with a robust mitigation strategy against front-running vulnerabilities.
    • The DEX is built on the Secret Network, leveraging its distinction as the first blockchain to implement privacy-preserving smart contracts. Transactions on the DEX are characterized by nearly instantaneous execution, and the integration of privacy features serves as a robust deterrent to front-running risks.
  • Ease of Use: The usage of the platform is as easy as any other decentralized application and the UI and UX are very clean and intuitive.

Technological Innovation and Impact

This project is a reflection of our values at HackBG for preserving user privacy while building complex blockchain functionalities preserving top-notch UX and UIs in a decentralized application.

Project Repository
Project Website

Have a project in mind?

We have the expertise! Drop us a line and lets talk!