en
Back to the list

Polaris feature: Pumpkin Swap – a Uniswap-like DEX protocol for Neo N3

source-logo  neonewstoday.com 19 June 2022 20:38, UTC

Pumpkin Swap won the Best DeFi project award in the Neo Polaris Launchpad with its Uniswap-like DEX that allows users to create liquidity pools and provide liquidity with minimal fees. Pumpkin Swap aims to be the first non-custodial exchange on the Neo N3 blockchain that allows users to create liquidity pools with bespoke tokens as LP rewards.

The Uniswap model

Uniswap pioneered the automated liquidity protocol, which is managed by the “constant product formula,” Token A Balance * Token B Balance = K. By this standard, K represents the consistent balance between the two assets in the liquidity pool, which also determines the prices of the pair of tokens.

For example, every time Token A is bought, typically its price rises as there’s less of that token in the liquidity pool. Conversely, the price of Token B likely decreases as there’s more of it in the pool. The pool, represented by K, is designed to remain in a state of balance, as the total combined value of Token A in the pool remains the same as that of Token B.

LP rewards

Typically, when contributing tokens to an LP on other DeFi platforms, users lock assets in a smart contract and receive one or two different types of rewards for providing that capital.

First, the provider may receive a portion of trading fees from the LP relative to the weight of their stake in the pool. For example, in a ETH/NEX pool, a liquidity provider would receive both ETH and NEX tokens as rewards upon withdrawing their liquidity. This is the rewards system used by Uniswap.

Second, liquidity programs might distribute a specific token as the reward. This is a system used by Flamingo in both its liquidity and reverse liquidity pools. For example, users who provide liquidity to the FLM/bNEO pool will receive FLM as rewards and contributors to the FLM/NUDES reverse pool will only receive NUDES tokens as rewards.

Pumpkin Swap

Pumpkin Swap was developed by the pseudonymous developer, Sky, who built the Sky Hut NFT marketplace for the first Neo N3 hackathon, Frontier Launchpad. Ultimately, Pumpkin Swap is a fusion of ideas from Uniswap and Flamingo. It allows users to create their own pools, like on Uniswap, but enables the creator to choose which token they’d like to provide to liquidity providers, like Flamingo.

Pumpkin Swap takes this concept one step further, however, allowing creators to distribute rewards from tokens not featured in a pool. This effectively means one could create a NEO/GAS liquidity pool, for instance, and reward liquidity providers with their own NEP-17 project token. Sky said:

I was inspired by Flamingo and their reverse pools – how amazing it is and just how useful and important they are. Especially for anyone with a new project to be able to get some small funding to kickstart their journey. Any user who sees a future with a project can invest in it and potentially stake their tokens if the team has created a staking reward system for their project.

Sky hopes that Pumpkin Swap can become a stepping stone for burgeoning projects to earn funds and distribute tokens to their community members.

Features

Pumpkin Swap’s submission for the Polaris Launchpad included three main features: swap, pool, and utility.

The primary function of the DEX is to offer swapping between any of Neo’s NEP-17 tokens. Swaps can be performed directly between two tokens within a pool. Or, users can perform multi hops, which allow for intermediary trades between tokens across multiple pools.

Similar to Flamingo, users can add liquidity to Pumpkin Swap pools. However, Pumpkin Swap differs from Flamingo as it lets users create their own custom NEP-17 tokens, then pair them against other NEP-17 tokens in an LP or offer them as a reward. LP rewards can be programmed to distribute at varying block intervals (i.e., for every x blocks, y amount of tokens are distributed to LP stakers).

Creators of new LPs can also lock tokens for a predetermined amount of time. Smart contracts will not allow the LP contract creator to remove liquidity until the established date. Sky stated that this is designed to instill confidence in the ability of the new pool to endure – that an LP creator can’t withdraw large amounts of tokens from the pool and reduce the entire pool’s value.

Neo’s Developer Experience

Sky has been building on N3 since the TestNet days of early 2021 and through the MainNet launch in Aug. 2021. The C# developer noted that the Neo ecosystem makes it possible to bring his ideas to reality. In particular, he pointed to the ease of installing a working environment through the Neo Blockchain Toolkit built by NGD Enterprise. Sky said:

I got a new computer almost two months ago and reinstalled everything. I then realized how easy it is to install everything and have a working environment within 30 minutes. Never in my six years as a dev have I ever had an environment up and ready within 30 minutes!

Ultimately, Sky’s passion is to utilize the Neo network to connect people through tools and utilities to efficient, hassle-free products. He said, “Having the chance to create useful stuff for people to interact with and use the Neo network more is something I’m very passionate about.”

The Pumpkin Swap project was rewarded with a multiplier of 1.3x from the Polaris Launchpad Planathon event, and won a total grand prize equivalent to US $45,500.

The Pumpkin Swap GitHub can be found at the link below:
https://github.com/SkyKarma/n3-polaris-hackathon

Pumpkin Swap can be tested out at the link below:
https://testnet.pumpkinswap.app/

neonewstoday.com