# 第 2 期 — — DEX 交易、LP 新手教程

DEX 即链上去中心化交易所，平台不存储用户资产，用户以钱包直接交易

​为什么需要 DEX，很简单，因为 CEX（中心化交易所）不安全，币安、OK、gate、抹茶这些都是 CEX，我们使用 CEX，实际上是把我们的币先打入了 CEX 的地址，然后交易成 BTC、ETH 这些币

​其实你手里并没有真实的 BTC、ETH，只是交易所给你的数据，等你要提币的时候，交易所再从自己的地址给你拨币

​几乎每年都有 jCEX 被黑客袭击，导致大量用户资产流失，因此CEX 并不安全，甚至包括币安.这就是 DEX 存在的必要性，资产时刻在用户自己钱包里

下面我们就以 PancakeSwap 为例，带大家操作一遍 DEX：

​

### ​**前提准备：**

**​**

**​**1、狐狸钱包

2、少量的 bnb

​

### ​**PancakeSwap 简介**

​Pancake 是 BSC 链的最大 DEX，采取了 AMM 模式

​先说下 AMM 模式

​一般我们在币安、OK、gate 这些平台交易，都是订单薄模式，就是别人挂了卖单你才能买，别人挂了买单你才能卖，当然你也可以主动挂单，等别人来交易。

​AMM 模式的 DEX 则不是这样，你去买币、卖币，你没有直接的对手盘。

​AMM 就是池模式，比如 bnb-usdt 的池，这里面有 100 个 bnb和等价值的 usdt，你买卖币，就是把你的 bnb，丢进这个池子，然后自动给你对应数量的 usdt，​这就是 AMM 模式。

​

### **下面就开始讲具体的教程：**

​

Pancake 的网址：pancakeswap.finance

#### **​1、链接钱包**



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2F2QaFQWyvbVoTaZu3lpDB%2F86d1d2be90c1fa1c8299dd705d68be3f_008idDKsgy1h1dzqejew1j30n2098di0.jpg?alt=media\&token=5f99a004-2e00-48ef-a0ad-4c653adb989a)



​选择狐狸钱包（Metamask）

#### ![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FONpDQUQoSstg0OLoGMs3%2Fb5bb5b0de86b35977b0dcaac667dd27b_008idDKsgy1h1dzr3wstpj30hv0omn1j.jpg?alt=media\&token=121b7649-028e-4f98-a701-3ccca7acb6e7)



#### **​2、进去 DEX 交易板块**



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FbwElbxn7d2II7bADAeT9%2F4fd50823f3b3d0db96826c391a94c052_008idDKsgy1h1dzrnl8jpj30us0ihdkh.jpg?alt=media\&token=7e08ac04-44bc-4004-a9a1-869615cd2ac7)

#### **​3、选择你要交易的币种**



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FjUfDKKzQC7JdLZgbEqCi%2Fc19619366c0e079f65404d8f08cdc9fd_008idDKsgy1h1dzs37p6oj30jp0sjn1u.jpg?alt=media\&token=5dc7761c-42ca-45c4-a534-6b79a61c3a17)



我以 usdt 为例，输入 usdt，下面出现了 usdt 币，点击即可



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FpT0xqxIwDk2FteJDXG45%2F8dd4f37a2f9ef43b1fc61405ea96048b_008idDKsgy1h1dzsle6bgj30n20hiadz.jpg?alt=media\&token=13461f18-5cd3-48a7-8495-f5e6d67757df)

#### **4、选择交易数量​**



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FtFvjzZtHAgqzFO8aQ6yT%2Fc185be5bb0407f9ccd1b519c47eb22d3_008idDKsgy1h1dzszp23yj30j40ri7a3.jpg?alt=media\&token=ae8a6af8-fd4f-4186-a1d1-958c6a7b04a0)



这里我要卖 0.14 个 bnb，下面显示可以兑换 55u



