# Introduction

A decentralized market for Cashtoken.


# Welcome

Welcome!

[FEX](https://fex.cash) is a decentralized exchange (DEX) that allows users to trade tokens without the need for a third party. FEX is the abbreviation for Fair EXchange. We want to bring fairness to all traders.


# RoadMap

## Product

* [x] Document
* [x] Bulk Order
* [x] UTXO-Based AMM
* [x] Token Logo
* [x] Whitepaper
* [x] Swap Trading History
* [x] AMM Pool Info
* [x] AMM Trading Charts
* [x] Testnet
* [x] CRC721 Standard
* [x] NFT Minter
* [x] NFT Badge
* [x] Support BCMR
* [x] NFT Market
* [x] Fair Meme
* [x] PoW Mining
* [ ] Bulk Trading History
* [ ] CashToken Pairs
* [ ] etc.

## Wallet

* [x] Pay4Best
* [ ] MetaMask Snaps

## Audit

* [x] Open Source
* [ ] Waiting for cashscript smart contract auditing...


# FAQ

**1. What is FEX?**

It's a decentralized exchange (DEX) that allows users to trade tokens without the need for a third party. FEX is the abbreviation for "**F**air **EX**change". We want to bring fairness to all the traders.

**2. Is FEX custodial or non-custodial?**

It is a non-custodial exchange, which means that users retain full control of their assets at all times. The trading process is managed by smart contracts, which are self-executing contracts that are stored on the blockchain. This ensures that all transactions are transparent and secure.

**3. What can we do with it?**

With FEX, you can trade a variety of tokens, including CRC20 tokens and BCH. You can make and take bulk orders for fungible tokens. In the future, FEX will also support partial deals and non-fungible tokens.FEX also supports UniswapV2-style automated market maker functions. You can swap with the AMM pool.

**4. Which tokens can we exchange?**

Currently, you can exchange CRC20 tokens and BCH on FEX. In the future, FEX will also support BCMR tokens.

**5. What is the fee rate?**

There is no fee for bulk orders that are less than 0.1 BCH. FEX charges a fee of 0.6% for the other transactions.

**6. Which wallet does FEX use?**

It uses [Pay4Best](https://pay4.best/), which extends the function of Web3 wallets (such as MetaMask) such that you can sign BCH transactions with them.

**7. Where is the smart contracts' source code?**

The source code for FEX's smart contracts is currently not available to the public. However, it will be made available after it has been audited by a third party. If you are a cashscript expert and willing to help us audit the code, please contact us.


# Links

## Our Products

* Website: [https://fex.cash](https://fex.cash/)
* Twitter: <https://twitter.com/FexCash>
* Telegram: <https://t.me/fexcash_disscusion>
* Github: <https://github.com/fex-cash/fex>
* CRC721 Library: <https://www.npmjs.com/package/libcrc721>

## Other related website links

* Pay4Best: <https://pay4.best/>
* BCH Mainnet Explorer (cashtoken supported): [https://explorer.bitcoinunlimited.info](https://explorer.bitcoinunlimited.info/)
* BCH Chipnet Explorer (cashtoken supported): <https://chipnet.imaginary.cash/>


# Products


# Asset Management

## Address

There are two kinds of addresses commonly used for BCH, respectively, cash addresses and legacy addresses. The two are only different in format, the accounts (actually, UTXOs) behind them under the same private key are the same.

* Cash Address: Cash addresses have the prefix "bitcoincash", and the address part starts with "q".
* Legacy Address: Legacy addresses start with "1" if it is a P2PKH type or "3" if it is a P2SH type.

## User Guide

The Asset Management feature is available in the **Assets** Tab.

<figure><img src="/files/hxh3r29oAAC2nq5hrkoD" alt=""><figcaption></figcaption></figure>

### Deposit

1. If you want to transfer BCH or tokens from another wallet (like Electron-Cash, Paytaca) or DApp (e.g. scaling.cash), you can most likely use cash address. Click on the top right corner to copy the cash address.

   <figure><img src="/files/c8RE1uH2FyG8ntih1Xdg" alt=""><figcaption></figcaption></figure>
2. If you want to withdraw BCH from CEX to fex.cash, please read the supported address types. Most CEXs currently only support legacy addresses.

   <figure><img src="/files/dCK6JzxgNuMuKODX1vhk" alt=""><figcaption></figcaption></figure>

### Withdraw

1. In Token List, there is a "Transfer" button that can transfer your assets from fex.cash to other DApps or CEXs.

   <figure><img src="/files/rIcn2Yz5bfKlrxYYknj1" alt=""><figcaption></figcaption></figure>
2. After clicking "Transfer", it will pop up an input box asking you to enter the address(es) and quantity to be transferred out. Cash addresses and legacy addresses are both supported.

   fex.cash supports multi-account transfers. If you want to transfer a certain amount of BCH or tokens to each address, you can fill in multiple addresses, separated by commas.

   <figure><img src="/files/08XA4fo4wH4BULpV2mbL" alt=""><figcaption></figcaption></figure>


# Bulk Order

*Disclaimer: "Bulk Order" is a decentralized finance (DeFi) application built on the Bitcoin Cash blockchain. It is not a registered financial institution and is not subject to regulation by any government agency. By using this product, you understand that you are participating in a decentralized, open-source (will be open-sourced later) project and that the developers of the product make no guarantee of its performance or security. Investing in this product carries a high degree of risk, including the risk of losing all or a portion of your investment. The product is intended for use by experienced cryptocurrency investors who understand the risks associated with DeFi applications and blockchain-based investments. The product does not guarantee any returns and past performance is not indicative of future results. The product is built using smart contracts and is open-source, meaning that it is not controlled by any central party. While the developers have taken reasonable steps to ensure the security and integrity of the contracts, there is always a risk of bugs, errors, or other issues that could result in the loss of your investment. By using this product, you represent that you understand the risks associated with DeFi applications and are willing to assume them. The product makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the product or the information, products, services, or related graphics contained on the product for any purpose. Any reliance you place on such information is therefore strictly at your own risk.*

## Maker

For the maker side, users don't need to pay platform fees. They just only pay a small miner's fee.

## Taker

For the taker side, the user has to pay a miner's fee in addition to a 0.6% transaction fee if the transaction amount is at a certain level.

## User Guide

The Bulk Order feature is available in the **Bazaar** Tab.

<figure><img src="/files/2YoG9P2JrP6zlpH0Za34" alt=""><figcaption></figcaption></figure>

### Make Order

1. Click the "New Order" button.

   <figure><img src="/files/jbNtj7DfODqDGd1mfXZ6" alt=""><figcaption></figcaption></figure>
2. If you want to buy tokens, you need to click on the "You buy" drop-down box and search for the token which you want to buy. (e.g.: GM)&#x20;

   <figure><img src="/files/UGdvNBER0HbXFLwV7rAX" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/Uuvt9fHdgdwWHIUUDQxS" alt=""><figcaption></figcaption></figure>
3. After selecting the token, fill in the amount of BCH you want to spend and how many tokens you want to buy (e.g. spend 0.01 BCH to buy 1000 GM tokens), then click "Create Bulk Order".

   Once this is done, you can see the bulk order you created on the Bazaar Tab. Similarly, creating a sell order is a similar process.

   <figure><img src="/files/nMkpVvk5FLN9TyK8pRKy" alt=""><figcaption></figcaption></figure>

### Take Order

1. Under the Bazaar page, select the order you want to take, and click the "TAKE" button. (e.g. someone wants to buy 100 CASH tokens using 0.001 BCH)

   <figure><img src="/files/vaeLbdEur4WDgiHvKM71" alt=""><figcaption></figcaption></figure>
2. Then it will pop up a dialog box asking you to confirm whether taking the order. If you click "OK", you will sell 100 CASH tokens and get 0.001 BCH.

   <figure><img src="/files/r1asNMCTrudP50j6SXIo" alt=""><figcaption></figcaption></figure>

### Cancel Order

1. If you have created a bulk order but want to cancel it, you can find the order you created in the list and click the "CANCEL" button.

   <figure><img src="/files/Lkbc0GynkCBWYZKW2y7b" alt=""><figcaption></figcaption></figure>

2. Then it will pop up a dialog box asking you to confirm whether canceling the order. If you click "OK", the order will be canceled.

   <figure><img src="/files/wt82Fc92o9uduFVVP8h3" alt=""><figcaption></figcaption></figure>


# UTXO-Based AMM

*Disclaimer: "UTXO-Based AMM" is a decentralized finance (DeFi) application built on the Bitcoin Cash blockchain. It is not a registered financial institution and is not subject to regulation by any government agency. By using this product, you understand that you are participating in a decentralized, open-source (will be open-sourced later) project and that the developers of the product make no guarantee of its performance or security. Investing in this product carries a high degree of risk, including the risk of losing all or a portion of your investment. The product is intended for use by experienced cryptocurrency investors who understand the risks associated with DeFi applications and blockchain-based investments. The product does not guarantee any returns and past performance is not indicative of future results. The product is built using smart contracts and is open-source, meaning that it is not controlled by any central party. While the developers have taken reasonable steps to ensure the security and integrity of the contracts, there is always a risk of bugs, errors, or other issues that could result in the loss of your investment. By using this product, you represent that you understand the risks associated with DeFi applications and are willing to assume them. The product makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the product or the information, products, services, or related graphics contained on the product for any purpose. Any reliance you place on such information is therefore strictly at your own risk.*

## Whitepaper

<https://github.com/fex-cash/fex/blob/main/whitepaper/fex_whitepaper.md>

## Initialize AMM Pool

If no one has created a pool of a token before, the user can initialize the pool.

Need to consolidate UTXO before initiating a pool (in order to make a UTXO with index 0).

## Mint (Add) Liquidity

Users can add liquidity to AMM pools and benefit from a 0.4% transaction fee.

## Burn (Reduce) Liquidity

Users can reduce liquidity and get BCH and tokens back. As users trade continuously in the pool, burning the same share of LPs can get more BCHs and tokens back.

## Swap

Users can buy and sell tokens with AMM pools. During the swap, users need to pay a 0.6% commission, of which 0.2% of the BCHs and 0.2% of the tokens go to the liquidity provider and 0.2% of the BCHs go to the Fex.Cash project.

## User Guide

### Mint (Add) Liquidity

1. Go to the **Swap** tab, and click "Add Liquidity".

   <figure><img src="/files/UNFHdUL5SRwcRfDRNZ32" alt=""><figcaption></figcaption></figure>

2. Then choose the token you want to add. If the pool has not yet been created, it enters initialization mode.

   During the initialization, Fex will ask you to create a UTXO with index 0, just click "Consolidate".

   <figure><img src="/files/SeGSPKFim4gWcavJnHoP" alt=""><figcaption></figcaption></figure>

   When initializing the AMM pool, a small number of BCHs and tokens need to be burned off. And you can customize the initial price by setting the ratio of BCH and token. (e.g. 1 GM = 0.0001 BCH)

   <figure><img src="/files/vCtENwOTg0MjDaKVk85C" alt=""><figcaption></figcaption></figure>

3. If the pool already exists, then you can add liquidity directly based on the current ratio.

   <figure><img src="/files/b92uSI29XD8Ofh9uLcjx" alt=""><figcaption></figcaption></figure>

4. After adding liquidity, you can view their LP tokens on the Asset tab.

   <figure><img src="/files/vrUuydzzMaVq59YJD1wE" alt=""><figcaption></figcaption></figure>

### Burn (Reduce) Liquidity

1. On the Asset tab, click the "Burn-LP" if you want to reduce the liquidity.

   <figure><img src="/files/XMfevAZXB61A9d3de5DL" alt=""><figcaption></figcaption></figure>

2. Then a message box will pop up asking you to enter the number of LP tokens you want to burn. After burning LP tokens, the corresponding BCH and token shares will be returned to your account.

   <figure><img src="/files/ox1fMjJFhRfMF7fIic5S" alt=""><figcaption></figcaption></figure>

### Swap

1. Go to the Swap tab, and select the token you want to buy or sell. Then click the "Swap" and deal.

   <figure><img src="/files/RoLzcd2JQasu3K9yV3kH" alt=""><figcaption></figcaption></figure>


# NFT Minter

*Disclaimer: "NFT Minter" is a non-fungible token (NFT) application built on the Bitcoin Cash blockchain. It is not subject to regulation by any government agency. By using this product, you understand that you are participating in a decentralized, open-source (will be open-sourced later) project and that the product's developers make no guarantee of its performance or security. Investing in this product carries a high risk, including losing all or a portion of your investment. The product is intended for use by experienced cryptocurrency investors who understand the risks associated with NFT applications and blockchain-based investments. The product does not guarantee any returns and past performance is not indicative of future results. The product is built using smart contracts and is open-source, meaning that it is not controlled by any central party. While the developers have taken reasonable steps to ensure the security and integrity of the contracts, there is always a risk of bugs, errors, or other issues that could result in the loss of your investment. By using this product, you represent that you understand the risks associated with NFT applications and are willing to assume them. The product makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the product or the information, products, services, or related graphics contained on the product for any purpose. Any reliance you place on such information is therefore strictly at your own risk.*

## Deploy

The Deploy function is a tool for publishing CRC721 NFTs on which users can publish their own NFT collections.

## Mint

Users can mint their own or others‘ deployed NFT collections here.

## User Guide

### Submit NFT data

1. Prepare two folders, one for images and the other for JSON data.

   These image or JSON files are named using numbers, incremented from **0**.

   For a concrete example, see <https://github.com/fex-cash/fex-tutorial/tree/main/crc721-demo/ipfs>
2. Register pinata account

   Pinata is an easy-to-use IPFS client.

   <https://app.pinata.cloud/pinmanager>
3. Upload images folder

   First login pinata, click "Add Files" - "Folder".

   <figure><img src="/files/KQVjGsS9mlkS8Aa7KJtO" alt=""><figcaption></figcaption></figure>

   Then select your image folder, and upload it. Then you can see your images folder on IPFS.&#x20;

   For example, the "CRC721-Demo-Images" folder link:  <https://gateway.pinata.cloud/ipfs/Qmez95JyuKM341LTjB6DCDGUX4qgWFmKRrf2VV2UCgZo8Q/>

   <figure><img src="/files/ymPZGnFN7PELhX3Ixshi" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/6mdtEap2sf2psmcZfKUG" alt=""><figcaption></figcaption></figure>
4. Add JSON data for your NFT

   e.g. for NFT No.0, here is JSON data:

   ```json
   {
       "name": "NFT Test0",
       "description": "Description0",
       "image": "ipfs://Qmez95JyuKM341LTjB6DCDGUX4qgWFmKRrf2VV2UCgZo8Q/0.png",
       "attributes": [{"trait_type": "key_name", "value": "Test0"}]
   }
   ```

   In addition to specifying the name, description, and image URL, you can give this NFT custom attributes (key-value).
5. Upload JSON folder

   First login pinata, click "Add Files" - "Folder".

   <figure><img src="/files/KQVjGsS9mlkS8Aa7KJtO" alt=""><figcaption></figcaption></figure>

   Then select your JSON folder, and upload it. Then you can see your JSON folder on IPFS.&#x20;

   For example, the "CRC721-Demo-JSON" folder link:&#x20;

   <https://gateway.pinata.cloud/ipfs/QmXtHJfKJVcDHTaaGF2YhF2yZJ9ifdYA4cAf5Wo2K5Xi4V>
6. You can get the NFT JSON folder CID: QmXtHJfKJVcDHTaaGF2YhF2yZJ9ifdYA4cAf5Wo2K5Xi4V.

### Deploy your NFT

1. Open **Deploy** tab, and set the NFT collection parameters:

   Name: Full name of the NFT collection.

   Symbol: Symbol of the collection.

   Base Token URL: The JSON folder link of this NFT collection.&#x20;

   (Recommended using ipfs\://{JSON folder CID}, like <ipfs://QmXtHJfKJVcDHTaaGF2YhF2yZJ9ifdYA4cAf5Wo2K5Xi4V>)

   Total Supply: The total number of this NFT collection.

   Mint Price: The fee you want to charge for each mint.

   Fee Token (Optional): The token you want to charge for each mint. If left blank, BCH is charged by default.

   <figure><img src="/files/9G4CfJGuem4OjedhE5oE" alt=""><figcaption></figcaption></figure>

2. Click the "Check" button, Fex will check your metadata first, and you can also double-check again to make sure it's uploading correctly.

   <figure><img src="/files/pFhU1JLR39OBZKEZjqD1" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/LOpSTwnGmkYGfJ1Ie88z" alt=""><figcaption></figcaption></figure>

3. Click the "Create" button, you will register this NFT collection.

   <figure><img src="/files/e2wCHaEquiAN3mp5NDc1" alt=""><figcaption></figcaption></figure>

   Then click "Reveal" to actually create this collection.

   <figure><img src="/files/cOmQAwDZ0fxYUKM3no7J" alt=""><figcaption></figcaption></figure>

### How to Mint NFT

1. Switch to **Mint** tab, search the collection by symbol.

   <figure><img src="/files/0PDmozCvxiQrRKodHTrq" alt=""><figcaption></figcaption></figure>

   Then click "Mint" button to mint your favorite NFT.

   <figure><img src="/files/CjW980BeeLXDsZmwPPk8" alt=""><figcaption></figcaption></figure>

2. After minting, you can see your own NFTs on **Asset** tab.

   <figure><img src="/files/hHVtv1xRD5Es68sARhBr" alt=""><figcaption></figcaption></figure>


# NFT Badge

## Badge NFT

Users can set one of their NFTs as their badge, and the badge NFT will be bound to their cash address.

**Only** canonical NFTs can be set as badge NFTs.

## User Guide

### Set as Badge

1. Go to Assets page, choose your favorite NFT, then click "Set as Badge" button.

   <figure><img src="/files/psHsGltcz30dhflYhIrD" alt=""><figcaption></figcaption></figure>
2. Users can set the following customized information.

   <figure><img src="/files/zwldytkbLvhLVXHRGyen" alt=""><figcaption></figcaption></figure>
3. After setting badge NFT, you can see that your cash address in the upper right corner has changed to a badge name. (will be set to {symbol name}-{index}, e.g. badge.com-1)

   <figure><img src="/files/FfZlKY0ax35ejguslayZ" alt=""><figcaption></figcaption></figure>

### Change Badge

1. Go to Assets page, select another NFT, then click "Set as Badge" button.

   <figure><img src="/files/1sT3Gh56s1U9ucMY8Xy6" alt=""><figcaption></figcaption></figure>
2. After changing badge NFT, you can see that your cash address in the upper right corner has changed to a new badge name. (e.g. badge.com-2)

   <figure><img src="/files/PwOhr0krA9qS1WjMa5WM" alt=""><figcaption></figcaption></figure>

### Unset Badge

1. Go to Assets page, choose your badge NFT, then click "Unset Badge" button.

   <figure><img src="/files/mUvmRtHXRN4K1TxHbKbn" alt=""><figcaption></figcaption></figure>
2. The badge NFT will be removed.


# Fair Meme

*Disclaimer: "Fair Meme" is a decentralized finance (DeFi) application built on the Bitcoin Cash blockchain. It is not a registered financial institution and is not subject to regulation by any government agency. By using this product, you understand that you are participating in a decentralized, open-source (will be open-sourced later) project and that the developers of the product make no guarantee of its performance or security. Investing in this product carries a high degree of risk, including the risk of losing all or a portion of your investment. The product is intended for use by experienced cryptocurrency investors who understand the risks associated with DeFi applications and blockchain-based investments. The product does not guarantee any returns and past performance is not indicative of future results. The product is built using smart contracts and is open-source, meaning that it is not controlled by any central party. While the developers have taken reasonable steps to ensure the security and integrity of the contracts, there is always a risk of bugs, errors, or other issues that could result in the loss of your investment. By using this product, you represent that you understand the risks associated with DeFi applications and are willing to assume them. The product makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the product or the information, products, services, or related graphics contained on the product for any purpose. Any reliance you place on such information is therefore strictly at your own risk.*

## Whitepaper

<https://github.com/fex-cash/fex/blob/main/whitepaper/fairmeme_whitepaper.md>

## User Guide

The Fair Meme feature is available in the **Fair Meme** Tab.

<figure><img src="/files/0m2gLnirumsgwJwuuE3f" alt=""><figcaption></figcaption></figure>

### Issue of Fair Meme tokens

1. First, you need to create a new CRC20 token and mint its all total supply.

   BCMR tokens are also okay, but the recommended decimals is 8, and the total supply must be a multiple of 1000.

   Then you need to send all tokens to your fex accounts.
2. Second, click the "New Fair Token", and set up the Fair Meme parameters.

   The exact meaning of the parameters can be read carefully in the [whitepaper](https://github.com/fex-cash/fex/blob/main/whitepaper/fairmeme_whitepaper.md).

<figure><img src="/files/mE2b9z7ReXP3uIZumoiu" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/MYE6JRUdXyTi2wm0CscA" alt=""><figcaption></figcaption></figure>

### Fair Launch

After creating Fair Meme tokens, everyone can mint it at the same price.

1. First, you need to select the Fair Meme token. e.g. TESTFM.
2. The amount of every fair mint at a time is 1000.

<figure><img src="/files/Xb0w9zWo52VhXzvNVZc8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/PEJO8FmJfPvHTdl0mips" alt=""><figcaption></figcaption></figure>

### Create AMM Pool

Note: Until the Fair Meme smart contract creates an AMM pool, users **SHOULD NOT** create pools themselves.

1. When the sold amount has reached half of the total supply or the end time has been reached, anyone can trigger the creation of the AMM pool. e.g. TESTFM2.

<figure><img src="/files/4JZ60a657mSCNL3Oe1UL" alt=""><figcaption></figcaption></figure>

2. After creating the AMM pool, you can check the pool information on "Ranking" page.

<figure><img src="/files/Z4Qm1JxlgCKkCj0qXqbq" alt=""><figcaption></figcaption></figure>

3. Now users can add liquidity and get LP tokens.

<figure><img src="/files/1JDwWbCNy8SsWUZhNDgs" alt=""><figcaption></figcaption></figure>

### Earn Fair Meme

After adding liquidity, users can lock their Fair Meme LP tokens in the "Earn" contract for rewards.

1. First, turn to the "Earn" tab and select the Fair Meme. e.g. TESTFM2.

<figure><img src="/files/CQyaAjdTHTXNhXZan9kK" alt=""><figcaption></figcaption></figure>

2. Then get an extra LP bonus by locking in a fixed period (4 weeks or so, 4032 block intervals).

<figure><img src="/files/eA0BvJT9eDejeKY4zmyD" alt=""><figcaption></figcaption></figure>


# PoW Mining

*Disclaimer: "*&#x50;oW Minin&#x67;*" is a decentralized finance (DeFi) application built on the Bitcoin Cash blockchain. It is not a registered financial institution and is not subject to regulation by any government agency. By using this product, you understand that you are participating in a decentralized, open-source (will be open-sourced later) project and that the developers of the product make no guarantee of its performance or security. Investing in this product carries a high degree of risk, including the risk of losing all or a portion of your investment. The product is intended for use by experienced cryptocurrency investors who understand the risks associated with DeFi applications and blockchain-based investments. The product does not guarantee any returns and past performance is not indicative of future results. The product is built using smart contracts and is open-source, meaning that it is not controlled by any central party. While the developers have taken reasonable steps to ensure the security and integrity of the contracts, there is always a risk of bugs, errors, or other issues that could result in the loss of your investment. By using this product, you represent that you understand the risks associated with DeFi applications and are willing to assume them. The product makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the product or the information, products, services, or related graphics contained on the product for any purpose. Any reliance you place on such information is therefore strictly at your own risk.*

## PoW Mining

PoW Mining is an innovative way to distribute tokens. Users must complete CHECKDATASIG-based mining to calculate a nonce that meets the difficulty conditions to complete each minting.

The currently expected mining difficulty is 500,000 runs for one nonce. But in reality, the times of running CHECKDATASIG needed for each mining is random: sometimes more than 500,000 runs, sometimes less than 500,000 runs.

Also provided a way to create tokens with all the total supply immediately without mining. You can use this feature for a token that would be used by Fair Meme later.

Each successful mining/mint will charge a 0.002 BCH fee, of which 0.0015 BCH will be distributed to the deployer, and the remaining 0.0005 BCH will be used as a platform fee.

## User Guide

The Fair Meme feature is available in the **PoW Mining** Tab.

<figure><img src="/files/6H0426ll9KhLi53bKizz" alt=""><figcaption></figcaption></figure>

### Deploy&#x20;

1. Click the "New PoW Mining Token" button.
2. Set token parameters, such as symbol, name, total supply, etc.

<figure><img src="/files/3B9aB5ZdS4oj1vFpFE2e" alt=""><figcaption></figcaption></figure>

4. Once the token creation is complete, the deployer needs to reveal to deploy the token. The following example shows how to create a token called "TESTPOW".

<figure><img src="/files/O2OS3O0dKZdMJkELzrdY" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/D5CxVMqn9G30c3MJjHkb" alt=""><figcaption></figcaption></figure>

5. If the deployer wants to get all total supply tokens at once, he can make the mint amount equal to the total supply. The following example shows how to create a token called "TESTTOTAL" and get its total supply immediately.

<figure><img src="/files/NVKprJfPmclc3ZvyFI5z" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/5czhOsaHWFtb0J64GXSX" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/AzD6SyoSyR4CUgB6BHs9" alt=""><figcaption></figcaption></figure>

### Mining/Mint

1. Select the token you want to mint. e.g. "TESTPOW".

<figure><img src="/files/nTOtFmmJkkveOaQhnW8y" alt=""><figcaption></figcaption></figure>

2. Click "mint" and start mining. After a proper nonce is calculated, you can mint successfully for one time. The more times you mint, the more proper nonces.

<figure><img src="/files/KvDueyIBH1ZnMsNfqQSs" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CbtYp3d1g3f3tjoGLZvv" alt=""><figcaption></figcaption></figure>

### Extract Deployer Fee&#x20;

1. Make sure you are the deployer of the token. e.g. "TESTPOW2".
2. PoW Mining token you will be asked in a pop-up window whether you want to take the distributed fee.

<figure><img src="/files/5DsJJw8s41J6gkliWwqx" alt=""><figcaption></figcaption></figure>


# Wallet

Wallet


# Wallet

## Bitcoin Cash Wallet&#x20;

### Introduction

Bitcoin Cash Wallet is a new wallet application using [MetaMask Snaps](https://snaps.metamask.io/). It provides almost the same experience as MetaMask.

### Website

DApp: <https://bchwallet.cash>

Snap: <https://snaps.metamask.io/snap/npm/bch-snap/>

### Github

<https://github.com/fex-cash/bch-snap>

### NPM Package

<https://www.npmjs.com/package/bch-snap>

##

## Pay4Best

### Introduction

Pay4.Best is a bridging wallet that derives a private key from a Web3 wallet's "personal\_sign" result and uses it to sign BCH transactions. It's open-source under GPLv3.

Pay4.Best is offered only for convenience. Please DO NOT use it to store valuable assets for a long time. Instead, we suggest using [ElectronCash](https://electroncash.org/#download) to store them. For more information, please read the Pay4.Best [documents](https://github.com/pay4best/doc).

### Website

<https://pay4.best/>

### Github

<https://github.com/pay4best/pay4best.github.io>


# Pay4Best

The Pay4Best wallet is a web-based wallet. Pay4Best is a bridging wallet that derives a private key from a Web3 wallet's "personal\_sign" result and uses it to sign BCH transactions.

## User Guide

### Login to your Pay4Best wallet.

1. Open <https://pay4.best/> website.
2. Select the EVM account you want to connect to and Pay4Best will generate the appropriate BCH CashAddress based on the connected EVM address.

   For example, if you want to switch to Account 4, you have to click on the little ball in the upper right corner and then click "Switch to this account".

<figure><img src="/files/bgb1JzcsHWjLwHgJ9NHg" alt=""><figcaption></figcaption></figure>

3. Then you need to sign a message to generate a BCH address.

<figure><img src="/files/uRnB14tun9KrZJIlcwRH" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/gVzsUZt5HmN09jqkU4NT" alt=""><figcaption></figcaption></figure>

### Connect your wallet to Fex

1. Go to the top right corner of the Fex website and click "Pay4best". (Generally, the default is Pay4best)

<figure><img src="/files/tAeOUc4JvGtPEWyVVXoo" alt=""><figcaption></figcaption></figure>

2. MetaMask will then ask you to sign the message twice.&#x20;

<figure><img src="/files/rIf3MObRl3Q2goUjlH3S" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/JsDYwGKUp9kjyBrExeJq" alt=""><figcaption></figcaption></figure>

3. The connection is successful.

<figure><img src="/files/liGrtxB4kuxwUkBXFVuT" alt=""><figcaption></figcaption></figure>


# Snaps

Fex currently offers two ways to connect to wallets, Pay4Best and Snaps. Pay4Best is quite simple, it is to generate a BCH cash address using the EVM address and then sign to confirm transactions. Snaps is a recently launched MetaMask feature designed to provide developers with a way to access the MetaMask wallet (especially for non-EVM blockchains). We have implemented a simple Snaps wallet called [bchwallet.cash](https://bchwallet.cash/).

## User Guide

Now our snap is officially listed on the MetaMask Snaps Dictionary! Users can install bch-snap on the MetaMask stable version now.

You can check the snap information here: <https://snaps.metamask.io/snap/npm/bch-snap/>

Go to the top right corner of the Fex website and click "Snap", then click "Connect".

<figure><img src="/files/OYbNqR8HimmyYuOLTfi1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/DY50053jO2vZq4L4x7SO" alt=""><figcaption></figcaption></figure>

After clicking, the MetaMask will ask you to connect to MetaMask and install "Bitcoin Cash Wallet".

<figure><img src="/files/czScuC7imYw8wMjzdZ7P" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/yPnfSyTEFeF4NcdTXn41" alt=""><figcaption></figcaption></figure>

Users can check their assets at <https://bchwallet.cash/>

<figure><img src="/files/lXE3renfHTZqYVhkDAcL" alt=""><figcaption></figcaption></figure>

And they can switch their accounts here, which currently supports the management of 20 accounts.

<figure><img src="/files/Tkkr9iWpgQhoOjzTRHo5" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/SUMcgJ8a6Q8BIPZ4wJwi" alt=""><figcaption></figcaption></figure>


# Audit

The source code for FEX's smart contracts is currently not available to the public. However, it will be made available after it has been audited by a third party. If you are a cashscript expert and willing to help us audit the code, please contact us.


