<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arun Shekhar</title>
    <description>The latest articles on DEV Community by Arun Shekhar (@devstardude).</description>
    <link>https://dev.to/devstardude</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F537999%2Ff71cf741-4723-4bcc-b88c-f9fa0953a378.jpg</url>
      <title>DEV Community: Arun Shekhar</title>
      <link>https://dev.to/devstardude</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devstardude"/>
    <language>en</language>
    <item>
      <title>Aave explained</title>
      <dc:creator>Arun Shekhar</dc:creator>
      <pubDate>Sun, 11 Dec 2022 14:53:22 +0000</pubDate>
      <link>https://dev.to/devstardude/aave-explained-3po2</link>
      <guid>https://dev.to/devstardude/aave-explained-3po2</guid>
      <description>&lt;p&gt;Index&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is Aave&lt;/li&gt;
&lt;li&gt;Traditional Bank money market vs Aave crypto market&lt;/li&gt;
&lt;li&gt;Collaterals in Aave&lt;/li&gt;
&lt;li&gt;Aave market, interest rates and supported chains&lt;/li&gt;
&lt;li&gt;Risks involved&lt;/li&gt;
&lt;li&gt;Step by step tutorial to Lend, Borrow and Repay money on Aave&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;&lt;strong&gt;What is Aave&lt;/strong&gt;&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;Aave is a decentralized finance (DeFi) platform that allows users to borrow and lend cryptocurrencies. It is built on the Ethereum blockchain and uses a protocol called "smart contracts" to facilitate lending and borrowing.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;&lt;strong&gt;Traditional Bank money market vs Aave crypto market&lt;/strong&gt;&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;1) &lt;u&gt;Traditional Banks money market&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lender has cash or cash based assets which he lends to the bank, then the bank uses their reserves to lend the cash to borrowers.&lt;/li&gt;
&lt;li&gt;Borrower needs to pay high interests on their loans and also provide something as a collateral, for example their house. If for any reason the borrower fails to pay their loans, bank can take the house to suffice for the money they lent.&lt;/li&gt;
&lt;li&gt;Also another thing to notice is that lender get very less interest on their deposited assets in the bank.&lt;/li&gt;
&lt;li&gt;It is a centralized form of market&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2) &lt;u&gt;Aave money market&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Aave is decentralized, free, open for all and every asset is crypto based.&lt;/li&gt;
&lt;li&gt;Lenders can put their crypto based tokens in the equidity pool and can earn a transparent interest rate depending upon the demand and supply of the crypto they put in the market.&lt;/li&gt;
&lt;li&gt;While borrowers have to put crypto based collateral in the market to borrow the crypto based assets from aave.&lt;/li&gt;
&lt;li&gt;The borrowed money is always less than the collateral depending upon the given limit. for example you can borrow 80% of the ETH you put in aave as collateral, so if you put $10,000 worth of ETH, you can only borrow $8000 worth of value.&lt;/li&gt;
&lt;li&gt;The lender have no direct contact with borrower and their identity remain anonymous to each other, everything happens through a smart contract and automated process.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;&lt;strong&gt;Collaterals in Aave&lt;/strong&gt;&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffst2r40lbrzp6nynk44t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffst2r40lbrzp6nynk44t.png" alt="collatoral" width="800" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Over collateralization&lt;/strong&gt;: As you can see here, every token has its own LTV(Loat to value) percentage, this determines how much loan you can borrow respective to your deposited value cryptocurrency. This is called Over collateralization. It is done so that Lenders never loses their money.&lt;/li&gt;
&lt;li&gt;There are many strategies people use to leverage this technique and gain profits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;u&gt;Aave market and interest rates&lt;/u&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ifu7xvdu3avoqgdd48p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ifu7xvdu3avoqgdd48p.png" alt="aave market" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here you can see Ethereum market, number of assets that are available, interest provided by each assets, total supply, total borrowed etc.&lt;/li&gt;
&lt;li&gt;This is a open market and interest rates are calculated based upon the supply and demand by the protocol.&lt;/li&gt;
&lt;li&gt;High utilization rates means very competitive interests.&lt;/li&gt;
&lt;li&gt;You can know more about the liquidity and returns of the token by opening it on the platform&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbhe9rb27iz5cvg30897.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbhe9rb27iz5cvg30897.png" alt="Dai" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Aave is a multichain protocol and supports many chains that are compatible with EVM network.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxq6omxsjvbca01ujgh9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxq6omxsjvbca01ujgh9.png" alt="Image description" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;&lt;strong&gt;Risks involved&lt;/strong&gt;&lt;/u&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;u&gt;Smart contract risk&lt;/u&gt;: Each markets/protocol depends on a smart contract which dictates supply and demand of the assets. If there is a vulnerability within the contract, hackers might be able to exploit it, which puts the assets at risk.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Blockchain risk&lt;/u&gt;: Smaller chains might be prone to get hacked, so choosing your chain wisely is the thing to prioritize.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Liquidation risk&lt;/u&gt;: If you borrow a lot of money and value of your assets falls, then you could be liquidated. &lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Asset risk&lt;/u&gt;: Each assets have their own risks of loosing their value.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;u&gt;Step by step tutorial to Lend and borrow money on Aave&lt;/u&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;1) Go to aave website and launch the app, you will land here &lt;a href="https://app.aave.com/" rel="noopener noreferrer"&gt;Aave app&lt;/a&gt;. Connect your wallet(I'm using Metamask here) with your desired chain. I have connected to Polygon market here.&lt;/p&gt;

&lt;p&gt;2) Here you will see your available assets, choose an asset and click on supply button.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwr1fx6cf94zd58vr8cw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwr1fx6cf94zd58vr8cw.png" alt="available assets" width="800" height="529"&gt;&lt;/a&gt;&lt;br&gt;
3) Select the value of token you want to deposit and then click on 'supply'. Confirm the Metamask transaction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdicxhoynondgk1t8094a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdicxhoynondgk1t8094a.png" alt="Image description" width="636" height="679"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) All done, you should be able to see your Net worth now. (which you can make $10B by chrome dev tools and give yourself momentarily happiness until the next browser refresh XD )&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx3ur2l8nk1rpuyof3f5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx3ur2l8nk1rpuyof3f5n.png" alt="Assets" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5) To borrow assets, You can see 'Assets to borrow' on same screen down below. Select your desired token and click on borrow button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvkzfh94ozzs4iim1kmt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvkzfh94ozzs4iim1kmt.png" alt="Borrow" width="800" height="719"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6) You should see this screen. From here you can select Variable or stable interest.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Variable interest can increase and decrease depending upon the reserve in pool, while the stable interest will remain same.&lt;br&gt;
Also you should consider checking your health factor.&lt;/p&gt;