#### **5、点击 swap，开始交互**



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FUZDg3A1ncKPO6CUUWGYW%2F3bc11df50014d0359f5acc4f35b59050_008idDKsgy1h1dztw5zu9j30jg0fqwi5.jpg?alt=media\&token=467099e4-719f-432c-9463-903c2ac2ede0)



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FMciPeusL5Q6ZJKSP0Y3P%2F3de59ad4701318e51b065cc8976b4fac_008idDKsgy1h1dzu4aagaj30us0hodjk.jpg?alt=media\&token=c23f7997-fe75-465c-8126-569f7772ee36)



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2Fh2SNnlRRYBOkdHzbPzix%2F251130c6f349156ab6ccedf1ceec6354_008idDKsgy1h1dzuanjqtj30ur0p8q9s.jpg?alt=media\&token=c7e15c36-dd94-406b-88c0-4fda7c1c8de8)



#### **​6、钱包添加 usdt 币种**

​

此时钱包并没有 usdt 币的显示

![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FVqkakI4pXHJwlo39kxu9%2F8b89b9e32371d6c845b121feb0bf2e86_008idDKsgy1h1dzvcd8tmj30jk0rvaeb.jpg?alt=media\&token=47ed279e-2d01-4a90-bee5-2e49f6c3e5d9)



返回 DEX 界面，点击复制 usdt 代币合约地址​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FqivevTI5xjmzkyQ8sthd%2F8112569b937e03c2aa3a8a056edd5941_008idDKsgy1h1dzvuhkiwj30kb0s278z.jpg?alt=media\&token=cb6abd64-3c57-4c02-905d-f18294aaafc5)



再去狐狸钱包，点击导入代币

![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2F9OialW6acHxJwvxraQJi%2Fe73382a8aa41fdcfbc11806ae96e388d_008idDKsgy1h1dzw9ji4tj30jy0tcte0.jpg?alt=media\&token=002774dc-c173-4904-ba19-601e097f7bd2)



复制 usdt 代币合约地址，点击添加自定义代币



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FJt8XAqSO6sSrexEXN6D7%2F8aaa30cbf4a23f0b4bc1c35c61392eff_008idDKsgy1h1dzwmnm2pj30jy0ulwky.jpg?alt=media\&token=45499b8e-8696-4d30-a075-53f496860874)



​点击导入代币



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2F5mIy03iu154VgkYnBqld%2F9fdc5c6ef8c7217289985b3549dcff1e_008idDKsgy1h1dzwzqne7j30ky0uatcw.jpg?alt=media\&token=91d149bc-1cfd-43f3-aa48-42ff883651a5)



此时钱包就显示了 usdt 的余额



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FwXYP00Ur4HB4AfLEiQ7A%2Fe182454a59c15d70ceb833481367939a_008idDKsgy1h1dzxckjx4j30js0rmjvp.jpg?alt=media\&token=bc911c64-320e-4ff4-b54d-cc0147274d0f)



交易部分到这里就完成了



### **下面带大家做下如何为 DEX 添加流动性即 LP，赚取收益**



点击“Liquidity



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FhXC7ovgdZN4PdmAIguuC%2F0100f514d6e8fa68cf4c841671ba4b03_008idDKsgy1h1dzy5poznj30ur0do0xp.jpg?alt=media\&token=83770bc3-26a8-444d-8327-63e0da11225b)



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FebCsR5oNwSOZKurIRNWC%2Fcb778a97e48b0e742d0b978838e6a45a_008idDKsgy1h1dzydtcfzj30o50frgpe.jpg?alt=media\&token=5e5e292c-7a21-49d5-9ed7-617fb0b9b453)



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FJ3twFqJsiHkB2iHZ3WZU%2F639be55063d9f5ba169a8e6f85f096dc_008idDKsgy1h1dzym06hfj30np0lvq6i.jpg?alt=media\&token=4c702832-6507-4cfc-9f60-cc2823880f8d)

选择 usdt​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FLDErTcZ2tHClgzhwO9w6%2F17666d444b317f35ff7ced4922be7dc5_008idDKsgy1h1dzz570xrj30lq0ubn3g.jpg?alt=media\&token=ad3a2cd5-d5e6-4fe5-bef9-fdcc32e89e50)



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FA6miquU1eFg854B7JKMy%2F59585fe61b8bcd43b400845c5bf1ae66_008idDKsgy1h1dzzcf6cqj30n20o2aeg.jpg?alt=media\&token=7ea9cffa-8853-4417-9cae-d5a4ac482ce8)



