I tried providing liquidity in a liquidity pool in DeFi, part 2, my procedure and numbers
TLDR made about 65 $Alph tokens 'for free' but the price of $Alph tokens went down over the period
The bottom line is I earned about 65 ALPH tokens in 3 weeks but lost on paper about $312. I started with 442 ALPH tokens at $3 per token (442 x 3 = $1,326) and ended up with 507 ALPH tokens at $2 per token ($1,014). I never sold my ALPH, so the loss is purely a paper loss.
Here is the link to the previous article
I would also like to welcome the new subscribers who have joined since the last article
The Setup: Wallet and Acquiring ALPH
To start, you first need a wallet.
First, you need a mobile wallet for Alephium. Head over to the Alephium site here and download your wallet. I used the mobile wallet for an iPhone.
Get some tokens. If you already own some ALPH tokens, you can skip this stage. If not, head over to Gate.io. You can also use MEXC.com, Bitget.com, or Uniswap.org, but I have never used those platforms.
You will need a Chrome-based browser, as Gate.io does not work well with Safari.
You will need to go through the process of opening an account (a bit cumbersome) and become comfortable with the site. This can take some time. The good thing is there is no real KYC here, so Gate.io will ask you to set up several passwords for making trades and withdrawing. Do it! It is your only form of protection. If someone tries to impersonate your account, there will be no easy recourse. Of course, do not leave any money on the exchange after you have finished.
I sent some BTC from a private wallet to Gate.io.
Exchanged my BTC to USDT
Exchanged my USDT to ALPH
Withdrew the ALPH from the exchange and sent them to my wallet, the one downloaded in step 1.
Pitfalls and Fees
There are several tokens on the exchange that have similar names. Here is what you might see.
You want the first token in the list. This one
Regarding fees, they were not cheap on Gate.io. All in all, 2 transfers from my BTC wallet to Gate.io, exchanging to USDT then to ALPH, cost me about $45 in fees. However, once you are in ALPH, fees are almost zero. Network fees in ALPH to send to my ALPH wallet were 1-2 cents. Once on the DEX in ALPH, all the fees for all the transactions that followed came to a total of about 25 cents. To be honest, I do not know the exact amount, because many transactions cost me less than a cent.
How to get on the Dex (Ayin is the name of the Dex on Alphium blockchain)
To trade on Ayin, the DEX of Alephium, you need an address on group zero, because Ayin is on group zero. To do that, follow this procedure (thanks to Vlad @vladmoshnyager for helping me out with getting the wallet set up).
Next, go over to Ayin on your desktop computer.
2. Connect your wallet to the DEX.
- To do this, click on ‘Connect’ button in the upper right hand corner, select ‘wallet connect’. You should have a QR code appear on your screen (all this on your desktop browser, Safari or Chrome based browser both work)
- go to your wallet on your phone, open it. Click this icon in the upper right corner
Scan the QR code on your desktop, with your phone. You will get this screen
Tap on Accept on your phone.
Your wallet is now connected to the DEX.
Every time you perform an action on the exchange, you will receive a prompt on your phone to accept the transaction. If you don’t confirm, the transaction will not happen. Most people don’t realize that this is the difference between TradFi (traditional finance) or a CEX (centralized exchange). This is where the magic happens. In TradFi or a CEX, if your broker wants to liquidate your account, they can do it! They have the keys; you don’t! Here, that is not possible.
Now, to add liquidity to a liquidity pool, you will need equal amounts of both currencies to start. I contributed to two liquidity pools: ALPH/USDT and ALPH/AYIN.
Here, I simply followed the procedure you can read on this excellent thread by @_nop33
https://x.com/_nop33/status/1779338761534689572.
I used Ron LP ( https://rondex.xyz/lp-tool/ ) tool to estimate my balances.
Here are the tables of my daily performance.
On may 19 I removed all the assets I had on Ayin dex. These were the balances.
Lessons learned
Bottom line is, I ended up with 507.08 Alph tokens. I initially contributed 442 Alph tokens on April 29, at that time the Alph was worth 3$ thus a total value of 1’326$. At the end of the exercise Alph was worth 2 $.
So in dollar terms I lost money, but I acquired more Alph for free. This does not bother me, as I am fundamentally positive on Alph. If you look closely, you will see that when the price of Alph in $ terms went down I got more Alph tokens and conversely when when the $Alph price went up, there were less $Alph in the Liquidity pool but more Usdt.
A liquidity pool is no different than your bureau de change down the street. You start with 2 baskets of 2 different tokens like Usdt and Alph, both baskets weigh the same amount in dollar terms, but have different amounts of tokens in them. The amount of tokens in each basket will evolve over time, but each basket will alway weigh the same as the other basket. However the cumulative weight of both baskets will evolve over time. That is your market risk. If everyone wants your Alph, you will end up with few Alph in the liquidity pool and a lot of Usdt. Everybody comes and takes out Alph, because they want it, and the put Usdt in the other basket. In fact the amounts of tokens are slightly increasing, because the DEX takes a fee off each trade and this accrues to the liquidity providers. Furthermore, the Dex is giving you tokens of the Dex, Ayin tokens. It is a bit like getting shares of the bureau de change to thank you for contributing liquidity. This adds up as well.
So there you have it, that is what I did. To be honest, many years ago, I traded interest rate swaps, currency swaps, bond futures, eurodollar futures almost daily, but I did not know how a liquidity pool worked. I never traded forex. A liquidity pool of 2 tokens is really just like trading chf/euro, but you are not in a bank. This is why I say Defi, is just re-inventing tradfi on another platform with a new technology. I admit however that new technology will probably lead to new products that don’t exist now
Would I play bigger after this experience?
No, here is why.
The risk that the Dex get’s hacked. It is like saying you are leaving the vault with all the cash in the public square and you are sure nobody can break into it.
Maybe the people who created the Dex can run off with the money. I did not audit this. In other words, you contributed money to the bureau de change down the street, but in fact the people running it have the keys and they disappear with your money. (Rug pull, this has happened many times)
I have not audited the code of the code of the Dex nor Ron Lp. But it is publicly available to be audited. When I trade something seriously I want to know exactly how everything is calculated and which variables have a big impact. Even if a good source told me the code was audited and secure, I would not feel confortable playing big. I would need more time with no hacks.
But it definitely was a good experience and I am closer to potentially using Defi for myself.
Finally, I would like to thank @vladmoshnyager for his input. He mentioned that I did not talk about 'impermanent loss'. I did not, because anyone who has been a market maker in traditional finance is aware of it. It is certainly not unique to DeFi. Essentially, it is the fact that you sold your position little by little as the market was going up (because you are a market maker and people want the asset), so you made less money than if you had not sold. Market makers in the past simply showed a high offer price hoping the buyer would go elsewhere. Then banks separated their desks into two types of traders: proprietary traders taking a directional view and market makers, whose role was to provide liquidity to the clients of the bank. That is what you are doing when you are a liquidity provider—providing liquidity. You recieve tokens for ‘free’ to thank you, but the price of the token fluctuates with the market.
Useful links
gate.io https://www.gate.io/fr
Discord Alphium https://discord.com/channels/747741246667227157/877932296005619754
Discord Ayin https://discord.com/channels/1072030870938075247/1074234453288820796
Great read! Thanks for using my tool! -Ron