Skip to main content

Core Concepts

Sigmaswap is an automated liquidity protocol powered by a constant product formula and implemented on non-upgradeable smart contracts on the Hedera Hashgraph. It obviates the need for trusted intermediaries, prioritizing decentralization, censorship resistance, and security. Sigmaswa is an open-source software adapted from the original code of Uniswap V2 to support the hashgraph technology plus various additional features.

Even though Ethereum ERC20 is the most well-known and used token type on multiple EVM-based decentralized networks, it was found to be less efficient to create and transact the token on Hedera as the smart contract (EVM-based) is not located in the native layer. To optimize the speed at 10,000 TPS on the hashgraph, Hedera has invented HTS, a new type of token. This token can be working at the highest possible speed of the network while still managing to receive hashgraph security according to ABFT.

Correspondingly, each Sigmaswap smart contract, or pair, manages a liquidity pool made up of reserves of two HTS tokens.

Anyone can become a liquidity provider (LP) for a pool by depositing an equivalent value of each underlying token in return for pool tokens. These tokens track pro-rata LP shares of the total reserves, and can be redeemed for the underlying assets at any time.

Pairs act as automated market makers, standing ready to accept one token for the other as long as the “constant product” formula is preserved. This formula, most simply expressed as x * y = k, states that trades must not change the product (k) of a pair’s reserve balances (x and y). Because k remains unchanged from the reference frame of a trade, it is often referred to as the invariant. This formula has the desirable property that larger trades (relative to reserves) execute at exponentially worse rates than smaller ones.

SigmaSwap charges a 0.25% fee to trade, which will be added to pool reserves. As a result, each trade actually increases k. This function as a payout to LPs is realized when they burn their pool tokens to withdraw their portion of total reserves.

Because the relative price of the two pair assets can only be changed through trading, divergences between the Sigmaswap price and external prices create arbitrage opportunities. This mechanism ensures that Sigmaswap prices always trend toward the market-clearing price.

Further reading

To see how token swap works, and to walk through the life cycle of a swap, check out Swaps and Pools.

Ultimately, the core of Sigmaswap protocol is just "a set of smart contract codes" running on Hedera.

For more information in depth, see the whitepaper.