&lt;p&gt;Your health factor and loan to value determine the assurance of your collateral. To avoid liquidations you can supply more collateral or repay borrow positions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Click on 'Borrow', confirm metamask transaction and soon the amount will be credited into your metamask.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flimegtal3barg0gtrqk7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flimegtal3barg0gtrqk7.png" alt="Image description" width="562" height="844"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7) You should now be able to see your borrows on the same page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7t8tdka0wa3uhzbcund.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7t8tdka0wa3uhzbcund.png" alt="Borrow" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8) When you're ready to repay the asset, click on repay. You can chose the amount to repay also the source you want to repay from i.e. Wallet or collateral. Then approve and Repay through metamask transaction. Now all your debts are gone. Good job!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyj239ug1til2803j0fdn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyj239ug1til2803j0fdn.png" alt="Image description" width="553" height="901"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Wrapping up... there are many more topics left to cover in aave such as Flash loans (You have to pay as soon as you take the load i.e. within transaction time, it could be as small as 13 seconds) which could be covered in separate article.&lt;br&gt;
Thanks for your time.&lt;br&gt;
Cheers.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>Uniswap explained</title>
      <dc:creator>Arun Shekhar</dc:creator>
      <pubDate>Sun, 11 Dec 2022 12:26:00 +0000</pubDate>
      <link>https://dev.to/devstardude/uniswap-explained-52bn</link>
      <guid>https://dev.to/devstardude/uniswap-explained-52bn</guid>
      <description>&lt;p&gt;&lt;strong&gt;Index&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is Uniswap&lt;/li&gt;
