What is Unione and How it work ?

YFIONE
6 min readMar 19, 2021
https://unione.app/

UniOne is a decentralized protocol for automated liquidity provision on Ethereum this enables users to experience fast and secure transactions with incredibly low fees. Multiple tokens are available with which you can swap and add liquidity.

Swap Connect Wallet

Token swaps in Unione is a simple way to trade ERC-20 token for another.

For end-users, swapping is intuitive: a user picks an input token and an output token. They specify an input amount, and the protocol calculates how much of the output token they’ll receive. They then execute the swap with one click, receiving the output token in their wallet immediately.

In this guide, we’ll look at what happens during a swap at the protocol level in order to gain a deeper understanding of how Unione Swap works. Swaps in Unione are different from trades on traditional platforms. Unione does not use an order book to represent liquidity or determine prices. Unione uses an automated market maker mechanism to provide instant feedback on rates and slippage.

As we learned in Protocol Overview, each pair on Unione is actually underpinned by a liquidity pool. Liquidity pools are smart contracts that hold balances of two unique tokens and enforces rules around depositing and withdrawing them. This rule is the constant product formula. When either token is withdrawn (purchased), a proportional amount of the other must be deposited (sold), in order to maintain the constant.

Liquidity Provider Rewards

INTRODUCTION

Each Unione liquidity pool is a trading venue for a pair of ERC20 tokens. When a pool contract is created, its balances of each token are 0; in order for the pool to begin facilitating trades, someone must seed it with an initial deposit of each token. This first liquidity provider is the one who sets the initial price of the pool. They are incentivized to deposit an equal value of both tokens into the pool. To see why, consider the case where the first liquidity provider deposits tokens at a ratio different from the current market rate. This immediately creates a profitable arbitrage opportunity, which is likely to be taken by an external party.

When other liquidity providers add to an existing pool, they must deposit pair tokens proportional to the current price. If they don’t, the liquidity they added is at risk of being arbitraged as well. If they believe the current price is not correct, they may arbitrage it to the level they desire, and add liquidity at that price.

POOL TOKENS

Whenever liquidity is deposited into a pool, unique tokens known as liquidity tokens are minted and sent to the provider’s address. These tokens represent a given liquidity provider’s contribution to a pool. The proportion of the pool’s liquidity provided determines the number of liquidity tokens the provider receives. If the provider is minting a new pool, the number of liquidity tokens they will receive will equal sqrt(x * y), where x and y represent the amount of each token provided.

Whenever a trade occurs, a 0.3% fee is charged to the transaction sender. This fee is distributed pro-rata to all LPs in the pool upon completion of the trade.

To retrieve the underlying liquidity, plus any fees accrued, liquidity providers must “burn” their liquidity tokens, effectively exchanging them for their portion of the liquidity pool, plus the proportional fee allocation.

As liquidity tokens are themselves tradable assets, liquidity providers may sell, transfer, or otherwise use their liquidity tokens in any way they see fit.

WHY POOLS?

Unione is unique in that it doesn’t use an order book to derive the price of an asset or to match buyers and sellers of tokens. Instead, Unione uses what are called Liquidity Pools.

Liquidity is typically represented by discrete orders placed by individuals onto a centrally operated order book. A participant looking to provide liquidity or make markets must actively manage their orders, continuously updating them in response to the activity of others in the marketplace.

While order books are foundational to finance and work great for certain usecases, they suffer from a few important limitations that are especially magnified when applied to a decentralized or blockchain-native setting. Order books require intermediary infrastructure to host the orderbook and match orders. This creates points of control and adds additional layers of complexity. They also require active participation and management from market makers who usually use sophsticated infrastructure and algorithms, limiting participation to advanced traders. Order books were invented in a world with relatively few assets being traded, so it is not surprising they aren’t ideal for an ecosystem where anyone can create their own token and those tokens usually have low liquidity. In sum, with the infrastrucural trade-offs presented by a platform like Ethereum, order books are not the native architecture for implementing a liquidity protocol on a blockchain.

Unione focuses on the strengths of Ethereum to reimagine token swaps from first principles.

A blockchain-native liquidity protocol should take advantage of the trusted code execution environment, the autonomous and perpetually running virtual machine, and an open, permissionless, and inclusive access model that produces an exponentially growing ecosystem of virtual assets.

It is important to reiterate that a Pool is just a smart contract, operated by users calling functions on it. Swapping tokens is calling swap on a Pool contract instance, while providing liquidity is calling deposit.

Just how end-users can interact with the Unione protocol through the Interface (which in turn interacts with the underlying contracts), developers can interact directly with the smart contracts and integrate Unione functionality into their own applications without relying on intermediaries or needing permission.

UNIONE Contracts Address

WETH contract

https://etherscan.io/address/0x0ad7e0259b7e80c13074d2e08790d3c263d13d81#code

Token Governance Contract

https://etherscan.io/address/0xfe16c86c4b8378025fba64707e2f9ab0f33c3a0f#code

Factory contract

https://etherscan.io/address/0xcc4b5ae28c1d7669311014e49fb1276b0c98c0dc#code

How to start ?

NOTE: Pairs must be created to see tokens and for swapping to take place.

  1. Before swapping can happen, First go to the Pool section.

2. When you are on the page, select any token For example (YFO), if we select YFO. the page will redirect to add liquidity page.

3. In this pool page, we can see two categories, one is to create a pair and the other one is to Add liquidity, Click create a pair button.

4. While clicking the create pair button, we can see the 13 default tokens in select a token category.

5. On this page, we need to give the input value of ethereum to YFO. For Example, if we have the sushi token. But we don’t know what the value of Sushi token to Ethereum is. We need to give the input value (100 sushi = 1 ethereum — This is a example for setting the value.)

6. Once we have given the token value on liquidity page (any token). we can be able to see the value of the token details on our pool page.

Unione is a Beta Version — Access with your own Risk.

--

--

YFIONE

Yearn Finance One (YFIONE) is a high yield Defi farm that allows you to Stake, Farm, swap and Earn. Bringing real value to yield farming,