Getting Started With Milkomeda Djed On C1 Testnet
As you may have heard from our previous post, we are launching an implementation of the Djed stablecoin protocol on Milkomeda C1 testnet for the entire community to have an opportunity to safely experiment with one of the newest DeFi protocols in the space. As this is on Milkomeda C1 testnet, there is no risk of losing money, but instead acts as a learning experience where users can get free testnet milkADA to test the protocol out.
In this post we will take you step-by-step through the entire process of setting up a wallet, getting testnet tokens from the faucet, all the way to buying and selling testnet StableDjed and ReserveDjed in the web dApp!
Connecting Metamask to the Milkomeda C1 Testnet
First, install MetaMask for Chrome (or your preferred browser). Then, click the Chrome Extensions icon (as seen below)
and select MetaMask. Within the MetaMask window, click “Get Started” and then “Create a Wallet”. Set a wallet password and click through the rest of the setup screens. When finished, you should have a new empty wallet, as shown below.
Next, select the network dropdown at the top right of the MetaMask window.
From the dropdown list, select “Add Network” and enter the following:
Network Name: Milkomeda C1 Testnet
New RPC URL: https://rpc-devnet-cardano-evm.c1.milkomeda.com
Chain ID: 200101
Currency Symbol: milkTADA
Block Explorer URL: https://explorer-devnet-cardano-evm.c1.milkomeda.com
Click “Save”, and you should now see “Milkomeda C1 Testnet” in the network dropdown. Select this option to connect to the C1 testnet.
Acquiring Testnet milktADA From The Faucet
First, we must copy your account address. When using Metamask, you can do so by clicking on your address at the top of the Metamask window:
Afterward, we’re going to visit the faucet to acquire the milktAda: https://faucet-devnet-cardano-evm.c1.milkomeda.com/
Once at the faucet, input your account address into the input bar and press the “Request X mtADA” button next to it:
This will trigger a transaction from the faucet which will confirm within the next 10–20 seconds. You can verify you have received your testnet milkADA by checking your balance in MetaMask.
The Milkomeda Djed Web dApp
Now we get to the fun part; let’s interating with Milkomeda Djed!
To start, visit the web dApp at https://not-djed-devnet.milkomeda.com/reservedjed
At the top you’ll find a nav bar with various pages available for you to visit as shown in the screenshots below. The first image shows the navbar before connecting your wallet, and the second shows the navbar after connecting with MetaMask:
As such we have four pages are available on the website, with the fourth one becoming available after connecting your wallet:
- Protocol — the front page, a brief overview of the state of the protocol can be seen, including nominal prices for buying/selling coins.
- StableDjed — the page dedicated to trading StableDjed, the stablecoin of the protocol. On the left side you can view the summary from the “Protocol” page, while the right side of the page is dedicated to the trading interface.
- ReserveDjed — the page dedicated to trading ReserveDjed, the reservecoin of the protocol. The page’s layout is essentially the same as the previous page, just dedicated to the reservecoin.
- My Balance — the page that only appears after you’ve connected your Metamask wallet. This page summarizes your balances of StableDjed, ReserveDjed, and milktADA.
Connecting Metamask To The Web dApp
In the top right corner of each page, there should be a “Connect Wallet” button:
If you have Metamask installed, after pressing this button, you should automatically be connected, possibly after being asked by Metamask to enter your password. After connecting, the “Connect Wallet” text on the button should change to an abbreviated version of your address, and the wallet icon should change to the Metamask icon.
Alternatively, you can connect by pressing one of the “Connect with Metamask” buttons on the bottom left on the “Protocol” page and the bottom right on the “StableDjed” and “ReserveDjed” pages. The process is the same as with the “Connect Wallet” button.
Make sure your Metamask is set to the “Milkomeda C1 Testnet” network (you should see a warning on the trading pages if it’s not).
Buying And Selling ReserveDjed And StableDjed
From the previous sections we’ve managed to accomplish:
- Installing Metamask and creating an account;
- Connecting Metamask to the “Milkomeda C1 Testnet” network;
- Acquiring milkTADA from the faucet;
- Connecting Metamask to the Milkomeda Djed web dApp
Now with all of the prerequisites out of the way we can get to the exciting part; using the Djed protocol!
Via the navbar at the top to navigate to the StableDjed page or the ReserveDjed page. You will find the trade interface on the right side of the screen — it is very similar for both types of coins as well as for buying vs. selling:
Before entering a valid amount:
After entering a valid amount:
Let’s first briefly go over the various elements of this interface, from top to bottom:
- A “Buy” / “Sell” selector to specify the type of transaction you want to make;
- An input bar to specify the amount of coins to buy/sell. If the amount entered is invalid, it will be outlined with a red border;
- A “MAX” button is present on the right end of the input bar to allow you to automatically enter the maximum amount of coins you can buy/sell;
- A quick summary of your balance in the coin being traded and in milktADA;
- Text information summarizing the sale information;
- A button labeled “Buy/Sell StableDjed/ReserveDjed”, depending on your configuration, to execute the transaction.
Now let’s go over each element in more detail. At the top of the trading interface, you can select one of the “Buy” / “Sell” buttons to determine which operation you want to execute. For extra visual clues, the color changes depending on which button is selected — blue for “Buy” and red for “Sell”:
To decrease the chance of selecting the wrong type of coin (StableDjed / ReserveDjed) or the wrong type of operation (buy / sell), multiple messages appearing in the interface will change depending on these choices — read the information shown to ensure you have selected correctly.
The input bar, just below, specifies the amount of coins you want to buy/sell. If you enter an invalid amount (because of an insufficient balance or because the operation would put the protocol’s reserve ratio outside the acceptable range), the input bar will be marked with a red border indicating an error, as shown below, and you will be unable to execute the operation:
To obtain a valid amount, you can press the MAX button on the right of the input bar — it will automatically fill the input bar with the maximum amount of the particular coin you are able to buy/sell based on your funds and the protocol state. This value and any value lower than it will work.
Right below the input bar, provided you have connected your wallet, your balances are shown:
Below that, the summary of the trade corresponding to the amount you entered in the input bar is shown:
The fee is a fixed parameter of the protocol that is added to the nominal price when buying and subtracted from the nominal price when selling. Note that this does not include the gas fee. Other than that, you see the planned trade summarized — what you will pay and what you will receive if you decide to make the trade.
To finalize the trade, press the button at the bottom of the page marked “Buy StableDjed”, “Sell StableDjed”, “Buy ReserveDjed”, or “Sell ReserveDjed”, depending on what kind of transaction you have chosen:
Note that you will only be able to press the button if you have connected your Metamask wallet, are connected to the correct network, and have entered a valid amount into the input bar. After pressing the button, the page will show a pending modal window in the foreground, and a Metamask dialog box should appear:
Press “Confirm” in the MetaMask dialog box and wait for a few seconds. The modal window should change depending on the result of the transaction:
Afterward, you can close the modal window to return to the coin page by using the “X” button in the top right corner or use the “Check your balance” link at the bottom to go directly to the “My Balance” page. Your balances should now be updated with the results of the transaction.
Conclusion
And just like that, you have successfully set up a wallet with Milkomeda C1 testnet, acquired test funds from the faucet, and interacted with Milkomeda Djed.
This is an exciting moment for the ecosystem as it exemplifies how Milkomeda can be a great testbed for the latest innovations, while providing end users safe and streamlined experiences for getting a taste of the latest and greatest DeFi and dApp technology.
For more information about the specifics of the Milkomeda Djed implementation and how Milkomeda offers each L1 ecosystem numerous benefits as both a sandbox and a production-ready EVM deployment target, check out our previous post where we covered all of this and more.
Website: www.milkomeda.com
Twitter: @milkomeda_com