&lt;li&gt;How to exchange tokens&lt;/li&gt;
&lt;li&gt;How to open position in Liquidity pools (providing liquidity) and earn revenue&lt;/li&gt;
&lt;li&gt;Major improvements in Uniswap v3 vs v1 and v2&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;u&gt;What is Uniswap&lt;/u&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Uniswap is a decentralized exchange (DEX) built on the Ethereum blockchain. It allows users to easily trade Ethereum-based tokens without the need for a centralized authority or intermediaries. This makes it a popular choice for those looking to trade cryptocurrencies in a trustless and secure manner.&lt;/p&gt;

&lt;p&gt;Uniswap was created in 2018 by a developer named Hayden Adams. The platform uses a unique liquidity pool model that allows it to function without the need for traditional order books. Instead, users who provide liquidity to the platform earn a portion of the trading fees generated by the DEX.&lt;/p&gt;

&lt;p&gt;In brief, Here are some key features of Uniswap&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offers users a simple,decentralized and trustless way to trade Ethereum-based tokens.&lt;/li&gt;
&lt;li&gt;Its unique liquidity pool model and automated trading processes make it a popular choice among those looking to participate in the DeFi ecosystem.&lt;/li&gt;
&lt;li&gt;This platform is automated and uses smart contracts to automatically execute trades, which ensures that they are completed quickly and without the need for manual intervention.&lt;/li&gt;
&lt;li&gt;Uniswap is currently one of the largest and most successful DeFi projects, with a total value locked of over $4 billion.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;u&gt;How to exchange tokens&lt;/u&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;1) Since Uniswap is decentralized platform, you don't have to sign up for an account, just make sure you're on the right platform.&lt;br&gt;
&lt;a href="https://app.uniswap.org/#/swap"&gt;Uniswap&lt;/a&gt;&lt;br&gt;
2) You can see the total liquidity and volume of trades going on, on this link &lt;a href="https://info.uniswap.org/#/"&gt;Uniswap-info&lt;/a&gt;, high volume will result in high gas prices because of high strain on the network&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vxzSbmGH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t0nifeht592s7lorqu1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vxzSbmGH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t0nifeht592s7lorqu1p.png" alt="Liquidity" width="880" height="374"&gt;&lt;/a&gt;&lt;br&gt;
3) Below you can see top tokens and top pools on the platform with their price and other information&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You might wonder what is wrapped BTC, Wrapped BTC (or WBTC) is a version of the Bitcoin cryptocurrency that has been converted into a form that is compatible with the Ethereum blockchain. This allows it to be easily exchanged and used in various Ethereum-based decentralized finance (DeFi) applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sinD8NGp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3gncr61f0ajm9658tcuw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sinD8NGp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3gncr61f0ajm9658tcuw.png" alt="Tokens" width="880" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) Getting back to swap page, You will see a simple exchange interface where you click the "Connect Wallet" button. This will prompt you to connect your Web3 wallet to the platform such as Metamask. After connecting your wallet, your current chain will be shown in the UI. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YT98miTz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pv8dpl26j5se0shq2zko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YT98miTz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pv8dpl26j5se0shq2zko.png" alt="swap" width="880" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5) By clicking on Select Token button, you can select your desired token or paste the token contract address.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rxkYQXGH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mfvfnn7agc7algzuskoe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rxkYQXGH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mfvfnn7agc7algzuskoe.png" alt="Token" width="880" height="772"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6) After selecting the token, the calculated exchange price will be automatically show, you can alter the values of one token as your liking and new exchange price will be automatically reflected&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ih3pM1N3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2motww68y1j3pb41zq5z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ih3pM1N3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2motww68y1j3pb41zq5z.png" alt="exchange" width="880" height="662"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7) After clicking swap you'll see this prompt. Here are few things you should know before swapping.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;u&gt;Expected output&lt;/u&gt;: Amount of token you should get during the exchange disregarding gas price.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Price impact&lt;/u&gt;: The impact of gas price on expected output, it means this much amount will be deducted.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Minimum amount received after slippage&lt;/u&gt;: Amount you might receive after deduction and slippage. &lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Liquidity provider fee&lt;/u&gt;: Small amount of fees user have  to pay while trading to the users who provide liquidity to the pools.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Slippage: It refers to the difference between the expected price of a trade and the actual price at which the trade is executed. It typically occurs when there is a high level of volatility in the market or when there is a large difference between the expected and actual amount of an asset being traded. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZELwDYoP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l3rbehfxj4yd4f7hy79i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZELwDYoP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l3rbehfxj4yd4f7hy79i.png" alt="swap" width="661" height="873"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8) You can adjust allowed slippage and transaction deadline by clicking on setting icon. (if the transaction is not successful under the deadline, it will be cancelled)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2a7c18M2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s493fp5p9ksojwmga7j2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2a7c18M2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s493fp5p9ksojwmga7j2.png" alt="deadline" width="745" height="613"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;9) After clicking on confirm swap, your metamask wallet prompt will be opened, click on confirm to start the transaction. You can click on 'View on Etherscan' to view the transaction on chain explorer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YEYTMSWl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ervj5iblma043742dtht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YEYTMSWl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ervj5iblma043742dtht.png" alt="polygon explorer" width="880" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;10) Congratulations, you just learned how to swap tokens on Uniswap.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;u&gt;How to open position in Liquidity pools (providing liquidity) and earn revenue&lt;/u&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;1) Go to &lt;a href="https://app.uniswap.org/#/pool"&gt;Pools&lt;/a&gt; on uniswap and click on 'Add position'.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2HTZV2D_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cn1n36jyf6qsaiz829rf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2HTZV2D_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cn1n36jyf6qsaiz829rf.png" alt="Add position" width="880" height="613"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) Select a token and choose your pair, Below you'll see the percentage of revenue you want to generate. It is a good choice to choose stable pairs, because with high reward come high risks too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qjR0ZLrn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q2tzif52y6ioe8fy6ebq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qjR0ZLrn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q2tzif52y6ioe8fy6ebq.png" alt="pair" width="502" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) After that choose your price range in which you want to set stop loss (explained in detail in next section), then choose your amount of tokens you want to add.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OmiO8PbO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bcybqlkvvry2ur4ioj4l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OmiO8PbO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bcybqlkvvry2ur4ioj4l.png" alt="tokens" width="880" height="607"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) After clicking on preview, you'll see this. Most important thing to notice is if the current price of USDC per MATIC went below the min price, all tokens will be converted to MATIC and in other case into the USDC.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ucUwD4A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9xus4nabfw9pgmoe1ic2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ucUwD4A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9xus4nabfw9pgmoe1ic2.png" alt="add liquidity" width="513" height="748"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5) Click on 'Add', confirm transaction from metamask and you'll now see your position listed on the website as a NFT.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mNzm4vFB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1i8elgvl3hsxvh5n915f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mNzm4vFB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1i8elgvl3hsxvh5n915f.png" alt="nft" width="799" height="766"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;u&gt;Major improvements in Uniswap v3 vs v1 and v2&lt;/u&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Current version of Uniswap works on V3 and it has significant changes about how investor can add and maintain liquidity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_j_FLpkG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mgcwmp4pqqcq5g0u0u48.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_j_FLpkG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mgcwmp4pqqcq5g0u0u48.png" alt="improvements" width="513" height="748"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Concentrated liquidity&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vpv2qGYm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mre7yeuuorxdgsppik1t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vpv2qGYm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mre7yeuuorxdgsppik1t.png" alt="concentrated liquidity" width="880" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before V3, while providing liquidity user provided liquidity for the complete price range (Complete red line curve as shown in diagram), which was not very efficient as in stable coins most of the trades happens in a certain limit of price range.&lt;/li&gt;
&lt;li&gt;So V3 introduced a concept of Concentrated liquidity for liquidity providers where they can select the price range in which they want to provide liquidity and earn profits for all the exchanges happens in that range.
This also reduced the risk of impermanent loss&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;u&gt;Impermanent loss&lt;/u&gt;: It refers to the situation where the value of the assets that a liquidity provider has deposited into the platform decreases relative to the value of the tokens that they receive in return.&lt;br&gt;
For example, if a liquidity provider deposits $100 worth of ETH and $100 worth of a stablecoin into a DEX liquidity pool, they may receive 200 tokens in return. If the value of ETH subsequently decreases relative to the stablecoin, the liquidity provider may experience a loss.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;2) NFT Liquidity tokens&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uniswap gives a NFT liquidity token when you add the liquidity in the pools and it is redeemable which means you can claim your assets back anytime. NFT will be burned after transfer is complete. It can also be traded with other users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This just covered the few of the major improvements, you see more in details on Uniswap docs.&lt;/p&gt;

