LogoLogo
  • Welcome!
  • The Protocol
    • Overview
    • Stakeholders
    • SecretTokens
    • Viewing Keys
    • Bridges
    • SEFI Token
    • CSHBK Token
    • Governance
  • User Guide
    • Swapping
    • Liquidity Providing
    • Tutorials
      • How to Buy SCRT in the U.S. Tutorial - Coinbase and Osmosis
      • Secret Ethereum Bridge (Video Tutorial)
      • Secret BSC Bridge (Video Tutorial)
      • Secret Monero Bridge (Video Tutorial) (1 of 4)
      • Secret Monero Bridge (Written Tutorial)
      • SecretSwap Full Length (Video Tutorial)
      • Trade & Earn Yield on SecretSwap (Written Tutorial)
      • Provide Liquidity on SecretSwap (Written Tutorial)
      • SEFI Governance (Written Tutorial)
    • Frequently Asked Questions
    • Glossary
  • Developer Guide
    • Create a New Pair
    • Factory
    • Query
    • Pair
  • Resources
    • Contract Addresses
Powered by GitBook
On this page
  1. The Protocol

Overview

PreviousWelcome!NextStakeholders

Last updated 3 years ago

SecretSwap is an automated market maker (AMM) liquidity protocol. There is no order book, no centralized party, and no central facilitator of trade. Built by Secret Contracts, SecretSwap transactions inputs are encrypted - protecting users from front-running attacks and providing an increased level of privacy compared to traditional AMMs.

Each pool within SecretSwap is defined by a secret contract that includes a few functions to enable swapping tokens, adding liquidity and more. At its core each pool uses the function x*y=k to maintain a curve along which trades can occur.

The pools keep track of reserves (liquidity) and updates those reserves every single time someone trades. Because the reserves are automatically rebalanced, a SecretSwap pool can always be used to buy or sell a token without requiring a counter-party on the other side of your trade.

  • Note: Given the requirement to publicly update pool reserves to determine the price, an observer can see a consolidated view of changes (swaps, provide / remove liquidity) in a given block. As a result, if there’s a single transaction with the pool in a given block, it is not possible to have privacy on that transaction. With more transactions per pool in a given block, SecretSwap provides additional privacy to users.

For a more in depth description, check out how SecretSwap works in this outlining the theory behind an AMM using secret contracts.

In order to use SecretSwap, you will need the installed on your browser and at a minimum, some SCRT to begin swapping.

blog post
Keplr Wallet
Page cover image