输入你提供流动性的数量

​

![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FTs8L2dWrNtUhZ1upavk3%2Fb2fa62f8ca3bc961e962b721d9950887_008idDKsgy1h1dzzzo9ldj30om0pwdm0.jpg?alt=media\&token=117e1c0f-cc6b-4aa5-9be9-bfc46c023f67)



批准 usdt​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2Fnv3W92IgkuyiVWYP57D2%2Fe3da2b758282e2d8796cbc9edf61eac7_008idDKsgy1h1e00dpr2sj30oo0s5ten.jpg?alt=media\&token=0b4f4af7-00b9-4b44-9d3b-6369f88b46c7)



跳出钱包窗口，点击确认



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FnH95nIChZBSbXn7eXvZm%2Ff3bd2b3cbed7f814a0a4ccb4b93347a9_008idDKsgy1h1e00uxw05j30id0wltfp.jpg?alt=media\&token=dc21ff4a-0290-4a68-a16a-6838967ee601)



点击“Supply”​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FwXlTO7NUIGWMwuLYVKYm%2Fa8856cf1acc1b3a14401c470a2f0c922_008idDKsgy1h1e01q9wg3j30nz0qdgrg.jpg?alt=media\&token=82445730-2e50-4432-b2e9-016ce6647c01)



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FfSC6atsHEE7G0vXhanjT%2Fdf7eff1c485029f1272bbe8e13b30505_008idDKsgy1h1e01ywo5xj30ur0pkwmo.jpg?alt=media\&token=66a11df4-e4c8-49ca-882c-b77de33a3c77)



​跳出狐狸窗口，点击确认​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FF3GETVIR5ixxDRlmdLNp%2Fb034af5b37c5b47e7bd270810751f88f_008idDKsgy1h1e02e37m5j30il0uwdly.jpg?alt=media\&token=46f15cfc-960d-4aa4-84ba-72b402f8509b)



### **​再去质押你的 LP 代币，赚去 Pancake 平台代币激励**

​

点击“Farms”



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FHF2KWkAhFiTrItOnwaQs%2Fe0cfdf661f1dea11ce52915f789097dc_008idDKsgy1h1e02z2aumj30ur0c1q63.jpg?alt=media\&token=305a5f1a-afb7-46f2-bf08-77c478daafe0)



在搜索栏，输入“usdt”，点击下面 USDT-BNB



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FbA0rgpdMoKAMKZuGJ6U3%2F7e505e79510dd07b9ceb9559bb9dbb16_008idDKsgy1h1e03i1wjkj30ur0dtq7k.jpg?alt=media\&token=17213090-2b43-4c45-bc4f-402c28593ec8)



点击“Enable”​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FymkOHkzvA9dpiBZxuK5n%2Fed5a9c6ff73352aae15519188b010ab7_008idDKsgy1h1e041n5ejj30ur063gno.jpg?alt=media\&token=5f1c47c3-1220-450d-9240-90248891edc0)



跳出狐狸窗口，点击确认



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FjcQmWRuOUcScHMYld6NH%2Ffa03c1fad3ab458cee5cbf7d137584dd_008idDKsgy1h1e04gf3osj30i00v2agq.jpg?alt=media\&token=e9e892e9-61bf-4135-a24d-20f794bfc0da)



点击“Stake LP”​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FqDsj30nhnubGaUy6HLth%2F99b533af44b8d6b02308aac0cf028253_008idDKsgy1h1e04yay0bj30ur05l76m.jpg?alt=media\&token=03249292-0bb8-4142-a5de-455be32f58b4)



​​点击“max”，在点击“Confirm”



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FUiGcjbbk6DR3I6Z4k1bH%2F33a83b9447f367c2c88a741e14e484d3_008idDKsgy1h1e05c2crkj30oo0jjafd.jpg?alt=media\&token=b5f9d78f-6e2f-4b5c-a616-2ccf3afaa77e)



跳出狐狸窗口，点击确认​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FuuxMMFe651l4wi3si7gW%2F1091483ff6ddb53634226105ffbbc359_008idDKsgy1h1e061uqq2j30iy0vhq8w.jpg?alt=media\&token=9f7cbd59-a11f-43af-9574-b82c513fd60a)