&lt;p&gt;Thank you for your time.&lt;br&gt;
Cheers.&lt;/p&gt;

</description>
      <category>uniswap</category>
      <category>defi</category>
      <category>exchange</category>
    </item>
    <item>
      <title>How to deploy React app on remote Linux server using NGINX in Linode</title>
      <dc:creator>Arun Shekhar</dc:creator>
      <pubDate>Wed, 29 Jun 2022 10:57:42 +0000</pubDate>
      <link>https://dev.to/devstardude/how-to-deploy-react-app-on-remote-linux-server-using-nginx-in-linode-3iid</link>
      <guid>https://dev.to/devstardude/how-to-deploy-react-app-on-remote-linux-server-using-nginx-in-linode-3iid</guid>
      <description>&lt;p&gt;Before deploying our React application, Let's know what Linode is. &lt;br&gt;
&lt;strong&gt;Linode products, services, and people enable developers and businesses to build, deploy, and scale applications more easily and cost-effectively in the cloud.&lt;/strong&gt; &lt;br&gt;
Check out their Website &lt;a href="https://www.linode.com/" rel="noopener noreferrer"&gt;Linode&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's get started. The first thing you need to do is to Register yourself on the Linode website, which is a simple process. After filling up the required information, it will take some time for you to access your Linode dashboard&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcpq8mf0dwezja4sx8yy.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcpq8mf0dwezja4sx8yy.jpeg" alt="Linode Dashboard"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Setting up Linux Server
&lt;/h2&gt;

