# Welcome to EggSwap

The Expanse team is giving support to the core team of EggSwap but this site is manage by the community, so you are welcome to contribute.

EggSwap is an automated market making (AMM) decentralized exchange (DEX) on the Expanse blockchain.

This is a project run by the community and with the support of the Expanse Team.\
\
There are a few core products for EggSwap's ecosystem:

* EggSwap Exchange ([https://www.eggs.cool/ex/ ](<https://www.eggs.cool/ex/ >))
* EggSwap Liquidity Pools (<https://www.eggs.cool/ex/#/pool>)
* EggSwap Farms (<https://www.eggs.cool/farms>)
* EggSwap Staking ([https://eggs.cool/staking](https://www.eggs.cool/staking))


# EggSwap Pools

These tokens represent a proportional share of the pooled assets, allowing a user to reclaim their funds at any point.

EggSwap pools (<https://www.eggs.cool/staking>)allow liquidity providers to add their tokens to liquidity pools.\
\
When they do so they will receive ELP tokens (Eggswap Liquidity Provider tokens) for example if a user deposited $EGG and $EXP into a pool they would receive EGG-EXP ELP tokens.\
\
These tokens represent a proportional share of the pooled assets, allowing a user to reclaim their funds at any point.

![StakeEggs to earn Eggs](/files/-MKBUwaeYhTPmFLW0TTd)

As an LP its important to understand that you may be exposed to "[Impermanent Loss](https://blog.bancor.network/beginners-guide-to-getting-rekt-by-impermanent-loss-7c9510cb2f22)" when providing liquidity.

However, as a liquidity provider you will also receive trade fee reward.\
\
Every time a user trades between $EGG and $EXP a 0.3% fee is taken on the trade. 0.25% of that trade goes back to the the LP pool.\
\
If previously there were 100 ELP tokens representing 100 EXP and 100 EGG each token would be worth 1 EXP & 1 LAB. \
\
If one user trade 10 EXP for 10 EGG, and another traded 10 EGG for 10 EXP, then there would now be 100.025 EXP and 100.025 EGG.\
\
This means each LP token would be worth 1.00025 EXP and 1.00025 EGG now when it is withdrawn.

When you have your LP tokens you can also put them into yield farming on:&#x20;

<https://www.eggs.cool/farms>

If you are farming on the farms, you will still get the 0.25% reward fee for being an LP when you next remove your liquidity.\
\
However, because the /farms and <https://www.eggs.cool/ex/#/pool> are different smart contracts its important to know that the pool page cannot see the tokens you have in farms.\
\
When you are on the pool page it only scans your wallet for ELP tokens to tell you if you are providing liquidity. Therefore it may say "No Liquidity" even though you **ARE** providing liquidity. It's just that it cannot see which tokens you've deposited into the farms.

### How to add Liquidity

[https://www.youtube.com/watch?v=aAeW5VaCZDE](https://www.youtube.com/watch?v=aAeW5VaCZDE\&feature=youtu.be)


# EggSwap Token Menu

The Farm allows users to yield farm Eggs rewards with each new block based on staking ELP tokens they received from exchange.eggs.cool/#/pool

The Farm only works with tokens from EggSwap pools.

![The farm.](/files/-MKBSxa244pr30D4aURX)

Users enter into the farms of their choice. When farming users will receive a new distribution of **Egg** with every block. In the first two weeks of launch the rewards were 1000 Egg per block, divided by the proportional share of the pool. The exception to this was the "Egg Party!" pool which had an additional 2x bonus. After the first two weeks the reward is set to drop to 100 Egg per block. The APY calculation is based on the return in EXP to the daily USD value, based on current block return annualized. It is not a fixed return, it is not a promised return, it is not financial advice. It is based on EXP returns.

#### If I am deposited into the "Farm" it says I don't have liquidity on exchange.eggs.cool/#/pool <a href="#if-i-am-deposited-into-the-farm-it-says-i-dont-have-liquidity-on-exchange-sushiswapclassic-org-pool" id="if-i-am-deposited-into-the-farm-it-says-i-dont-have-liquidity-on-exchange-sushiswapclassic-org-pool"></a>

Correct. The exchange.eggs.cool/#/pool page only scans your wallet for ELP tokens.

If you have deposited your ELP tokens into a farm (which is a separate contract) then the exchange will not see them. However, you **ARE** still providing liquidity and will still get you 0.25 LP trade fee reward when withdrawing.[<br>](https://help.sushidocs.com/)<br>


# EggSwap Staking The Chicken Coop (xEgg)

The Chicken Coop located at <https://www.eggs.cool/staking> allows you to stake your Eggs and receive xEgg in return and then you stake it in the xEgg pool.

![Stake Eggs on the Chicken Coop](/files/-MKBhKHthbrvDTCWlmxS)

When users make trades on the EggSwap Exchange a 0.3% fee is charged.

0.05% of this fee is added to the Chicken Coop pool in the form of LP tokens for the relative pool.

When the rewards contract is called (minimum once per day) all the LP tokens are sold for Eggs (on EggSwap Exchange). The newly purchased Egg is then divided up proportionally between the xEgg holders in the pool, meaning their xEgg is now worth more Egg.

Currently you will not see the gained amount until you have withdrawn.

It started as 1 Egg = 1 xEgg, but just like LP tokens the price of xEgg changes over time depend on how many Egg rewards are in the pool.


# Eggswap Exchange

The EggSwap exchange allows users to swap any ERC20/ERC644 token into any other ERC20/ERC644 token through automated liquidity pools.

The EggSwap exchange allows users to swap any ERC20/ERC644 token into any other ERC20/ERC644 token through automated liquidity pools.

![EggSwap Interface](/files/-MKBKFbiiN__hiJ6NdSf)

The liquidity provided to the exchange comes from Liquidity Providers ("LPs") who stake their tokens in "Pools". In return they get ELP (EggSwap Liquidity Provider) tokens, which can also be staked in the "Farm".

When users make a trade on the exchange they pay a 0.3% trade fee.

#### 0.25% fee reward for LPs:

0.25% of this trade fee goes to the Liquidity Providers who provide liquidity for that pool. It is added to the pool balance.\
\
If previously there were 100 SLP tokens representing 100 EXP and 100 LAB each token would be worth 1 EXP & 1 LAB. \
\
If one user trade 10 EXP for 10 LAV, and another traded 10 LAB for 10 EXP, then there would now be 100.025 EXP and 100.025 LAB.\
\
This means each LP token would be worth 1.00025 EXP and 1.00025 LAB now when it is withdrawn.

#### 0.05% fee reward for xEgg holders:

The remaining portion of the trade fee paid goes to a pool called EggBar. The EggBar contract collects the fees from all the pools, and when the reward distribution command is called, it then sells all the fees turning them into Egg (via EggSwap)\
\
That new Egg is divided up among the users in the xEgg pool. When those users withdraw their xEgg it will be worth more Egg than when they put in from the distribution.


# EggSwap FAQ

**Do I need to unstake and restake?**

If you were deposited before the migration, then no.

If weren't part of EggSwapbefore the migration, then you'd need to redeem your EggSwap LP tokens and come deposit them at <https://www.eggs.cool/ex/> to deposit.

**Do I need to approve ELP?**

Yes. ELP is our version of EGG-v2 LP tokens. They need to be approved to interact with the system.

**Why don't I see my tokens on <https://www.eggs.cool/ex/> after migrating?**

<https://www.eggs.cool/ex/> and <https://www.eggs.cool/farms> are two different smart contracts.

The <https://www.eggs.cool/ex/> page looks for LP tokens that are in your wallet (such as metamask) it cannot see what you have deposited into the farms on the /farms page. So it will show 0, but your LP tokens are still safe in that contract.

**What is xEGG?**

xEGG is what you get when you stake EGG on the new EGGswapclassic.org/staking page - the xEGG staked earns a reward fee of 0.05% of all trades.

**How are xEGG rewards sent?**

When users make trades on the EggSwap Exchange a 0.3% fee is charged.

0.05% (1/6th of the fee) is added to the EGG Chicken Coop pool in the form of LP tokens for the relative pool.

When the rewards contract is called (minimum once per day) all the LP tokens are sold for EGG (on EggSwap Exchange). The newly purchased EGG is then divided up proportionally between the xEGG holders in the pool, meaning their xEGG is now worth more EGG.

Currently you will not see the gained amount until you have withdrawn.

It started as 1 EGG = 1 xEGG, but just like LP tokens the price of xEGG changes over time depend on how many EGG rewards are in the pool.

**How do I get trade rewards?**

If you have LP tokens you automatically get 0.25% of all trades in your pool added back to that pool, so you get a proportional share.

If you have xEGG staked then you continue to get 0.05% of all trade fees from all pools divided proportionally against your stake

**When will we get the 2M migration airdrop?**

As soon as the team is ready. They've had a LONG day with the migration, and I assume have passed out right now. Let them sleep.

**Do I continue to get new $EGG rewards?**

Yes new $EGG is issued every block for EGG staked in the /farms

**Can I add new pairs to the default list on EGGSwap?**

Yes, you can add a new pair at the <https://www.eggs.cool/ex//#/pool> you will be eligible for the 0.25% trade fee on that pair, but it is not eligible to appear on the default list or for the EGG rewards on <https://www.eggs.cool/farms>

**Are there plans to cap the $EGG distribution, lower the emission, or add burning?**

Yes, all of those are being discussed and proposed. **Did any pairs not migrate?**

Yes, BASED is still using EGG-V2 tokens instead of ELP tokens due to the issues with their rebasing.

**I can't see my LP tokens showing up?**

Make sure to refresh your cache. There are lots of caching issues. **Something on the page says EggSwap or EGG-V2**

That's outdated refresh your cache.

**Where can I see the TVL?**

EGGswap.vision

**Is EggSwapnow the largest DEX by liquidity?**

Yes.

**What is the purpose of $EGG now?**

Now it can be used in yield farming on <https://www.eggs.cool/farms> or staked as xEGG for trade fee rewards or used in governance voting or added as an LP on <https://www.eggs.cool/ex/> pools.


# ERC644 Token

The idea is to abstract user balances away from the token's business logic making the tokens upgradeable, and opens the door for modular functionality to be added over time.

### Preamble

```
EIP: <to be assigned>
Title: Token standard for upgradeable and modular tokens
Author: christopher@expanse.tech
Type: Standard Track
Category ERC
Status: Draft
Created: 2017/06/16
```

### Abstract

As it stands now, if any ERC20 tokens were to encounter any sort of fatal flaw, ever balance on that token would be at risk and recovering from the flaw would be cumbersome at best. This ERC proposes a way to accomplish the tasks below by abstracting the user balances away from the business logic.

* Makes tokens upgradeable
* Allows for modular functionality
* Creates a way to insulate user balances from exploitable code

### Motivation

Protecting consumers from potential exploits.

### Specification

### Balances.sol

#### Methods

**getBalances**

Returns an account's token balance.

`function getBalance(address _acct) returns(uint balance)`

**incBalance**

Increases an account's token balance.

`function incBalance(address _acct, uint _val) onlyModule returns(bool success)`

**decBalance**

Decreases an account's token balance.

`function decBalance(address _acct, uint _val) onlyModule returns(bool success)`

**getAllowance**

Returns an accounts allowed balance to be spent on behalf of `owner`.

`function getAllowance(address _owner, address _spender) returns(uint remaining)`

**setApprove**

Allows `_spender` to spend from `_sender's account. When the function is called it over writes the current allowance with` \_value\`.

`function setApprove(address _sender, address _spender, uint256 _value) onlyModule returns(bool success)`

**decApprove**

Decreases an accounts allowance amount by `_value`.

`function decApprove(address _from, address _spender, uint _value) onlyModule returns(bool success)`

**getModule**

Returns if module `_acct` is active or not.

`function getModule(address _acct) returns (bool success)`

**setModule**

Sets module `_acct` to true or false.

`function setModule(address _acct, bool _set) onlyRoot returns(bool success)`

**getTotalSupply**

Returns the total supply.

`function getTotalSupply() returns(uint)`

**incTotalSupply**

Increases the total supply.

`function incTotalSupply(uint _val) onlyModule returns(bool success)`

**decTotalSupply**

Decreases the total supply.

`function decTotalSupply(uint _val) onlyModule returns(bool success)`

**transferRoot**

Transfers to a new account.

`function transferRoot(address _new) onlyRoot returns(bool success)`

#### Events

**BalanceAdj**

Triggered when balances are adjusted.

`event BalanceAdj(address indexed Module, address indexed Account, uint Amount, string Polarity);`

**ModuleSet**

Triggered when modules are updated.

`event ModuleSet(address indexed Module, bool indexed Set);`

### Implementation

<https://github.com/expanse-org/Tokens/tree/master/Token_Contracts/contracts>


# How to Stake Eggs for xEgg

**Step 1:**

Go to <https://www.eggs.cool/staking>- and unlock your wallet.

**Step 2:**

From there you'll be able to see the "Chicken Coop" where you can stake Eggs (turning it into xEgg) in order to earn part of the 0.05% trade fee from all pools on the exchange.

**Step 3:**\
First, you may need to "Approve" the Egg token before you are able to use it. Simply hit the "Approve Eggs" button and sign the transaction with your wallet or MetaMask.

**Step 4:**\
Once the Egg token is approved you'll be able to hit "Convert to xEgg" to stake your Egg.

**Step 5:**\
Then a new window prompt will pop-up letting you select how much EGGS you want to stake. Select the amount, hit confirm and send the transaction.

**Step 6:**\
After that you will see the xEgg available in the bar.

The amount of xEgg in the Chicken Coop will not change. But the amount of Egg it represents will.\
\
As fees are collected they are converted to $EGG and distributed proportionally across holders in the xEGG pool. So when you withdraw your xEGG back into $EGG it will be worth more $EGG than when you put in.\
\
These rewards are slower to update (because they cost a lot of gas) and so you should expect them to update, on average, once per day.\
\
Currently there is no way in the UI to see the level of rewards until you withdraw. The team is working to fix this.


# How to Farm with Egg ELP Tokens

Once you've got your ELP tokens from being a "Liquidity Provider" in the EggSwap Pools ([read the guide here](https://app.gitbook.com/@adamscottcochran/s/sushiswap/~/drafts/-MGs7OaClOK8ZB3IXLHP/guides/how-to-add-tokens-to-sushiswap-exchange-as-an-lp)) then you are ready to also stake your tokens in the EggSwap Farm (Menu) for additional Egg Rewards every block.

**Step 1:**

Navigate to <https://www.eggs.cool/farms> and unlock your wallet.

**Step 2:**

Select the pool you want to stake into:

![Select your pool](/files/-MKBSxa244pr30D4aURX)

**Step 3:**

From here you'll need to "Approve" the ELP token for the first time:

![](/files/-MKCy82afrpHM90jizhB)

**Step 4:**

Once the token is approved you'll be able to stake your tokens by using the "+" button.

**Step 5:**

This will then display a pop-up asking you how many ELP tokens you wish to stake. Enter the amount and hit confirm

**Step 6:**

After this you'll see a transaction as you wait for your token to be staked. Once staked it will appear in the farm and you can unstake it at anytime.\
\
*Important Note: When you deposit your ELP for farming, the eggs.cool/pool page no longer sees it. That page only scans your wallet to see if you are holding ELP tokens.  So that page will say "No Liquidity" - however you do still have your tokens and you are still earning the 0.25% trade fee, it is just currently deposited in the farming contract and so not detected.*

**Step 7:**

After this, your "Eggs Earned" balance will update every block. You'll be able to click "Harvest" at any time to bring out your Coop.

\ <br>

<br>

<br>


# How to add tokens to EggSwap Exchange as an LP

**Step 1:**\
Go to <https://www.eggs.cool/ex/#/pool>

Click the large "Add Liquidity" button

![How to add liquidity?](/files/-MKC6jj5icKhkwKEtVE1)

**Step 2:** \
\
Select which token pair you want to add liquidity for:

![](/files/-MKC6xUVFElVlB5SsMM_)

**Step 3:**

Fill in the amounts you want to add to the liquidity pool. \
\
It may ask you to "Approve" the tokens - you will have to send these "approve transactions" first. \
\
Once you've approved the token you can hit "Supply"

![](/files/-MKC7t7OHDlnTsuMuWmh)

Then a transaction will pop-up for you to sign in your wallet (like MetaMask) - after the transaction is complete you will have successfully added liquidity.

![](/files/-MKC7yLqaAKloHVMgEhb)

![](/files/-MKC87xYJQqjUEHodVCd)

**Step 4:**

The transaction will provide you with some "SLP" tokens in your wallet. These are Eggswap LP tokens and represent the share you've deposited in the pool. All pools are labeled as ELP but represent different pools.

![](/files/-MKC8CWu5Dt2v2V2VSsh)


