<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by MiKi Digital on Medium]]></title>
        <description><![CDATA[Stories by MiKi Digital on Medium]]></description>
        <link>https://medium.com/@miki.digital?source=rss-8510bfdf9847------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8CKQcEv0WTzCKPk550eMag.png</url>
            <title>Stories by MiKi Digital on Medium</title>
            <link>https://medium.com/@miki.digital?source=rss-8510bfdf9847------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:24:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@miki.digital/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Evolution of Liquidity Provision in DeFi]]></title>
            <link>https://medium.com/miki-dev/evolution-of-liquidity-provision-in-defi-1e93f16b3a30?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e93f16b3a30</guid>
            <category><![CDATA[liquidity-pool]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[uniswap-v3]]></category>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Sat, 11 May 2024 04:30:14 GMT</pubDate>
            <atom:updated>2024-05-11T05:26:38.399Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>You want to swap from currency A to currency B, how do you do that?</blockquote><p>You go to the bank. What if there’s no bank? You go ask your friend. Imagine if your friends come together and pool all their money for you and others to be able to exchange freely, but in turn they take a fee for their services. That’s what a liquidity pool is — <strong>a pool of tokens A and B secured and guarded by Smart Contracts.</strong></p><h3>AMM(Automated Market Market)</h3><p>An automated market maker is the most typical LP currently, pioneered by Uniswap V1 and used in Uniswap v2 and it’s forks. In this case you provide liquidity over the whole range.</p><p>IImagine the Y-axis as amount of money supplied and X-asis as the asset price</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W9gnuQS88ucJfnDZK-vI5g.png" /><figcaption>A poorly drawn representation of an AMM</figcaption></figure><p>As you can see the liquidity is evenly distributed. This makes it easy for people to start supplying liquidity and earning fees — you deposit your money into the smart contract and are good to go. <strong>But there can be a number of drawbacks associated with this:</strong></p><ol><li><strong>Impermanentl loss(IL) — </strong>imagine you have <em>100 tokens A worth 100$</em> and <em>100 tokens B worth 100$</em>. You supply them into the pool. <br>Someone swaps 90 tokens B for 90 tokens A. You have 190B and 10A in your pool. <br>An hour after that Elon Musk tweets about token A and its price grows to 10$ instead of 1$. You have <strong>190(B) * 1 + 10(A) * 10 = 390$</strong>. <br>But you could’ve had <strong>100 * 10 + 100 * 1 = 1100$</strong> if you haven’t provided liquidity in the first place. Of course you earned some fees, but those are much less than the <strong>~700$ you gave up because of LP</strong>.</li><li><strong>Low capital efficiency</strong> — since your liquidity is spread out from 0$ to infinity, you can’t “<strong>concentrate</strong>” your liquidity in the current price range. In other words with an AMM you can’t specify how much liquidity and where you want to provide, so some of your liquidity remains never used. For example a tighter range makes sense for stablecoins — on V2 DAI/USDC pair it reserves just ~0.50% of capital for trading between $0.99 and $1.01 , the price range in which LPs would expect to see the most volume and consequently earn the most fees. <strong>So with a an AMM your capital efficiency is low as well</strong></li><li><strong>Higher slippage</strong> — as liquidity is spread out, there’s less of it in the current price, so slippage experienced by traders is higher as well.</li><li><strong>Inability to bet on the market sentiment</strong> — Let’s say you do ETH — USDT LP(liquidity provision) and think ETH will go take a dip and then go up, then there’s no sense for you to supply liquidity during the dip, as you’ll be experiencing more IL — <strong>people will buy ETH for a “discounted” USDT price</strong>. Then as ETH goes back up you might end up with <strong>70%</strong>(or other arbitrary number) of USDT in your LP and only <strong>30</strong>% ETH, while the most profitable outcome would be having <strong>100%</strong> ETH or at least <strong>50% USDT 50% ETH</strong>.</li></ol><h3>CLMM</h3><p>Concentrated Liquidity market maker is exactly what is sounds like — <strong>it allows you to specify at what range and how much liquidity(tokens) to provide</strong>. Instead of distributing your tokens over an (almost) infinite range, you can “concentrate” your liquidity so it has the highest demand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9DBCLVlIm6_RTqDEsy-aSg.png" /><figcaption>Poorly drawn represenation of CLMM</figcaption></figure><p>Uniswap V3 were the first to implement this <a href="https://blog.uniswap.org/uniswap-v3">https://blog.uniswap.org/uniswap-v3</a>.</p><blockquote>CLMM provide up to <strong>4000x</strong> higher capital efficiency relative to Uniswap V2, lower slippage for traders, and less IL.</blockquote><p><strong>However on volatile asset pairs it comes with one serious downside</strong></p><blockquote><em>You always have to manage your liquidity or your capital efficiency becomes 0</em></blockquote><p>If it’s a stablecoin pair(USDC — DAI), you can supply your liquidity to a 0.99–1.01$ dollar range and forget about it. But what if it’s <strong>USDC — ETH</strong>, or <strong>ETH — UNI</strong>, etc.? For those volatile assets prices can change quite frequently so you have two options</p><ol><li>Spread your liquidity over a bigger range decreasing capital efficiency</li><li>Actively manage your liquidity decreasing your free time and social life(lol)</li></ol><p>Actively managing your liquidity allows you to bet on the market sentiment, only supplying liquidity when the price goes up and minimizing IL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pmWM7FJO9EF3Wl6sNHCxw.gif" /><figcaption>Courtesy of Maverick protocol</figcaption></figure><p>Same can be applied for betting on a bearish market</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zYi3ySkJmggRaYSvylYqKg.gif" /><figcaption>Courtesy of Maverick protocol</figcaption></figure><blockquote>But actively managing your LP is also quite gas inefficient as you have to rebalance often, and hard to get right manually since prices fluctuate often.</blockquote><p>So how do you solve this?</p><h3>Managed Liquidity CLMM</h3><p>Next step of the evolution is a managed liquidity CLMM —<strong> it has the same UX as an AMM, where you just deposit your money and earn yeilds, paired with the same capital efficiency an CLMM has</strong>. It uses Smart Contracts, price oracles and custom strategies to automatically rebalance and swap your liquidity.</p><p>Strategies which different protocols have are(see pictures above):</p><ul><li>“<strong>Bull mode</strong>” — only providing liquidity when price goes up, allowing you to bet on the market reducing your IL</li><li>“<strong>Bear mode</strong>” — only providing liquidiy when price goes down, allowing you to bet on the market reducing your IL.</li><li>“<strong>Mixed</strong>” — providing liquditiy all the time, automatically rebalancing and adjusting the range, best for mixed market conditions.</li></ul><p>Within Mixed some sub strategies can be disected(mostly taking inspiration from Kamino)</p><ul><li>“<strong>Volatile — Volatile</strong>” When LPing for 2 volatile assets which don’t follow each others movement</li><li>“<strong>Bluechip Volatile — Bluechip Volatile</strong>” when LPing for 2(or one) bluechip assets. Here protocols can hypothetically rely on mean reversion to rebalance more accurately</li><li>“<strong>Stable — Volatile</strong>” When LPing for a stablecoin and a volatile asset</li><li>“<strong>Stablecoin</strong>” — strategy with the tightest range</li><li>“<strong>LST</strong>” — also a strategy with a tight range</li></ul><p>Some protocols have their own pools, while the majority of them just routes their liquidity to established DEXes, like Kamino does with Meteor and Orca(2 of the biggest DEXes on Solana).</p><p>Managed Liquidity CLMM protocols are well on their way to becoming a liquidity layer for ecosystems, with most of the DEX LP volume passing through them. Because it’s just stupidly(in a good way) good:</p><ol><li><strong>It’s beneficial for the DEXes</strong> — Managed Liquidity protocols reduce the entry threshold to DeFi increasing user adoption. Managed Liquidity protocols and DEXs aren’t competitors, but partners.</li><li><strong>It’s a no-brainer for the user</strong> — increased capital effiency, less IL, pools from different DEXs aggregated in one place.</li><li><strong>It’s good for ecosystem wide liquidity</strong> — Managed Liquidity protocols reduce slippage so traders have an easier time, and increase TVL along with utilization, which are important parameters to the investors.</li></ol><p>For example, Kamino Finance — a managed liquidity protocol has higher TVL than any DEX on the market, as it supporting LPing into almost any of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*mMpCp2jYrylrXo2mZ2uKXg.png" /><figcaption>Kamino on the 3rd place in DeFiLlama</figcaption></figure><p>Newer protocols like Maverick or Kodiak have successfully raised(<a href="https://decrypt.co/215750/kodiak-finance-raises-2m-seed-round">Kodiak raise</a>, <a href="https://www.coindesk.com/business/2023/06/12/defi-protocol-maverick-raises-9m-led-by-peter-thiels-founders-fund/">Maverick raise</a>) and attracted a large user base. Kodiak, for example, is really driving the notion of becoming a one-stop liquidity hub for Berachain. Just like Twitter(X) is trying to become a super app, Kodiak has a managed and non-managed CLMM, full-range AMM, Incentive Layer and a Token Deployer factory. This underpins the fact how</p><blockquote>Managed Liquity CLMM are becoming the user facing interface, and regular DEXes are becoming a more behind-the-curtain tech.</blockquote><h3>Further reading</h3><ul><li><a href="https://medium.com/@med456789d/uniswap-v3-math-insights-part-1-of-6-f85e1597b411">An amazing series on the math behind uniswap</a>(good luck trying to digest it, since I couldn’t)</li><li><a href="https://blog.uniswap.org/uniswap-v3">Uniswap V3 release announcement</a></li><li><a href="https://docs.kamino.finance/">Kamino Finance docs</a></li><li><a href="https://docs.mav.xyz/">Maverick docs</a></li></ul><p>Hope you enjoyed this article!Wanna build some cool stuff together — reach out and <a href="https://calendly.com/miki-digital/30-minute-consultation">book a call</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e93f16b3a30" width="1" height="1" alt=""><hr><p><a href="https://medium.com/miki-dev/evolution-of-liquidity-provision-in-defi-1e93f16b3a30">Evolution of Liquidity Provision in DeFi</a> was originally published in <a href="https://medium.com/miki-dev">MiKi Blockchain</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web3 Backend architecture that works]]></title>
            <link>https://medium.com/miki-dev/web3-backend-architecture-that-works-d142d7d1a92e?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/d142d7d1a92e</guid>
            <category><![CDATA[socialfi]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Wed, 24 Jan 2024 21:49:25 GMT</pubDate>
            <atom:updated>2024-01-25T16:01:58.129Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TopkAP2G5EB2rFKY83akkw.png" /></figure><blockquote>Building a backend for a blockchain/web3 project is a completely different beast than in web2.</blockquote><p><strong>Isn’t backned mostly web2 tech, you may ask?</strong> While that’s partially correct, there are many tricky aspects when it comes to building backends for web3 apps:</p><ul><li><strong>Tight timelines &amp; budget</strong> — you don’t have time &amp; money to burn by hiring a devops team, configuring CI/CD and making a state-of-the-art microservice architecture. Things need to be simple, yet work flawlessly</li><li><strong>Caching</strong> — you often need to implement caching for RPC calls to the blockchain</li><li><strong>Compliance</strong> — since blockchain involves finance, you need to stay compliant with regulation</li><li><strong>Safety</strong> — Properly storing your private keys for Smart Contract invocations from the backend is key</li></ul><p>With the multitude of apps, of course there’s no one size fits all solution, but we want to share a blueprint we use and some of our go-to frameworks at <a href="https://miki.digital/">MiKi Digital</a></p><h3>Monolith vs Microservices</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SQ9PJ4NUQQ5UeyFJMHqqQw.png" /></figure><p>While from time to time we all want to imagine we are buliding the next google and create a state of the art microservice architecture, often — it’s not needed! <strong>Unless you plan on having extreme load from the start and can spare the time and money it costs to build a proper microservice architecture, and what’s more importantly — have the expertise to do so, you shouldn’t.</strong> Sticking with Monolith will give you good enough performance for 90% of your use cases.</p><blockquote><em>Don’t overengineer from the start, simplicity is the key to success.</em></blockquote><h3>NodeJS + TypeScript</h3><p>NodeJS is the industry standard solution, even though some recent competitors might take the crown from it soon. Let’s take a look at them:</p><ul><li><a href="https://deno.com/"><strong>Deno</strong></a> — a JS runtime with first-class TypeScript support. It might be a bit faster than NodeJS but doesn’t offer interoperability, so while the runtime might be mature and better than Node, the frameworks and community aren’t as good as in Node.</li><li><a href="https://bun.sh/"><strong>Bun</strong></a> — a JS runtime (almost)fully interoperable with Node, built in Rust for blazing-fast speed. You can use all the frameworks &amp; libraries that NPM has, while enjoying better performance &amp; faster compile times. While the vision is grand, at the time of writing this article Bun isn’t fully interoperable, which can bring some downsides. But if you are reading this a couple of months later — Bun might be a worthy competitor to NodeJS. <strong>Don’t forget to check it’s compatability with all the libraries you planning to use first</strong></li></ul><p>TypeScript is just how everyone does it at this point, some argue that it pollutes the code, however, with a strict config, e.g.</p><pre>{<br>  &quot;compilerOptions&quot;:{<br>    &quot;strict&quot;:false,<br>    &quot;noUnusedParameters&quot;:true,<br>    &quot;noImplicitReturns&quot;:true,<br>    &quot;noFallthroughCasesInSwitch&quot;:true,<br>    &quot;forceConsistentCasingInFileNames&quot;:true<br>  }<br>}</pre><p>It enforces you to think how you want the data to look, making it easier for other devs to understand the code.</p><h3>GraphQL Yoga + Nexus GraphQL</h3><p>The majority of developers use NestJS for working with GraphQL as it has first-class support and is dead-easy to get started with. However, does it make sense to bring a clunky BE framework into a project that needs to move fast, and work fast? Not really — NestJS comes with a ton of boilerplate code, following all those OOP, Dependency Injection, IoC, etc. patterns.</p><blockquote><em>Just because it has been the industry standart for many years, with languages such as Java and .NET having the same approach, doesn’t mean NestJS is the simplest way to solve the problem.</em></blockquote><p>Also, NestJS’s bundle size is <a href="https://medium.com/@miki.digital/reducing-lambda-bundle-size-with-esbuild-and-lambda-layers-c4803f1007cc"><strong>20</strong> <strong>times biggest than of the same solution but with NodeJs and some minimalistic libraries instead</strong></a><strong>.</strong></p><p>So we chose to go with pure NodeJS and a few libraries which allows us to have cleaner code and develop faster!</p><p>For GraphQL we can leverage <a href="https://the-guild.dev/graphql/yoga-server">GraphQL Yoda</a> — an amazing graphql server with a ton of out of the box features like caching, cookies, etc. Apollo Server is nice, but <a href="https://the-guild.dev/graphql/yoga-server/docs/comparison#graphql-yoga-and-apollo-server"><strong>GraphQL Yoga is the exact case where we can trade a bit of maturity(GraphQL Yoda is newer than Apollo) for some performance &amp; ease-of-use.</strong></a></p><p>I already made a rather <a href="https://www.linkedin.com/posts/mikhail-kedel_javascript-graphql-backend-activity-7021491967448543232-_zKJ?utm_source=share&amp;utm_medium=member_desktop">comprehensive review of code-first vs schema-first approaches</a>, in-short: <strong>I prefer code-first</strong>. And the perfect library for that is <a href="https://nexusjs.org/">nexus-graphql</a>: just a damn good library with everything you need for code-first graphql approach. We’ll show some code snippets of later in the article</p><h3>Authentication</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRdO5b8j5YajBw2tBBrHZw.png" /></figure><p>While we tried many solutions: like building a custom auth for every provider, but <strong>nothing comes close to firebase</strong> if you want to implement social login into your app(e.g. SocialFi). It’s an easy, yet powerful solution for login allowing you to authenticate with <strong>10+ providers</strong> by writing only a couple of lines of code.</p><p>For example, anyone who worked with Twitter Auth API will agree that doing it is quite tricky, but firebase simplifies it greatly. Also firebase has a nice dashboard to see and moderate your users, built-in email &amp; sms verification and super simple session management</p><h3>Account abstraction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*0MdBZhMx803Toq_HE9fDcQ.jpeg" /><figcaption>MetaKeep — our favorite account abstraction SDK</figcaption></figure><p>If you want to leverage account abstraction: <a href="https://metakeep.xyz/"><strong>MetaKeep</strong></a> is our favorite solution by far. We’ve tried many Account Abstraction SDKs</p><ul><li>Biconomy</li><li>Safe</li><li>Web3Auth</li></ul><p><strong>But they all do to much: handling actual authentication logic should be your concern.</strong></p><blockquote><em>Account Abstraction SDK should do just one thing: create a wallet from user’s data(e.g. email)</em></blockquote><p>To make your app as failure resistant as possible, it’s best to handle authentication yourself, and let the SDK only handle account abstraction. Which is exactly how MetaKeep does it: they have a “create wallet” <a href="https://docs.metakeep.xyz/reference/v3getwallet">endpoint</a> which creates a unique wallet based on user email. That’s it! - an effortless experience that MetaKeep has multiple patent protections on.</p><h3>KYC</h3><p>Regulations are coming to web3, whether you want it or not. Plus, KYC offers a way to prove that your userbase is legit, protect it from bots and more. But… <strong>how do you make KYC in web3?</strong></p><blockquote><a href="https://zk.me/">zkMe</a> is a truly zero-knowledge web3 identity solution, allowing you to KYC without storing ANY of the users’ data. They also have an anti-bot and a profiling suite</blockquote><p>It’s a pretty fool proof solution even compared to traditional KYC solutions, because you don’t store any of the users data, <strong>so there’s not risk of data theft/loss!</strong></p><h3>Image and File storage</h3><p>There’s a number of cost-efficient &amp; speedy CDNs. We chose firebase’s <a href="https://firebase.google.com/products/firestore">firestore</a>, as it fits all of our needs, and comes with a dead-easy API</p><p><em>File upload example:</em></p><pre>import { v4 } from &#39;uuid&#39;<br>import admin from &#39;firebase-admin&#39;<br><br>const bucket = admin.storage().bucket()<br><br>export const uploadFile = async (file) =&gt; {<br>  const extension = file.name.substr(file.name.lastIndexOf(&#39;.&#39;) + 1)<br>  const key = `${v4()}.${extension}`<br><br>  try {<br>    const buffer = Buffer.from(await file.arrayBuffer())<br>    const fileRef = bucket.file(key)<br><br>    const resp = await fileRef.save(buffer, {<br>      metadata: {<br>        contentType: file.type<br>      }<br>    })<br><br>    // Construct the file URL<br>    const fileURL = `https://firebasestorage.googleapis.com/v0/b/${process.env.FIREBASE_PROJECT_ID}.appspot.com/o/${key}?alt=media`<br>    return fileURL<br>  } catch (error) {<br>    console.error(&#39;Error uploading file to Firebase:&#39;, error)<br>    return null<br>  }<br>}</pre><p><strong>There are some honorable mentions</strong>, which might even be more cost-efficient than Firebase:</p><ul><li><a href="https://developers.cloudflare.com/r2/"><strong>CloudFare r2</strong></a> — fully AWS S3 compatible API, so if you find yourself limited by r2 you can switch easily. R2 is cheaper than firestore and AWS S3. It might be one of the best options on the market since it comes from a known player in the cloud industry — CloudFare, but is also quite cheap</li><li><a href="https://bunny.net/">Bunny</a></li></ul><h3>Database</h3><p>That’s one of the most opinionated choices, but our general, allbeit somewhat obvious guidelines are:</p><ul><li>NoSQL — where you need the read/write speed and don’t have many relations, for example — a web based messenger. Our NoSQL DB of choice is <strong>Mongo</strong>!</li><li>SQL — for relations and queries, can work for analytics and systems with somewhat simple relations — an NFT marketplace. Here we chose <strong>AWS’s AuraDB or equivalent</strong></li><li>Graph Databases — for complex relations and queries with extremely interconnected data, <em>although works fine for simpler relationships as well. W</em>e mostly leverage it in SocialFi. <strong>Neo4j</strong> is our tool of choice here</li><li>In-memory DBs — used for sessions. <strong>Redis</strong> is our go-to-choice here</li></ul><h3>Architecture &amp; Folder structure</h3><p>Whatever your framework and library choices are — folder structure is what makes or breaks the app. We try to stick to a minimalist, yet versatile and easy to use structure.</p><pre>.<br>└── src/<br>    ├── entities/<br>    │   ├── user/<br>    │   │   ├── mutations.ts<br>    │   │   ├── queries.ts<br>    │   │   ├── service.ts<br>    │   │   ├── db.ts<br>    │   │   ├── type.ts<br>    │   │   └── index.ts<br>    │   └── item<br>    ├── generated/<br>    │   ├── schema.graphql<br>    │   └── typings.ts<br>    ├── util/<br>    │   ├── auth/<br>    │   │   └── firebase.ts &lt;- For handling authentication<br>    │   └── random.ts &lt;- Example util for generating a random string<br>    ├── context.ts &lt;- For handling request context, like auth<br>    ├── index.ts<br>    ├── schema.ts &lt;- Main file for the graphql schema<br>    └── driver.ts &lt;- Database driver</pre><p>Instead of making the folders based on functionality, I split them by domain allowing to see all of the data related to an entity easier.</p><p>At the top of <em>src/</em> is <em>entities/</em> and each entity has a</p><p><em>db.ts</em> — all the database logic</p><pre>  export async function getUser(session, userId: string) {<br>    try {<br>      //This example uses neo4j but any db is applicable<br>      const result = await session.run(<br>        &#39;MATCH (u:User {_id: $userId}) RETURN u&#39;,<br>        {<br>          userId<br>        }<br>      )<br>      const user = result.records[0].get(&#39;u&#39;).properties<br>      if(!user) {<br>        //ERROR is our enum containing errors as codes for easier handling on the frontend<br>        throw new GraphQLError(&#39;User not found&#39;, { extensions: { code: ERROR.NOT_FOUND}})<br>      }<br>    } catch (e) {<br>      console.log(e)<br>    } finally {<br>      session.close()<br>    }<br>  }</pre><p><em>type.ts</em> — main file, describing our entity graphql type</p><pre>    export const User = objectType({<br>      name: &#39;User&#39;,<br>      definition(t) {<br>        t.nonNull.id(&#39;_id&#39;)<br>        t.nonNull.string(&#39;name&#39;)<br>        //other fields<br>      }<br>    }</pre><p><em>queries.ts</em> — graphql queries</p><pre>  import { getUser } from &#39;./db&#39;<br><br>  const getUserById = queryField(&#39;getUserById&#39;, {<br>    type: &#39;User&#39;,<br>    args: {<br>      id: nonNull(stringArg())<br>    }<br>    resolve: async (_parent, { id }, ctx) =&gt; {<br>      const session = ctx.driver.session()<br>      return getUser(session, id)<br>    }<br>  })</pre><p><em>mutations.ts</em> — graphql mutations</p><pre>  export const editProfile = mutationField(&#39;editProfile&#39;, {<br>    type: &#39;User&#39;,<br>    args: {<br>      name: nonNull(stringArg())<br>    },<br>    resolve: async (_parent, { name }, ctx) =&gt; {<br>      //Some logic<br>    }<br>  })</pre><p><em>service.ts</em> — any external api call, or other “service” layer logic can be put there</p><pre>  export const fetchIsUserVerified() {<br>    //Some network logic, e.g. fetching an external API like zkMe you use for user verification<br>  }</pre><p><em>index.ts </em>— all of the exports</p><pre>import { userMutations } from &#39;./mutation&#39;<br>import { userQueries } from &#39;./queries&#39;<br>import { User } from &#39;./type&#39;<br><br>export const userTypes = [<br>  User,<br>  ...userQueries,<br>  ...userMutations<br>]</pre><p>And finally — <em>src/schema.ts</em> combines all the entities in one schema</p><pre>export const schema = makeSchema({<br>  types: [...userTypes, ...otherEntityTypes, ...etc],<br>  outputs: {<br>    schema: `${__dirname}/generated/schema.graphql`,<br>    typegen: `${__dirname}/generated/typings.ts`<br>  }<br>})</pre><p><em>context.ts</em> — we mostly use it for handling authentication, so that every mutation/query can have access to the currently authenticated user</p><pre>  export interface Context {<br>    currentUser: VerifyPayload,<br>  }<br><br>  export async function createContext(initialContext: YogaInitialContext): Promise&lt;Context&gt; {<br>    return {<br>      //Some function getting the token from header/cookies of the request and returning the signed-in user based on that token<br>      currentUser: await verify(<br>        driver,<br>        initialContext.request,<br>      )<br>    }<br>  }</pre><p><em>index.ts</em> — setting up GraphQL Yoda</p><pre>  const yoga = createYoga({<br>    schema,<br>    context: createContext,<br>    plugins: [<br>      EnvelopArmorPlugin,<br>      useCookies(),<br>      fieldAuthorizePlugin()<br>      useResponseCache({<br>         // cache based on the authentication header(can also cache via a cookie)<br>         session: (request) =&gt; request.headers.get(&#39;authentication&#39;)<br>      })<br>    ]<br>  })<br><br>  // Pass it into a server to hook into request handlers.<br>  const server = createServer(yoga)<br><br>  // Start the server and you&#39;re done!<br>  const port = process.env.PORT || 4000<br>  server.listen(port, () =&gt; {<br>    console.info(`Server is running on ${port}`)<br>  })</pre><h3>Code formatting, linting &amp; build tools</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_sXfCaLlx-ifnH1gofgLEg.png" /></figure><p>We go with the industry standard</p><ul><li><strong>Eslint with airbnb config</strong></li><li><strong>editorconfig for the indendation settings</strong></li><li><strong>Husky for pre-commit hooks</strong></li></ul><p><em>Leveraging prettier can be useful, but in my mind it adds more overhead and issues that it solves, like rules conflicting with prettier</em></p><p>For build we use a combination of <a href="https://esbuild.github.io/"><strong>esbuild</strong></a> and <a href="https://www.npmjs.com/package/ts-node"><strong>ts-node</strong></a>, ts-node is the recommended approach by graphql yoga, so we use it in development. But to get that extra optimizations for production we leverage esbuild</p><h3>Cloud Deployment</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DTgL8dg1c4CyWGoCeQFJVQ.png" /></figure><p>When it comes to more complex backends we choose GCP or AWS, but when we need to push out the MVP as soon as possible — <strong>Railway is our best friend</strong>. It’s like Vercel but for the backend, <strong>combining fast performance with seamless deploys and out of the box CI/CD</strong>. No need to write hundreds of IaC lines, Railway does everything for you like enabling PR environments, so you can easily share your work with the team before it’s deployed anywhere.</p><blockquote>However, Railway isn’t as mature as GCP, so that’s something to keep in mind if you are expecting a lot of load on launch day</blockquote><h3>The end :)</h3><p>If you read so far — thank you, it was a huge one! We’d love to hear your thoughts in the comments, how do you architecture your apps? If you have any questions, or need help building an awesome blockchain project — reach out to us and we’d be happy to help :)</p><p><em>Need blockchain help? Feel free to </em><a href="https://www.miki.digital/contact"><em>contact us </em></a><em>or </em><a href="https://calendly.com/miki-digital/15min"><em>book a call</em></a><em>.</em></p><p><em>Written by </em><a href="https://www.linkedin.com/in/mikhail-kedel/"><em>Mikhail Kedzel </em></a><em>for </em><a href="https://www.miki.digital/"><em>MiKi Digital</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d142d7d1a92e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/miki-dev/web3-backend-architecture-that-works-d142d7d1a92e">Web3 Backend architecture that works</a> was originally published in <a href="https://medium.com/miki-dev">MiKi Blockchain</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethereum vs Bank. What’s gonna make you richer?]]></title>
            <link>https://medium.com/@miki.digital/ethereum-vs-bank-whats-gonna-make-you-richer-c0b84c814a28?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0b84c814a28</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Tue, 31 Oct 2023 11:54:21 GMT</pubDate>
            <atom:updated>2023-10-31T23:00:37.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFxDgqtMLWRZzM51UCtK3w.png" /><figcaption>Ethereum vs Bank</figcaption></figure><p>What’s the probability of you earning more investing in Ethereum than with a bank savings account? We’ll break it down step-by-step and back everything up with data!</p><h3>Getting the data</h3><p>For the bank data we’ll need a couple of things</p><ul><li>Inflation data</li><li>Data on APY’s of saving plans</li></ul><p>We can use <a href="https://fred.stlouisfed.org/docs/api/fred/">Fred</a>(<em>Federal Reserve Economic Data</em>) for this.</p><p>Interestingly, if we look at the average yearly inflation rate sometimes exceeds the average lending rate(the average yield on 10-year U.S. Treasury Notes).</p><blockquote>This means that if you’re unlucky, you can lose your money even if you put them into a bank.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w_74M_6cKkxljBkA_WtkUw.png" /><figcaption>Average yearly Inflation, Borrowing and Lending rates from 2004 till 2022</figcaption></figure><p>Especially from 2020, simply keeping your money in a bank might actually mean losing it.</p><p>Now, let’s gather Ethereum&#39;s data</p><ul><li>We can assume Ethereum staking APY is 3.6%, which might be lower than you could get. But <a href="https://studentsunionucl.org/clubs-societies/consulting-society">RocketPool</a> currently offers you 3.6%, and <a href="https://lido.fi/">Lido</a> offers 3.8%.</li><li>Ethereum price data from Coinmarketcap.</li></ul><h3>The calculations</h3><p>Ethereum made its appearance in 2015, but its price really flew in 2018, so to avoid huge numbers(<em>think how much you’d make by investing in Ethereum in 2015</em>), we’ll start from 2018.</p><p><strong>To see how often Ethereum would prevail, we need to consider every combination of start and end date. </strong>However, taking data for <strong>every day</strong> would be too difficult to calculate and visualize comprehensibly. So we’ll take it <strong>every month</strong> instead.</p><p>To calculate Ethereum ROI for a given period, we can use this formula</p><blockquote>ROI = Initial_Investment * (eth_period_end_price / eth_period_start_price) * staking_multiplier</blockquote><p>So, for example, were you to pick the worst possible option and invest 10k$ in ETH in <strong>2018–01–31</strong> and pull out in<strong> 2019–01–31,</strong> you’d be left with 991.78$. Or vise-versa, you could <strong>quadruple</strong> your money by investing at the right time.</p><p><strong>But, hold on, it’s not as much gambling as it sounds!</strong></p><p>To compare Ethereum with the bank, let’s calculate the bank&#39;s ROI</p><blockquote>Interest Rate minus The inflation rate is what is called the <strong>Real Interest Rate</strong></blockquote><h3>Visualizing the data</h3><p>A nice way of presenting our data would be through a heat map. Let’s plot Ethereum&#39;s final investment value with blue representing lower and red representing higher numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*cMbQJLXvkBc8KQ5RA31_xw.png" /><figcaption>Heatmap for the final value of an investment into Ethereum</figcaption></figure><p>Now, the same for Banks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*v-QJUbMF-qFdrGO0F9hnsg.png" /><figcaption>Heatmap for the final value of an investment into a Bank</figcaption></figure><p>As you can see, due to the inflation rate usually being very close, if not more than the lending rate, the final investment value is very close to 10,000$ at all times.</p><h3>The comparison</h3><p>Let’s calculate the difference between our final values and map this difference in a heatmap.</p><ul><li>Negative numbers will mean that Bank was better than Ethereum</li><li>Positive numbers mean Ethereum was better.</li></ul><p>Negative numbers will be colored from red to black, black being the most drastic difference. In contrast, positive numbers will be colored from blue to green, green being the most drastic difference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_SAsUGqmRPlfezeW4AAVw.png" /></figure><p>As you can see, the biggest part of the heatmap is, indeed, blue</p><blockquote><strong>TLDR; Go invest all your life savings in Ethereum, and you’re on your way to becoming a millionaire</strong></blockquote><p><strong>Just kidding!</strong> As you can see from the heatmap, at times, investing int Ethereum can be <strong>much</strong> worse than the bank. However, Ethereum can be an inflation hedge if used with caution and research.</p><p>I hope this article gave you some interesting insights, but always remember DYOR(Do Your Own Research)!</p><p><em>Originally written by </em><a href="https://www.linkedin.com/in/mikhail-kedel/"><em>Mikhail Kedzel</em></a><em> for </em><a href="https://www.miki.digital/"><em>MiKi Digital</em></a></p><p><em>Need blockchain help? Feel free to </em><a href="https://www.miki.digital/contact"><em>contact us </em></a><em>or </em><a href="https://calendly.com/miki-digital/15min"><em>book a call</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0b84c814a28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Staking platform for #1 Korean NFT Startup]]></title>
            <link>https://medium.com/miki-dev/staking-platform-for-1-korean-nft-startup-0db8e25b5731?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/0db8e25b5731</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[staking]]></category>
            <category><![CDATA[nextjs]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Sat, 21 Oct 2023 11:06:51 GMT</pubDate>
            <atom:updated>2023-10-21T11:06:51.946Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w66lEs2aOhIP8yyzjBVgdw.png" /></figure><p><a href="https://www.supernormal.art/">SuperNormal</a> is a premium NFT startup and the <strong>#1 top-grossing Web3 brand in Korea with &gt;$100M by volume traded</strong>. They needed to develop a staking platform quickly to support their transition from hard-staking to soft-staking and allow users to track their points.</p><h3>Sleek UI and great UX</h3><p>We needed to match the name SuperNormal’s title of a premium, art-focused society and develop a stunning yet straightforward design.</p><p>It all starts with a login screen for the user to link their wallet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JP-TqjkJioG3XU_HNFUAzw.png" /><figcaption>Login page</figcaption></figure><p>SuperNormal’s customers can be fitted into multiple categories:</p><ul><li>Those who haven’t staked their NFT</li><li>Those who staked and then unstaked</li><li>Those who staked, then unstaked, and then staked again</li><li>Mixed</li></ul><p>The UI had to allow each of those users to see which NFTs they have, and transition them to soft-staking easily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qg8fdHe20WQtrGbVDEKnPQ.png" /></figure><p>The next tab in the menu was a comprehensive overview of all the zips the user has</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-M4ZdVlpYOyCbw2pJfDOw.png" /></figure><p>The original staking contracts were on Ethereum, but for keeping track of the user points, we used Polygon because of its low fees and faster transaction times</p><p>To track the points, we:</p><ul><li>Upgraded the original contract to send data to the data bridge every time there is a token transfer</li><li>Deployed a bridge contract on ETH Mainnet so data can be sent to Polygon automatically</li><li>Deployed a receiver contract on Polygon to receive data</li><li>Deployed the points contract on Polygon as the database</li></ul><p>In the end, <strong>our staking was fully on-chain</strong>. Which makes it more secure and transparent. <a href="https://medium.com/@miki.digital/off-chain-vs-on-chain-staking-d7787e686d2c"><em>Read our previous article to see a more in-depth break-down of on-chain vs off-chain staking</em></a></p><p>On the front end, we went with a tried and true combo of NextJS and Wagmi &amp; Viem. It provides unparalleled type safety and performance. SuperNormal has quite a big user base, so we used Alchemy — the web3 development platform, to handle requests to the blockchain.</p><p>Deploying on Vercel was a fool-proof choice since it also provided us with SEO and performance insights.</p><h3><em>What about performance?</em></h3><p>Even though the speed of blockchain queries limited us</p><blockquote>The website scored a performance score of 84 on Lighthouse — not too shabby!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lzCCqyICB3LLN0rsUoqlKg.png" /></figure><h3>The result</h3><p>Working together with SuperNormal, we created a stunning website to support their transition from hard-staking to soft-staking. After the launch, we rigorously monitored the transactions and made sure to promptly answer any queries the users might’ve had.</p><blockquote>Overall, the launch went smoothly, and we look forward to working more with SuperNormal!</blockquote><h3>Bonus: podcast with SuperNormal’s CEO</h3><p>We sat down with SuperNormal’s founder — <a href="https://www.linkedin.com/in/a24choi/">Andrew Choi</a> to record an episode for <a href="https://www.miki.digital/podcasts">MiKi Digital’s web3 podcast</a>. From his early days in Silicon Valley to pioneering a leading NFT startup, Andrew’s journey is nothing short of inspiring.</p><p><strong>Topics Covered:</strong></p><ul><li>Andrew’s transition from an engineer to CEO.</li><li>The inception and growth of SuperNormal, as well as future plans</li><li>Insights on the NFT market in Korea and globally.</li><li>Andrew’s prediction on the future of Blockchain.</li></ul><p>🎧 <a href="https://www.buzzsprout.com/2215303/13601119-andrew-choi-creating-an-nft-empire-in-south-korea"><strong>Tune in now to hear firsthand about the rise of SuperNormal and the evolving world of digital assets.</strong></a> Perfect for those interested in NFTs, entrepreneurial journeys, or tech industry insights!</p><p><em>Need blockchain help? Feel free to </em><a href="https://www.miki.digital/contact"><em>contact us </em></a><em>or </em><a href="https://calendly.com/miki-digital/15min"><em>book a call</em></a><em>.</em></p><p><em>Written by </em><a href="https://www.linkedin.com/in/mikhail-kedel/"><em>Mikhail Kedzel </em></a><em>for </em><a href="https://www.miki.digital/"><em>MiKi Digital</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0db8e25b5731" width="1" height="1" alt=""><hr><p><a href="https://medium.com/miki-dev/staking-platform-for-1-korean-nft-startup-0db8e25b5731">Staking platform for #1 Korean NFT Startup</a> was originally published in <a href="https://medium.com/miki-dev">MiKi Blockchain</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with Legacy Contracts in Solidity]]></title>
            <link>https://medium.com/miki-dev/working-with-legacy-contracts-in-solidity-c2ab2e25e941?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2ab2e25e941</guid>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[uniswap]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[usdt]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Mon, 16 Oct 2023 07:12:24 GMT</pubDate>
            <atom:updated>2023-10-16T07:12:24.692Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMn4Egw8jZ_C_RK9u_5c3w.png" /></figure><p>Recently I interacted a lot with Solidity smart contracts of <strong>strong and mature projects</strong> such as AAVE, Uniswap (v1-v2), MakerDAO, etc. These contracts were <strong>written using old solidity versions</strong> (&gt;0.7.0).</p><blockquote><em>I believe that every smart contract dev would eventually have to connect to one of such projects.</em></blockquote><p>What’s more, reading their (<em>sometimes</em>) outdated code is very <strong>beneficial in terms of learning security and gas efficiency</strong> aspects of development. As much as we love working with cutting-edge tech at <a href="https://www.miki.digital/industries/web3">MiKi</a>, oftentimes, you can’t escape legacy smart contracts.</p><p>I want to talk more about the tricky aspects of connection to such contracts, using as an example the smart contract of the <strong>USDT(Tether) token</strong>, which should be familiar to most crypto users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EnVqJHBqh-sj9alHAOfrEQ.png" /><figcaption>Tether(USDT)</figcaption></figure><h3>What’s wrong with USDT?</h3><p>The contract was deployed and submitted for verification in 2017 with the <strong>0.4.17 solc version</strong>.</p><blockquote><em>You may be surprised, but </em><strong><em>USDT,</em></strong><em> being one of the most popular tokens, is </em><strong><em>not ERC20 compatible.</em></strong></blockquote><p>I discovered it after trying to call the contract using <strong>IERC20(ERC20 interface) from the OpenZeppelin library.</strong> I received the op-code error.</p><p>The USDT contract has the following individual properties:</p><ul><li>Its transfer(), transferFrom() and approve() <strong>functions have no return value (should be bool)</strong></li><li><strong>Reapprove process</strong> is burdensome (you have to send 2 transactions if you want to change the allowance amount)</li><li>The contract has the functionality to use <strong>Blacklist (punish evil users)</strong></li><li>The contract <strong>has an owner (ownership not renounced)</strong></li><li>It has <strong>migration functionality</strong> (the token can migrate to another contract and the current one will be deprecated)</li><li>It uses <strong>outdated syntax</strong> unfamiliar to modern devs or compilers (constant keyword for function declaration, sub() and add() functions usage) and relies on the SafeMath library</li><li>Some of the functions’ and methods’ <strong>notes are inaccurate</strong> :)</li></ul><p>Luckily, the <strong>contract is well-structured</strong>, pretty simple, <strong>flattened, and has its interfaces defined.</strong> Thus, it’s <strong>possible</strong> to <strong>connect to it with modern versions of solidity</strong> with minor changes.</p><p>If I missed some interesting features or development aspects, please feel free to mention them in the comments. <strong>Thank you for reading!</strong></p><p><em>Written by </em><a href="https://www.linkedin.com/in/vladislav-lenskii-393697237/"><em>Vladislav Lenskii</em></a><em> for </em><a href="https://www.miki.digital/industries/web3"><em>MiKi Digital</em></a><em><br>Need blockchain help? Feel free to </em><a href="https://calendly.com/miki-digital/15min"><em>book a call</em></a><em> or </em><a href="https://www.miki.digital/contact"><em>contact us</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2ab2e25e941" width="1" height="1" alt=""><hr><p><a href="https://medium.com/miki-dev/working-with-legacy-contracts-in-solidity-c2ab2e25e941">Working with Legacy Contracts in Solidity</a> was originally published in <a href="https://medium.com/miki-dev">MiKi Blockchain</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Blockchain is the next step in Healthcare]]></title>
            <link>https://medium.com/@miki.digital/why-blockchain-is-the-next-step-in-healthcare-ca5cc227faa?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca5cc227faa</guid>
            <category><![CDATA[blockchain-healthcare]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[supply-chain]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 10:26:45 GMT</pubDate>
            <atom:updated>2023-10-03T10:26:45.451Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MifpTN9McCk4PRBW_gDmYw.png" /></figure><p>Don’t get me wrong — I’m happy when I see a new DeFi or MetaVerse application get funded, but I feel like it limits the perception of blockchain in the eyes of many people. So far, blockchain has been mostly used with some financial “<em>buy-sell</em>” marketplaces. Those are all great projects, but they highlight only a “<em>speculative</em>” nature of blockchain &amp; crypto</p><blockquote><em>You buy an asset only to sell it for a higher price later.</em></blockquote><p>There’s nothing wrong with that, but in this article, I want to explore another promising use case of blockchain — <strong>healthcare.</strong></p><p>Even though technologies have advanced, larger companies are still using older tech, and “<em>attacker</em>” companies are capitalizing on this by creating better user experiences.</p><p>But all health companies still face a number of <strong>fundamental issues</strong></p><ul><li><strong>Data security and integrity</strong></li><li><strong>Sustainability</strong></li><li><strong>Regulations</strong></li><li><strong>Optimizing the supply chain</strong></li><li><strong>User experience</strong> — this is different in developed vs under-developer countries, but many large health institutions lack a nice UI &amp; UX</li></ul><p>And blockchain is the perfect candidate to solve them all.</p><h3>Fixing supply chain with Blockchain</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bl_EIbUjxx5LgYEisa23Sg.png" /></figure><p>Let’s start with <strong>supply-chain</strong></p><blockquote><em>Almost 10.5% of the medications worldwide are either subpar or fake — </em><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10184969/#:~:text=The%20World%20Health%20Organization%20states,are%20either%20subpar%20or%20fake."><em>WHO</em></a></blockquote><p>With every 10th drug being fake, the supply chain <strong>HAS</strong> to do better. Incorporating blockchain can definitely help.</p><p>Blockchain is a</p><ul><li><strong>immutable</strong> — data can’t be changed once it’s written to the blockchain</li><li><strong>ledger</strong> — a record-keeping system, which is fully decentralized and distributed</li></ul><p>Those qualities make it a perfect choice for <strong>supply chain&#39;s digital transformation</strong> as it provides</p><ul><li><strong>Data integrity</strong> — thanks to immutability</li><li><strong>Transparency</strong> — all the authorized stakeholders can access the information in a safe, read-only way</li><li><strong>Regulatory ease</strong> — by providing a clear record of all the events in your supply chain, it can be easier to comply with regulations</li><li><strong>Automation</strong> — Smart Contracts can help remove a big chunk of manual labor</li><li><strong>Sustainability</strong> — if you see all the operations of your partners via blockchain, you can choose a partner which sources it’s prodcuts more sustainably. <strong>According to </strong><a href="https://www.mckinsey.com/~/media/mckinsey/industries/financial%20services/our%20insights/the%202022%20mckinsey%20global%20payments%20report/the-2022-mckinsey-global-payments-report.pdf"><strong>McKinsey 2022 global payments report</strong></a><strong>, sustainability is becoming a prevalent theme in finance as well,</strong> so banks might give better loan terms to sustainable companies</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*WlgzzXUmSTOM9tmfD7K95Q.png" /><figcaption>An extract from McKinsey 2022 global payments report highlighting the importance of sustainability(page 22)</figcaption></figure><p>However, there is one major challenge — supply chain involves multiple suppliers, manufacturers, and distributors, which can, in-turn have their internal suppliers, and so on. It might seem like you’ll have to <strong>transform the whole world with blockchain</strong>. Some major players are already adopting blockchain, but widespread adoption is still far.</p><blockquote>Therefore, your integration needs to have a more <em>Agile and iterative approach</em></blockquote><p>Instead of building the whole thing at once — start small and build on slowly. Integrating blockchain, even for one or two suppliers, will allow both parties(client and supplier) to see the cost-saving and productivity it brings. Later, you can use that <strong>success case</strong> to persuade other companies.</p><p><strong>But is the tech behind it ready?</strong> Such a digital transformation will require a permissioned blockchain since you don’t want every node in the world to be able to access your supply chain data. There’s already a list of great permissioned blockchains</p><ul><li><strong>Hyperledger fabric</strong></li><li><strong>Corda</strong></li><li><strong>Ripple</strong></li></ul><p>As you know, many blockchains are interoperable, so even if someone down the supply chain doesn’t use the same provider — you can still get the needed data.</p><p>Ultimately,<strong> the supply chain can be an amazing application of blockchain, reducing counterfeit drugs while improving productivity, transparency, and sustainability.</strong></p><h3>Enabling easier payment flow</h3><blockquote><em>Around 10% of adults in the UK and 14% in the US reported they held digital assets as a part of their savings.</em></blockquote><p>So, enabling cryptocurrency payments can simplify payments for a part of your userbase and, potentially, attract more tech-savvy users to your product.</p><p>Adding cryptocurrency as a payment option is just the <strong>tip of the iceberg</strong> when it comes to optimizing billing with blockchain. Thanks to Smart Contracts you can automate virtually every step in your process, for example, by automating insurance claims. Compliance is a two-edged sword in this case.</p><ul><li><strong>On the one hand </strong>— blockchain can make it easier to meet compliance requirements since all the data will be in one place, and all the claims will be easily verifiable.</li><li><strong>On the other hand</strong> — the regulatory landscape is still evolving, so there’s a risk that future regulations might jeopardize this “digital transformation”</li></ul><p>A couple of years ago, there was one more concern</p><blockquote><em>Scalability</em></blockquote><p>But with <strong>Layer 2 solutions,</strong> payments are getting much <strong>cheaper and faster.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihRdwom69I09vEJBif2GAg.png" /><figcaption>Visual representation of a blockchain</figcaption></figure><p>For example, on <a href="https://polygon.technology/">Polygon</a>, fees are <strong>7x</strong> times cheaper than on <a href="https://ethereum.org/en/">Ethereum</a>. Speed-wise, Polygon can handle around 7000 transactions per second, while Ethereum can handle around 27.</p><p>Furthermore, <strong>inclusion should be the main narrative in healthcare.</strong> Everyone, regardless of</p><ul><li><strong>social status</strong></li><li><strong>location</strong></li><li><strong>income</strong></li><li><strong>and other factors</strong></li></ul><p>should have access to quality healthcare. Especially in some areas of developing countries, people don’t have access to a traditional banking system while they still have a phone. The only requirement for a crypto wallet is</p><ul><li><strong>Internet</strong></li><li><strong>Mobile phone</strong>(or any other device)</li></ul><p>So, crypto payments could facilitate inclusion greatly and make international payments a breeze.</p><p>Of course, some regulatory issues still arise, but it’s our job to work together with governments to shape the brighter future of our world!</p><h3>Creating an incentive system with an ecosystem around it</h3><p>Incentivizing customers to follow healthy behavior has a proven track record of effectiveness.</p><blockquote><em>“Thus, an increase in physical activity as well as a decrease in caloric intake could be achieved by introducing positive or negative incentives, respectively, at least for those who displayed unhealthy behavior before.” — </em><a href="https://pubmed.ncbi.nlm.nih.gov/27926443/"><em>Source</em></a></blockquote><p>While, before, this had to be done with some in-app currency, now we have a standardized solution — blockchain. Thanks to interoperability, your app’s coin can be used in other apps easily. Blockchain provides you with an <strong>easy framework to build your currency and integrate it with the ecosystem.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yVu0K1p3pvJKfCeTP4ERxQ.png" /><figcaption>A chest full of blockchain incentives</figcaption></figure><p><strong>What do I mean by an ecosystem?</strong></p><p>I’m not saying that an average health tech patient will stake his tokens with leverage and proceed to do yield farming(<em>If you are confused by those terms, don’t worry, me too</em>). The blockchain transformation has already started, and bigger enterprises are trying hard to catch up. For example, in Korea</p><blockquote><em>One of the biggest companies — Kakao, is developing their blockchain Klaytn, and a token called KLAY.</em></blockquote><p>Kakao is the company behind the <a href="https://en.wikipedia.org/wiki/KakaoTalk">messenger, used by <strong>93% of the population</strong> in Korea</a>. Talk about mass adoption, huh? The problem with many incentive schemes — is that <strong>there’s no ecosystem</strong>. You can only spend your incentive in-app. But blockchain will allow you to tap into a huge ecosystem and <strong>attach real value to your incentive</strong>.</p><p>That’s a vision far into the future, but adopting blockchain now will allow you to</p><ul><li><strong>Have the first mover’s advantage — </strong>by already starting to build a relationship with bigger players on the market.</li><li><strong>Improve your marketing</strong> — having crypto as a payment option is a sure way to attract a younger, more tech-savvy audience.</li><li><strong>Automize your operations</strong></li></ul><h3>Using Zero-Knowledge for truly private telehealth</h3><p>Privacy concerns are one of the reasons preventing telehealth adoption.</p><blockquote><em>Patients often worry about the confidentiality and security of their health information when using telehealth platforms. — </em><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7577680/"><em>Sour</em>ce</a></blockquote><p>For example, a telehealth website might require users to be over 18 years old to access certain services. Let’s compare traditional and blockchain approaches:</p><ul><li><strong>Traditional</strong> — users typically need to submit a copy of their passport, driver&#39;s license, or another form of ID to verify their age. This exposes <strong>ALL</strong> of their personal info.</li><li><strong>Blockchain</strong> — Zero-knowledge technologies allow you to prove some claim without revealing anything else. You will only prove you are over 18 without revealing even your age to the telehealth website. All that the website will know is that you are over 18. Thus greatly minimizing the risk of data theft.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YQ7282n6pz8UyK5Diloc_A.png" /></figure><p>Collecting more data might be useful for research purposes, but blockchain allows to put users in charge of their data. And, perhaps, even monetize it — by revealing their gender, ethnicity, etc. to the website in exchange for some reward. All while being truly certain that <strong>if you agree only to share your gender, no other information will be given to the telehealth website.</strong></p><p><strong>Another venue of zero knowledge is verifying a doctor’s qualification</strong>. Making all claims about a doctor’s expertise easily verifiable brings patient’s trust even higher.</p><h3>Blockchain digital transformation challenges</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DrUmXymvKRA39gjzs59hUg.png" /></figure><p>There are a couple of challenges that product and service companies alike are facing when tackling digital transformation with blockchain. Since blockchain is decentralized, it can be hard to convince a business to put money and resources into something they don’t understand and can’t fully control.</p><blockquote><em>What do businesses care about the most? Money, or more precisely ROI — Return On Investment</em></blockquote><p>So a successful pitch to your client or superiors would have to include a careful analysis of current issues the company is facing, and assesing how blockchain could help improve the experience of current consumers and drive new ones.</p><p><strong>For example, if the business has mostly one-time clients,</strong> you can:</p><ul><li>Create an incentive scheme with blockchain — patients will be more inclined to come back if there’s some incentive for them to do so</li><li>Educate your patients about the sustainability of your offering by providing insights into your supply chain, which is made possible via Blockchain. Nowadays, customers are much more <strong>inclined to pay more even for the same offering if it’s more sustainable</strong>.</li><li>Offer crypto payment options — this won’t be a game-changer for 100% of your consumers but will help drive back that 5 – 10 % of your consumers, which can still make a huge revenue impact.</li></ul><h3>Conclusion</h3><p>Blockchain is our chance to fix the existing healthcare mistakes and put data and privacy in the user’s hands. This would allow to create a truly sustainable &amp; inclusive landscape, where users wouldn’t fear data theft and would be able to get quality healthcare regardless of their location or socio-economic status.</p><p>What are your thoughts on Blockchain in Healthcare?</p><p>Originally written by <a href="https://www.linkedin.com/in/mikhail-kedel/">Mikhail Kedzel</a> for <a href="https://www.miki.digital/">MiKi Digital</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca5cc227faa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Off-chain vs. On-chain Staking]]></title>
            <link>https://medium.com/@miki.digital/off-chain-vs-on-chain-staking-d7787e686d2c?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7787e686d2c</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[polygon]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[staking]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Tue, 12 Sep 2023 14:01:04 GMT</pubDate>
            <atom:updated>2023-09-12T14:01:04.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ITRQhzmMVbW2_2dz72SKQ.png" /></figure><p><strong>On-chain vs. off-chain</strong> is a long-standing debate. Staking is one of the things that can be done both on-chain and off-chain.</p><h3>What is staking</h3><p>Staking is crypto’s equivalent of “putting money into the bank”. It’s when you “lock up” a certain amount of cryptocurrency in a digital wallet to support a blockchain network. This helps the network validate transactions and create new blocks. In return, you earn rewards in the form of additional cryptocurrency. Staking is based on the proof-of-stake (PoS) consensus mechanism, where the more tokens you stake, the higher your chances of being chosen to validate transactions and earn rewards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2PvmwiVgtzS7L0Ya.png" /><figcaption>Courtesy of coinbase</figcaption></figure><h3>What’s the issue</h3><p>There are two main ways of staking: off-chain and on-chain. Let’s take a look at the benefits and downsides of each.</p><p>First, <strong>on-chain staking</strong> Benefits:</p><ul><li><strong>Increased transparency</strong> — Since everything is stored on the blockchain, it’s 100% transparent to the end user where his money goes.</li><li><strong>More secure</strong> — You aren’t storing your staking data in a centralized database, so your database provider can’t suddenly ban you.</li><li><strong>Cheaper</strong> — you don’t have to pay for database costs</li><li><strong>Easier to manage </strong>— no need to have backups, setup sharding, and everything else</li><li><strong>Better performance </strong>— If you have staking data on-chain, it’s going to be more automized than off-chain, which will lead to better performance</li></ul><p>Downsides:</p><ul><li><strong>More expensive to the end user</strong> — In on-chain staking, users will have to pay more gas when they stake and unstake</li><li><strong>Requires more blockchain knowledge — </strong>Hiring professional blockchain developers might be more expensive than backend devs(for off-chain).</li></ul><p>And, <strong>off-chain staking</strong> Benefits:</p><ul><li><strong>Cheaper to the end user</strong> — they have to pay less gas fees</li><li><strong>Flexibility</strong> — You can use any database your developers are familiar with to store the data</li></ul><p>Downsides:</p><ul><li><strong>Less trust in the project</strong> — users won’t know where their funds are going. Transparency is the sole reason behind crypto; with off-chain staking, it becomes much less transparent</li><li><strong>Centralization</strong> — Unless you use a decentralized DB, which you probably won’t, the project will be centralized. Which, again, goes against the nature of crypto</li></ul><h3>Is there a winner?</h3><p>Of course, you must pick the right approach based on your project. In an ideal world, on-chain staking would be your go-to choice 100% of the time and has no downsides. However, it’s not the case. Many startups often opt for off-chain staking as it’s cheaper to the end user(<em>less gas</em>) and to the company themselves(<em>a good Blockchain dev, on average, costs more than a Backend one</em>).</p><p>Can we improve the gas price downside of on-chain staking?</p><p>We absolutely can! By using Layer 2, your solution will be more performant, and gas prices will be much lower. Polygon is one of the most popular L2s, and, at the time of writing this article, on average, the fees are <strong>7x times</strong> lower on Polygon compared to Ethereum.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*zh3sms6f8TdREcqG.jpg" /><figcaption>Polygon Logo</figcaption></figure><p>Polygon is not the cheapest Layer 2, so you can find something even cheaper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*xSpZEfZU8Srr4we3pIlOuA.png" /><figcaption>Gas prices on 12.09.2023</figcaption></figure><p>Developer costs will still be higher, but a good Blockchain developer is your most valuable asset in Web3. This “investment” into a developer will bring more trust to your project, making it more secure and decentralized.</p><h3>Companies using off-chain and on-chain staking</h3><p>A lot of younger NFT companies use off-chain staking like Keungz, Metakongz. However, when it comes to older and more mature players like “The Bored Ape Yacht Club”, they prefer on-chain staking.</p><p>And, of course, all traditional staking projects, like <a href="https://rocketpool.net/">Rocketpool</a> and <a href="https://lido.fi/">Lido.fi</a>, <a href="https://www.eigenlayer.xyz/">EigenLayer</a> all use on-chain staking.</p><h3>Conclusion</h3><p>Storing everything on-chain is a bad idea, but if you plan to create a secure &amp; trusted project, staking on-chain is a good decision. You’ll undoubtedly need good devs to pull this off, but the investment is worth it.<br><strong>HOWEVER</strong>, it still has its downsides &amp; difficulties, which you must consider before investing time &amp; money carefully.</p><p><em>Need blockchain help? Feel free to </em><a href="https://www.miki.digital/contact"><em>contact us </em></a><em>or </em><a href="https://calendly.com/miki-digital/15min"><em>book a call</em></a><em>.</em></p><p>Written by <a href="https://www.linkedin.com/in/mikhail-kedel/"><em>Mikhail Kedzel </em></a>for <a href="https://www.miki.digital/"><em>MiKi Digital</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7787e686d2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why you don’t need AWS]]></title>
            <link>https://medium.com/@miki.digital/why-you-dont-need-aws-94bb3b8d0239?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/94bb3b8d0239</guid>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[nextjs-13]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Wed, 30 Aug 2023 07:09:41 GMT</pubDate>
            <atom:updated>2023-08-30T07:09:41.148Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6PLhgr6ck_NR3SZav3xClQ.png" /></figure><p>This is a rather controversial claim, so I hope I got your attention. Now let me explain what I mean.</p><p>Does learning the intricacies of AWS and IaC tools sound intimidating? For most people, it’s the reality. You want to create a simple web app, but doing it good on AWS <strong>can get very complex very fast</strong>:</p><ul><li>Choosing between IaC tools: Terraform vs. SAM vs. Serverless Framework</li><li>Managing user access with roles, organizations, etc.</li><li>Choosing the right AWS services, for example — Amplify or Lambda with S3 for FE deployment?</li><li>Setting up the local dev environment. As most of your services are in the cloud, setting up the dev environment locally can be very complex.</li></ul><p>Truth be told, in a complex project, those are all the choices you have to make. It’s the necessary evil. But if you aren’t building a small-mid project, using AWS(even with Serverless) can add more problems than it solves.</p><h3>What if not AWS?</h3><p>Until recently, there weren’t any better solutions than AWS. As other providers like GCP or Azure were just as complex, but now, a completely new “layer” of tools is emerging - close to 0-config cloud providers:</p><ul><li><a href="https://www.flightcontrol.dev/">Flightcontrol</a> — “AWS without pain”. It abstracts most of AWS’s config, allowing you to build on AWS without hiring a DevOps.</li><li><a href="https://vercel.com/">Vercel</a> — Doesn’t need an introduction, a hassle-free way to deploy your backend and frontend.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GST7tJdvWgIWPn1I98AbBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3vVv661rV_qnt6IMuuN1lw.jpeg" /><figcaption>FlightControl and Vercel logos</figcaption></figure><p>Yes, those tools provide abstraction at the cost of customizability, and everyone wants to build their app like it’s “Netflix”(with thousands of microservices and flawless architecture), but you don’t need to most of the time.</p><p>This article will focus on Vercel and how it can be the best platform for your backend.</p><h3>How did Vercel and NextJS get so good?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*03pCJoyqdHarbMMhg39P3Q.png" /></figure><p>NextJS is the full-stack framework built by the team behind Vercel. And since v13, its backend capabilities have gotten even better. Add tRPC and Prisma into the mix, and NextJS became one of the most powerful backend frameworks.</p><p><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers">With filesystem routing, it’s extremely easy to see the structure of your API.</a> And just by naming the function, you can specify its type. Neat, right?</p><pre>export async function GET(request: Request) {}</pre><p>And all this works locally out of the box as well. Just type</p><pre>npm run dev</pre><p>And your backend and frontend will be running locally. There is no need to use serverless-offline or other packages like you would to get AWS working locally. So, the dev experience is much better.</p><p>To deploy it, you only need to import your GitHub repo to Vercel, and it’ll handle all of the heavy lifting for you. It’s pricier than AWS, but think how much you’d save in DevOps costs and time.</p><h3>Conclusion</h3><p>AWS(or GCP/Azure) is undoubtedly the most powerful cloud provider, but that power comes with a trade-off. When starting a new project, you should evaluate if you need the customizability of AWS, which you don&#39;t for many small to mid-sized projects.</p><p><strong>What’s your opinion on the cloud provider saga?</strong></p><p><em>Need blockchain help? Feel free to </em><a href="https://www.miki.digital/contact"><em>contact us </em></a><em>or </em><a href="https://calendly.com/miki-digital/15min"><em>book a call</em></a><em>.</em></p><p>Written by <a href="https://www.linkedin.com/in/mikhail-kedel/"><em>Mikhail Kedzel </em></a>for <a href="https://www.miki.digital/"><em>MiKi Digital</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94bb3b8d0239" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Respond to Earn survey platform powered by Blockchain and AI]]></title>
            <link>https://medium.com/@miki.digital/respond-to-earn-survey-platform-powered-by-blockchain-and-ai-f76f01c7818a?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/f76f01c7818a</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[nextjs-13]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Wed, 23 Aug 2023 02:11:36 GMT</pubDate>
            <atom:updated>2023-08-23T02:11:36.881Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oOcLnqhU7uLQANff7lRPMQ.png" /></figure><p>Our recent collaboration with a forward-thinking government agency led us to develop an innovative Respond to Earn survey platform that incentivizes citizen participation and ensures transparency, trust, and unbiased reward distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KP6vYP7-E3QL9ZdKZvXJKA.png" /><figcaption>Screenshot of the MVP</figcaption></figure><h3>Our client</h3><p>A government agency recognized the need to enhance the involvement of citizens in shaping policies and decisions. They approached us with a unique challenge: build a survey platform which would solve the issue of low citizen engagement in ongoing surveys.</p><h3>Project description</h3><p>We had to think differently. Because of AI, the usage of most QA/survey platforms like StackOverflow is greatly declining.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*kiWjP3k4Nh-cJxuWRWe0vg.jpeg" /><figcaption>Usage of StackOverflow</figcaption></figure><p>The best solution was incentivizing the users to respond while assuring them they would get the compensation distributed fairly and transparently. That’s why we used a mix of two cutting-edge tech: Blockchain and AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*aR8tdFoJ-H4Drx9QHbUfsw.jpeg" /><figcaption>Blockchain platform of choice</figcaption></figure><p>We had to pick the right Blockchain platform to build our decentralized app. <a href="https://cronos.org/">Cronos</a> was our first choice since it’s</p><ul><li>EVM Compatible — allows us to use Solidity and write secure code</li><li>Scalable — We needed a platform to handle potential spikes in survey responses.</li><li>Interoperable</li></ul><p>This allowed us to develop and scale our projects without any issues.</p><p><strong>We employed Next.js and Tailwind for the frontend development, resulting in a near-perfect Lighthouse score.</strong> TailwindUI enabled us to create responsive, reusable components, ensuring citizens could comfortably participate in surveys from any device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*9JNrdpDe-7kGxU6nT_znjA.png" /><figcaption>Lighthouse score</figcaption></figure><p>Nailing the AI part was the key to success. <strong>We used ChatGPT API internally, which rated answers with astonishing 99% accuracy.</strong> The main feature of the projects — was a completely unbiased ranking of answers, and ChatGPT helped us achieve that. Reassuring participants that they would receive fair compensation. Moreover, using <strong>Blockchain and Smart Contracts</strong> gave us a secure &amp; transparent payout mechanism.</p><p>Our backend solution was equally impressive. Next.js 13, with its enhanced capabilities, proved to be an excellent choice for both frontend and backend development. We deployed the backend on Vercel, a platform that <strong>effortlessly handles serverless deployment, scaling, and load balancing while maintaining cost efficiency.</strong></p><h3>The result</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zxPJUdE05KSBhvWicPD7Aw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*99cq-Fk_SKEoytJMYQhVEw.png" /></figure><p>We were able to create an amazing platform in a matter of weeks, which greatly increased citizen engagement in government surveys. In the future, we plan to redisign the platform, and add more features, stay tuned!</p><p><em>Need blockchain help? Feel free to </em><a href="https://www.miki.digital/contact"><em>contact us </em></a><em>or </em><a href="https://calendly.com/miki-digital/15min"><em>book a call</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f76f01c7818a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI-powered health-tech platform predicting brain tumor]]></title>
            <link>https://medium.com/@miki.digital/ai-powered-health-tech-platform-predicting-brain-tumor-d12f8ab8f763?source=rss-8510bfdf9847------2</link>
            <guid isPermaLink="false">https://medium.com/p/d12f8ab8f763</guid>
            <category><![CDATA[ai-healthcare-revolution]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai-app-development]]></category>
            <category><![CDATA[healthtech]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[MiKi Digital]]></dc:creator>
            <pubDate>Wed, 09 Aug 2023 14:13:19 GMT</pubDate>
            <atom:updated>2023-08-09T14:13:19.617Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K5YdI06ZFXZ0m_MNIRmnxA.png" /></figure><p>We built an <strong>AI-Powered health-tech</strong> platform that <strong>reduced the client churn of a private hospital by 30%</strong>! Want to see how? In this case study, we will explore our recent healthcare service that utilizes AI to improve MRI brain scan analysis accuracy and speed.</p><h3>Our client</h3><p>A private hospital came to us with an idea to improve MRI results transparency for patients and analysis time for doctors with an AI-powered solution. We had to comply with strict data privacy requirements and our model had to be as precise as possible, so <strong>our AI developers trained an in-house AI brain tumor recognition model</strong></p><h3>The problem</h3><p>MRI brain scans are an essential diagnostic tool for various neurological conditions. However, analyzing these scans can be time-consuming and difficult for medical professionals. Additionally, the accuracy of the analysis can vary between different practitioners, leading to potential misdiagnosis and delayed treatment.</p><h3>The solution</h3><p>To address these issues, we built RAXIOM. It’s a web application where doctors &amp; patients can upload an MRI and get highly accurate results along with AI-generated recommendations, treatment, and comments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMvGOGuKwKpyCB-cXdGvNQ.jpeg" /></figure><p>The system uses machine learning to identify and analyze patterns in the MRI brain scans, providing accurate and consistent results. The AI model was trained on a vast database of anonymous MRI brain scans provided by the Radiological Society of North America and The Medical Image Computing and Computer-Assisted Intervention Society (RSNA-MICCAI).</p><h3>Implementation</h3><p>A user-friendly UI/UX was the first thing we thought about. Our designers created a smooth, modern UI that’s easy to navigate and intuitive for the user. We split the whole app into reusable components and first developed those on the Frontend, saving us tens of hours. <em>See “The Results” section for more UI images</em></p><p>As our cloud provider, we decided to use Google Cloud Platform (GCP) because of the vast amount of services and ease of use. The main system was web-based, and for this purpose, we went with NextJS — which has <strong>great performance thanks to Server-side rendering</strong>. To connect it with the Backend, we used Apollo GraphQL with a <strong>custom caching setup</strong>, which made our app even more responsive. For handling authentication most securely and storing user data privately, we used Firebase —<strong> a leading web app development platform from Google</strong>. Handling medical images on the Frontend is quite complex, but thanks to <a href="https://www.cornerstonejs.org/">CornerstoneJS</a>, we made it work flawlessly.</p><p>The Backend was built using ExpressJS and Apollo GraphQL Server. We deployed on GCP App Engine using Firebase Firestore as our storage solution. The MRI had to be stored in a specific format — DICOM. As the last backend step — <strong>we created endpoints to get DICOMs related data and service data such as analysis, patients, and studies.</strong></p><p>For setting up and deploying ML models, we used Python and technologies such as <strong>NumPy, Pandas, Matplotlib, Seaborn, and TensorFlow</strong>. To train our models, we used GCP services like Vertex AI for actual processing powers, Compute Engine for deployment and additional computing processes, and Healthcare API with Cloud Storage for storing and handling datasets for training.</p><h3>The result</h3><p>We create a fully functional application for medical data storage and a management system that allows medical professionals and patients to upload MRI scans and <strong>receive detailed analysis reports within minutes</strong>!</p><p>Users can log into the app</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kAUPhnYmuMyRtBKCFKSpcQ.jpeg" /><figcaption>Sign in page</figcaption></figure><p>As well as create a new account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9pkEx20idWO96IOe7Ru4w.jpeg" /><figcaption>Sign up page</figcaption></figure><p>After successfully authenticating, users see the main page briefly describing the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMvGOGuKwKpyCB-cXdGvNQ.jpeg" /><figcaption>Main page</figcaption></figure><p>Then you can see the “Dashboard” page with a list of available studies Dashboard screen image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NC0GZL-Buwzb6X2ARUm_EQ.jpeg" /><figcaption>Dashboard page</figcaption></figure><p>By clicking on a study, the user sees a report. It includes detailed visualizations of the scans and prediction of the brain tumor’s existence or appearance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZmzRew2mpFkjemC7zdo8AA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3OiqMFHKeAhzIemDEMDKxg.png" /><figcaption>Report page</figcaption></figure><h3>The impact</h3><p>By advertising the solution that we built for them, our client <strong>attracted 50% more patients</strong> in the upcoming month and <strong>reduced patient churn by 10%</strong> since all the data became much more transparent and <strong>extremely</strong> easy to access — a few clicks, and you see an in-depth overview of your MRI with understandable statistics. It also saved hundreds of hours of doctors’ time, enabling them to handle more patients.</p><h3>Conclusion</h3><p>AI technology in healthcare has the potential to revolutionize how medical professionals diagnose and treat various conditions. The AI-based MRI brain scan analysis system described in this case study is just one example of the many innovative healthcare services we created.</p><p>If you want to learn more about how AI is used in healthcare, stay tuned for future articles from us!</p><p><em>Need help developing an awesome web application(with or without AI)? Feel free to </em><a href="https://www.miki.digital/contact"><em>contact us </em></a><em>or </em><a href="https://calendly.com/miki-digital/15min"><em>book a call</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d12f8ab8f763" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>