&lt;p&gt;1) Click on &lt;strong&gt;Create Linode&lt;/strong&gt;, proceed to choose &lt;strong&gt;Distribution&lt;/strong&gt; and &lt;strong&gt;Location&lt;/strong&gt; of your remote Linux server. I have chosen Debian 11(Latest) and Mumbai(nearest).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95omhsy8bh8syowy0dcz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95omhsy8bh8syowy0dcz.png" alt="Create Linode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) After that Chose the Linode plan. Just for the testing purpose I'm choosing the cheapest plan there is i.e. Shared GPU Nanode 1GB, You should choose a Dedicated GPU with higher RAM and CPU if you want to deploy your application in Production for optimized speed and performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzhgzlzw4db41rqwg1x2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzhgzlzw4db41rqwg1x2.png" alt="Linode plans"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) Give your Linode a nice name in Label and choose a secure root password. Don't forget this password we are going to use it later on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fba52ibw6i3nkwe8psayb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fba52ibw6i3nkwe8psayb.png" alt="Name and password"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) Once that is done, Click on &lt;strong&gt;Create Linode&lt;/strong&gt;. It will take some time, when it's running you'll see this page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fdvms5i4lcksqyk76id.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fdvms5i4lcksqyk76id.png" alt="Running Linode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5) Now copy the SSH Access which looks like this &lt;code&gt;ssh root@194.195.112.114&lt;/code&gt; and then open a bash terminal in your local system. &lt;/p&gt;

&lt;p&gt;6) Copy the &lt;strong&gt;SSH Access&lt;/strong&gt; in your terminal and press Enter, type &lt;strong&gt;Yes&lt;/strong&gt; on next prompt and then enter your root password that we created in the start.&lt;/p&gt;