​左边就是可提取的 LP 收益，右边是你质押的 LP



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2Fqbx6cqjY0hNyiuqeP3RB%2F6b67e7fb24ecdc6e46947f6a3d95bbc7_008idDKsgy1h1e06iohxlj30ur06gq5u.jpg?alt=media\&token=6009d57d-2a26-4790-8cff-ae3ff09e17a9)



**如何取消 LP？**

&#x20;

​点那个减号



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FjJc0dePGeV9BrvJtFVf2%2Ffa6cddd873d9e8c5c908347c463a5d2e_008idDKsgy1h1e0778hjgj30uq05v40h.jpg?alt=media\&token=31d77bbb-0e0b-4897-90fc-2edf83b54fa0)



点击“Max”，点击“Confirm”​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FqP7f3yl0FcEhLilsMttj%2F8b195dd47f9167ab00c657d24765b756_008idDKsgy1h1e07ih7y0j30oi0erq79.jpg?alt=media\&token=f1b4b85e-da7b-4eb9-b0d4-1a4d4717224a)



跳出狐狸钱包，点击确认



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FBg3VHJxaXF2xSytZ2auu%2F451444d2aaef2b8283f01b723986b3fa_008idDKsgy1h1e07uk6lkj30is0gqq6i.jpg?alt=media\&token=ebc685f2-ba04-43d7-9a70-d175b9439299)



回到“Liquidity”页面​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FaaoXsE4Bk4hrBuLK83tP%2F3aa2546607b0596dffc6eec0b62f46ed_008idDKsgy1h1e08gacq9j30s609jgnw.jpg?alt=media\&token=9cccf02b-d85c-4e03-8dc1-f84d9c6b3dc7)



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FkrEycD2Z71nV4bgp4SRO%2Fd98385270b2703a6b8d42fbadbc7f8c6_008idDKsgy1h1e08nd1a1j30ur0qjjya.jpg?alt=media\&token=acb91d4e-aeaa-4492-9de2-23567f5f66d8)



点击“Remove”



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FiwAdCAWPjrAmGze3i7sJ%2Faa60b5e22724a1edf0b6a3a08bce8a7c_008idDKsgy1h1e092o8hyj30qa0o87aa.jpg?alt=media\&token=cb4356a5-2dd2-489f-8547-573bba86d6fd)



点击“Max”，在点击“Enable”​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FFWDEqmcC4MnLWOojmR2w%2F11ab014f2e9de1da2bf687c76dc67e93_008idDKsgy1h1e09nrkgzj30qz0zpqaa.jpg?alt=media\&token=53b9e299-c232-4998-ad33-386f021e4f3d)



点击签名



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FvXsUAmH1fmBYbEpE4GZl%2Fcf9fbfa771cd153a165c2e4d51c6e512_008idDKsgy1h1e09zbbw2j30ij0vc110.jpg?alt=media\&token=9a4ad1a0-b3f4-40f1-b5c1-6aae6e14e235)



​点击“Remove”​​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FooYscpBcdJ3QmienABTX%2Ff6aac57fe4a14033ebc618103bfec81d_008idDKsgy1h1e0ac8hxsj30o20xe0z2.jpg?alt=media\&token=76a2b03b-63ed-49ad-a987-5fdf23a873ca)



点击“Confirm”​



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FnavSR867XPlhLTD1IxjR%2F86abb8f87c2d539d611af6f42dae0702_008idDKsgy1h1e0bbo58zj30ur0l00yj.jpg?alt=media\&token=dc1a8dce-9089-4934-99c1-2d010ba8bf05)



最后在狐狸窗口确认就行了，质押的币就到了你的钱包了



![](https://3992198910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMUnuyzmjRuPmBDiTwZ5i%2Fuploads%2FUyrXOIiG483L5YaoT0Bz%2F17f955fc1dfc32858ea66ea256f34583_008idDKsgy1h1e0bya3dvj30j20v6q86.jpg?alt=media\&token=cd033291-400c-4777-b9c6-0fa4be3e83aa)