&lt;p&gt;7) Next thing we want to do is to make our server more secure by updating it so type these commands in your terminal next&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$apt update
$apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;8) We also need to configure time zone manually to prevent any issues with our server. Write this in your terminal. It will open a GUI in which select the city nearest to you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$dpkg-reconfigure tzdata - set timezone
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;9) Now we are going to add ourself as an admin and disable the default root user. for this type in terminal and after that create a new password. It will ask for some basic details next but it's optional except name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$adduser &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;10) Let's add this new user to Admin group next.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$adduser &amp;lt;username&amp;gt; sudo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;11) To check if creating new admin was successful or not, Type &lt;code&gt;logout&lt;/code&gt;in terminal and use SSH Access with new username. This will log in your new admin id.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ssh &amp;lt;username&amp;gt;@194.195.112.114
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;12) Next we need to disable the root user for security purpose. for that write these. Now you won't be able to login using root SSH.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo passwd -d root
$sudo passwd -l root
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;13) Now that our server is secured, Time to install NGINX in the server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo apt install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;14) We now need to make a directory in our server where our code will be stored.&lt;br&gt;
The name of the folder can be the domain name if you have already purchased any, or the public IP address of our server. We will use IP address for testing purpose here. We also need to setup few permissions for this directory so type the following commands in your terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo mkdir /var/www/194.195.112.114
$sudo chmod 755 -R /var/www/194.195.112.114
$sudo chown -R &amp;lt;username&amp;gt;:www-data /var/www/194.195.112.114
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;15) Another thing we need is to create configuration file for NGINX. It will open a writable window.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo nano /etc/nginx/sites-available/194.195.112.114
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that write this, then press &lt;code&gt;ctrl+s&lt;/code&gt; and exit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server{
  listen 80;
  listen [::]:80;

  root /var/www/194.195.112.114;
  index index.html;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;16) Let's make this default config for our directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo unlink /etc/nginx/sites-enabled/default
$sudo ln -s /etc/nginx/sites-available/194.195.112.114 /etc/nginx/sites-enabled/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's test if that worked&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo nginx -t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see &lt;code&gt;test is successful&lt;/code&gt; dialog. After that we need to restart the NGINX&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo systemctl restart nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Congratulations 🎉, we are done with setting up our server and directory. We now just need to push our react code into the server. Let's keep going.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Setting up React and writing deployment script
&lt;/h2&gt;

&lt;p&gt;1) Create a fresh react app using command &lt;code&gt;npx create-react-app &amp;lt;project-name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2) Now in root folder make a new file &lt;code&gt;deploy.sh&lt;/code&gt;, and write these commands in there.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "Switching to branch master"
git checkout master

echo "Building app... (Can also use npm instead of yarn)"
yarn run build

echo "Deploying files to server..."
scp -r build/* &amp;lt;username&amp;gt;@192.46.214.84:/var/www/194.195.112.114

echo "Done!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Write this command in your root directory to make &lt;code&gt;deploy.sh&lt;/code&gt; executable&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$chmod u+x deploy.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) Now that &lt;code&gt;deploy.sh&lt;/code&gt; is executable, write this command to deploy it. After a prompt to enter admin password the React app will be deployed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$./deploy.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;🥳 Congratulations, Your React app now is live at the Public IP Address which was &lt;code&gt;194.195.112.114&lt;/code&gt; in this tutorial.&lt;/strong&gt;&lt;br&gt;
You can paste this directly into your browser to view the page online.&lt;/p&gt;

&lt;p&gt;I hope it was helpful for those who were looking for this particularly.&lt;br&gt;
Alternatively you could have also used other services for react app hosting like Netlify, Firebase, GitHub pages etc.&lt;/p&gt;

&lt;p&gt;Please do tell what are your preferences in hosting your web application.&lt;br&gt;
Thank you. Have a nice day 😊.&lt;/p&gt;

</description>
      <category>react</category>
      <category>linux</category>
      <category>nginx</category>
      <category>linode</category>
    </item>
  </channel>
</rss>
