<?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>Forem: Kumar Anirudha</title>
    <description>The latest articles on Forem by Kumar Anirudha (@anistark).</description>
    <link>https://forem.com/anistark</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%2F195016%2F1ec9199c-136f-4fd6-9d39-77400f66fc2f.jpeg</url>
      <title>Forem: Kumar Anirudha</title>
      <link>https://forem.com/anistark</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/anistark"/>
    <language>en</language>
    <item>
      <title>Apple's Liquid Glass Design</title>
      <dc:creator>Kumar Anirudha</dc:creator>
      <pubDate>Fri, 13 Jun 2025 13:14:50 +0000</pubDate>
      <link>https://forem.com/anistark/apples-liquid-glass-design-1ol5</link>
      <guid>https://forem.com/anistark/apples-liquid-glass-design-1ol5</guid>
      <description>&lt;p&gt;When Apple unveiled its new &lt;strong&gt;Liquid Glass&lt;/strong&gt; design language at WWDC '25, designers and devs around the world had a moment of deja vu. If you remember &lt;em&gt;Windows Vista's Aero Glass&lt;/em&gt; aesthetic translucent panes, glowing edges, and glassy blurs, this might feel like history repeating itself.&lt;/p&gt;

&lt;p&gt;But Apple's take isn't just nostalgia; it's refinement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vista's Aero vs Apple's Liquid Glass
&lt;/h2&gt;

&lt;p&gt;Let's rewind.&lt;/p&gt;

&lt;p&gt;Vista's Aero Glass was ambitious for its time (2006), introducing frosted translucency, window blur, and fluid motion. The problem? Hardware limitations. It was heavy on resources, inconsistent in UX, and often felt more gimmick than utility.&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%2Fu0dj5ck4ptld117uk17o.jpg" 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%2Fu0dj5ck4ptld117uk17o.jpg" alt="Vista Aero"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fast forward to 2025, and Apple's &lt;strong&gt;Liquid Glass&lt;/strong&gt; builds on the same core idea: translucency, depth, and light — but with far more nuance and purpose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance-first&lt;/strong&gt;: Apple's silicon chips and rendering optimizations make these effects smooth and battery-friendly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic blur + depth layering&lt;/strong&gt;: Liquid Glass adapts contextually — surfaces shift focus based on hierarchy, adding spatial clarity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Physical realism&lt;/strong&gt;: Unlike Vista's fake gloss, Apple simulates light scattering through curved glass, giving the UI a real-world softness.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Glassmorphism 2.0?
&lt;/h2&gt;

&lt;p&gt;This isn't Apple's first dance with &lt;strong&gt;Glassmorphism&lt;/strong&gt; — the design trend characterized by background blur, frosted transparency, soft shadows, and light borders. We saw it with iOS 7's frosted panels, refined in Big Sur, and now evolved into Liquid Glass on visionOS and macOS.&lt;/p&gt;

&lt;p&gt;The difference? Liquid Glass isn't just visual polish. It's &lt;strong&gt;UX-aware&lt;/strong&gt;. It signals state, focus, and depth through subtle glass effects. Text readability is carefully maintained, and interactions are tuned for spatial environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  VisionOS and the Future of UI
&lt;/h2&gt;

&lt;p&gt;Liquid Glass is more than a visual style — it's a &lt;strong&gt;spatial design paradigm&lt;/strong&gt; for Vision Pro and beyond. As Apple transitions toward mixed-reality-first experiences:&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%2F0h9daz71odcdfaavs3m1.jpg" 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%2F0h9daz71odcdfaavs3m1.jpg" alt="VisionOs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windows float in 3D space&lt;/strong&gt; with subtle light diffusion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content layers adjust translucency&lt;/strong&gt; based on interaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The environment influences UI&lt;/strong&gt; — Liquid Glass reacts to lighting and depth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is Apple aligning its UI with &lt;strong&gt;spatial computing&lt;/strong&gt;: minimal, breathable, and anchored in reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Watch For
&lt;/h2&gt;

&lt;p&gt;As Liquid Glass rolls out across macOS Sequoia, iPadOS, and visionOS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expect third-party apps to adopt Apple's APIs for glass panels and depth layers.&lt;/li&gt;
&lt;li&gt;Watch how design tools evolve — Figma, Framer, and SwiftUI previews will likely support dynamic translucency soon.&lt;/li&gt;
&lt;li&gt;Keep an eye on cross-platform adaptation — web apps might start mimicking Liquid Glass via &lt;code&gt;backdrop-filter&lt;/code&gt;, blur shaders, and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I made a sample user card in the same design style. Come check it out:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/anistark/embed/bNdKbBN?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;It's CSS only, using tailwind css, and simple HTML. You can use it with react, vite, next, or any web framework of your choice. If you like it, feel free to give me a shout-out. 👋 &lt;/p&gt;

&lt;p&gt;You might prefer solid colors. Maybe they'll make a comeback as well. But I'm in love with glassmorphism long time.&lt;/p&gt;

&lt;p&gt;Leave comments to what you think and/or if you wanna share something cool you've build using similar design style. :)&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>liquidglass</category>
      <category>appledesign</category>
      <category>tailwindcss</category>
    </item>
    <item>
      <title>ERC-7866: A Decentralized Profile Standard for the Multi-Chain Era</title>
      <dc:creator>Kumar Anirudha</dc:creator>
      <pubDate>Sat, 31 May 2025 11:53:11 +0000</pubDate>
      <link>https://forem.com/anistark/erc-7866-a-decentralized-profile-standard-for-the-multi-chain-era-3gb4</link>
      <guid>https://forem.com/anistark/erc-7866-a-decentralized-profile-standard-for-the-multi-chain-era-3gb4</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;&lt;br&gt;
ERC-7866 is a proposed Ethereum standard for decentralized profiles using Soulbound NFTs. It defines a minimal, extensible schema for on-chain identity that works across apps, chains, and user contexts — without relying on centralized identity providers.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Why Do We Need a Profile Standard in Web3?
&lt;/h2&gt;

&lt;p&gt;Every decentralized app today builds its own user profile layer: one stores usernames in smart contracts, another uses IPFS-linked metadata, another relies on wallet-based OAuth.&lt;/p&gt;

&lt;p&gt;Meanwhile, users end up with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fragmented identities across platforms&lt;/li&gt;
&lt;li&gt;Inconsistent UX (you're 0xABC here, "john.eth" there)&lt;/li&gt;
&lt;li&gt;Poor interoperability between dApps&lt;/li&gt;
&lt;li&gt;Set your avatar on each dApp, and still not have control over it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DID specifications exist&lt;/strong&gt;, but most are either too abstract or too coupled to off-chain resolution methods. Many aren't Ethereum-native, and few offer built-in support for reputation, staking, or verifiability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ERC-7866&lt;/strong&gt; aims to provide a pragmatic, composable identity primitive that works for developers &lt;em&gt;and&lt;/em&gt; users.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧬 What Is ERC-7866?
&lt;/h2&gt;

&lt;p&gt;ERC-7866 proposes a standard where each profile is represented as a &lt;strong&gt;Soulbound NFT&lt;/strong&gt; — non-transferable, verifiable, and optionally delegated or staked.&lt;/p&gt;

&lt;p&gt;Each profile is uniquely identified by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A username (e.g., &lt;code&gt;alice.eth&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A chain context (e.g., &lt;code&gt;evm&lt;/code&gt;, &lt;code&gt;solana&lt;/code&gt;, &lt;code&gt;offchain&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;A binding to a wallet or entity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It allows you to represent a profile as:&lt;br&gt;
&lt;code&gt;alice@evm.soul&lt;/code&gt; or &lt;code&gt;devguy@solana.soul&lt;/code&gt;&lt;br&gt;
— readable, referenceable, and resolvable across chains.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ What Can You Build with ERC-7866?
&lt;/h2&gt;

&lt;p&gt;Here’s where it gets exciting. This standard opens up &lt;strong&gt;a range of identity-layer apps and features&lt;/strong&gt; that work across chains, wallets, and user contexts.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Composable Wallet Profiles
&lt;/h3&gt;

&lt;p&gt;Let wallets generate and display ERC-7866 profiles instead of centralized profiles stored in their own DBs.&lt;br&gt;
Users could plug their identity into &lt;strong&gt;any&lt;/strong&gt; compatible wallet — with full control.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;No need for Twitter handles or email-based signups anymore.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. DAO Contributor Reputation
&lt;/h3&gt;

&lt;p&gt;DAOs can issue ERC-7866 identities to contributors and attach metadata like contributions, skills, and roles. You can even stake tokens to vouch for someone’s legitimacy.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A lightweight, composable on-chain resume.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Gaming Identity + Avatars
&lt;/h3&gt;

&lt;p&gt;Games often want player identities that aren't transferable but still portable. ERC-7866 provides a perfect fit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avatar metadata&lt;/li&gt;
&lt;li&gt;Game-linked achievements&lt;/li&gt;
&lt;li&gt;Network-specific identity binding&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Players get persistent identities without needing centralized accounts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4. Cross-Chain Developer or Organization Registry
&lt;/h3&gt;

&lt;p&gt;Think ENS, but generalized. A registry of developers or orgs who can create profiles like:&lt;br&gt;
&lt;code&gt;projectx@evm.soul&lt;/code&gt;, &lt;code&gt;anirudha@cosmos.soul&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Build GitHub-like org profiles — but decentralized, with verifiable roles.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Global Login Layer for Web3
&lt;/h3&gt;

&lt;p&gt;ERC-7866 profiles could power a wallet-agnostic “Login with Web3” button, where the user's profile carries their public metadata, verification, and social proofs.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Why Use ERC-7866 Over Other DID or Profile Standards?
&lt;/h2&gt;

&lt;p&gt;Most DID frameworks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are off-chain by default&lt;/li&gt;
&lt;li&gt;Require complex resolution systems&lt;/li&gt;
&lt;li&gt;Aren’t optimized for composable smart contracts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;ERC-7866 is different because it’s:&lt;/strong&gt;&lt;br&gt;
✅ Ethereum-native and chain-agnostic&lt;br&gt;
✅ Easy to integrate into existing NFT infra&lt;br&gt;
✅ Soulbound (non-transferable by default)&lt;br&gt;
✅ Supports delegation and staking&lt;br&gt;
✅ DID-compatible but simplified for on-chain use&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 How You Can Contribute
&lt;/h2&gt;

&lt;p&gt;ERC-7866 is still a &lt;strong&gt;draft proposal&lt;/strong&gt;. This is the perfect time to get involved:&lt;/p&gt;

&lt;p&gt;🧵 Discuss in the Ethereum Magicians thread:&lt;br&gt;
&lt;a href="https://ethereum-magicians.org/t/erc-7866-decentralised-profile-standard/22610" rel="noopener noreferrer"&gt;https://ethereum-magicians.org/t/erc-7866-decentralised-profile-standard/22610&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🧾 Review the EIP draft:&lt;br&gt;
&lt;a href="https://eips.ethereum.org/EIPS/eip-7866" rel="noopener noreferrer"&gt;https://eips.ethereum.org/EIPS/eip-7866&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📚 Read the background blog:&lt;br&gt;
&lt;a href="https://blog.anirudha.dev/decentralised-profile-standard" rel="noopener noreferrer"&gt;https://blog.anirudha.dev/decentralised-profile-standard&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📦 What’s Next?
&lt;/h2&gt;

&lt;p&gt;Working on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🛠 SDKs for developers to create/resolve profiles&lt;/li&gt;
&lt;li&gt;🚫 Gasless minting + delegation tooling&lt;/li&gt;
&lt;li&gt;📖 Documentation for registry builders&lt;/li&gt;
&lt;li&gt;🌉 DID-to-ERC bridge layers&lt;/li&gt;
&lt;li&gt;🔍 Explorers + indexers for public identity graphs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Web3 needs better identity infrastructure — not more fragmented standards.&lt;/p&gt;

&lt;p&gt;If you're building wallets, DAOs, social dApps, gaming platforms, or identity tooling — &lt;strong&gt;ERC-7866 might save you months of work&lt;/strong&gt;, while promoting a shared, composable identity layer for the ecosystem.&lt;/p&gt;

&lt;p&gt;Let’s build it together.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Thanks for reading! Comments, feedback, and critiques are always welcome.&lt;/em&gt;&lt;br&gt;
Feel free to reach out here or join the discussion on &lt;a href="https://ethereum-magicians.org" rel="noopener noreferrer"&gt;Ethereum Magicians&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>eip</category>
      <category>web3</category>
      <category>erc7866</category>
      <category>ethereum</category>
    </item>
    <item>
      <title>How does Chain Abstraction work?</title>
      <dc:creator>Kumar Anirudha</dc:creator>
      <pubDate>Thu, 19 Dec 2024 08:36:58 +0000</pubDate>
      <link>https://forem.com/anistark/how-does-chain-abstraction-work-1gp0</link>
      <guid>https://forem.com/anistark/how-does-chain-abstraction-work-1gp0</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;If you’re looking to learn about the basics about Chain Abstraction, then read &lt;a href="https://dev.to/anistark/chain-abstraction-5a8i"&gt;this article&lt;/a&gt; instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Technically speaking, chain abstraction means abstracting away the differences between blockchain networks to provide a seamless experience. The goal is to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplify User Interaction&lt;/strong&gt;: Make it easy for users to interact with apps without worrying about which chain they’re on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enable Interoperability&lt;/strong&gt;: Allow assets, data, and actions to move freely between chains.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduce Complexity for Developers&lt;/strong&gt;: Provide unified tools and APIs to build cross-chain applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To achieve chain abstraction, several tools and mechanisms come into play.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross-Chain Bridges
&lt;/h2&gt;

&lt;p&gt;Bridges connect different blockchains, enabling the transfer of assets and data between them. Think of them as digital highways. For example, if you want to move your tokens from Ethereum to Binance Smart Chain, a bridge handles the heavy lifting.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You lock your tokens on the source chain (e.g., Ethereum).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The bridge mints an equivalent amount of tokens on the destination chain (e.g., Binance Smart Chain).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you want to reverse the process, the tokens on the destination chain are burned, and the original tokens are unlocked.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Swaps and Liquidity Protocols
&lt;/h2&gt;

&lt;p&gt;Swapping tokens across chains often requires decentralized exchanges (DEXs) or protocols like &lt;a href="https://app.uniswap.org/" rel="noopener noreferrer"&gt;Uniswap&lt;/a&gt; and &lt;a href="https://www.sushi.com/ethereum/swap" rel="noopener noreferrer"&gt;SushiSwap&lt;/a&gt;. Some advanced protocols like &lt;a href="https://thorchain.org/" rel="noopener noreferrer"&gt;Thorchain&lt;/a&gt; take it a step further by supporting native cross-chain swaps without wrapping tokens.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Liquidity pools on different chains allow you to trade one token for another.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cross-chain swap protocols use bridges under the hood to move assets while maintaining a smooth experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Interoperability Protocols
&lt;/h2&gt;

&lt;p&gt;Protocols like &lt;a href="https://polkadot.com/" rel="noopener noreferrer"&gt;Polkadot&lt;/a&gt; and &lt;a href="https://cosmos.network/" rel="noopener noreferrer"&gt;Cosmos&lt;/a&gt; focus on making blockchains inherently interoperable. They create ecosystems where chains can share data and assets natively.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Relay Chains&lt;/strong&gt;: Central hubs that coordinate communication between connected blockchains.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IBC (Inter-Blockchain Communication)&lt;/strong&gt;: A protocol standard used in Cosmos to let chains talk to each other securely. All contracts follow the &lt;a href="https://github.com/cosmos/ibc" rel="noopener noreferrer"&gt;Interchain Standards (ICS)&lt;/a&gt; for the Cosmos network &amp;amp; interchain ecosystem.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Universal Wallets
&lt;/h2&gt;

&lt;p&gt;Tools like &lt;a href="https://particle.network/" rel="noopener noreferrer"&gt;Particle Network&lt;/a&gt; enable universal account wallets that work across multiple chains. Instead of manually switching between networks, these wallets auto-detect and handle transactions on the right chain.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Chain detection and configuration happen automatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transactions are routed to the correct blockchain without user intervention.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  RPC Aggregators
&lt;/h2&gt;

&lt;p&gt;Remote Procedure Call (RPC) endpoints are gateways to blockchains. Aggregators like Alchemy and Infura provide a unified interface to interact with multiple blockchains, abstracting away the need to set up individual endpoints.&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%2Fzamly5o3o4lut35t0t3x.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%2Fzamly5o3o4lut35t0t3x.png" alt="" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chain abstraction is the backbone of many user-friendly crypto applications. Lets see a few examples:&lt;/p&gt;

&lt;p&gt;Imagine you’re using a decentralized finance app to swap Ethereum (ETH) for Binance Coin (BNB). Here’s what it looks like from your perspective:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You open the app and select &lt;code&gt;ETH&lt;/code&gt; as the token to swap.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You choose &lt;code&gt;BNB&lt;/code&gt; as the token to receive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You click "Swap" and confirm the transaction.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From your perspective, it’s a one-click process. Behind the scenes, multiple tools work together to make it seamless.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The app detects that ETH is on Ethereum and BNB is on Binance Smart Chain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A cross-chain bridge locks your ETH on Ethereum and creates a wrapped version on Binance Smart Chain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The app uses a liquidity pool to exchange the wrapped ETH for BNB.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, the app transfers BNB to your wallet on Binance Smart Chain.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here’s a simple Solidity contract for locking tokens on Ethereum and emitting an event to notify a bridge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract TokenLock {
    event TokenLocked(address indexed user, uint256 amount, string destinationChain);

    mapping(address =&amp;gt; uint256) public lockedBalances;

    function lockTokens(uint256 amount, string memory destinationChain) external {
        require(amount &amp;gt; 0, "Amount must be greater than 0");

        // Simulate token lock (e.g., ERC20 transfer to contract)
        lockedBalances[msg.sender] += amount;

        // Emit event for bridge to pick up
        emit TokenLocked(msg.sender, amount, destinationChain);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This contract locks tokens on Ethereum and emits an event. A bridge service listens to the event and handles minting on the destination chain.&lt;/p&gt;

&lt;p&gt;Lets take another example. Imagine you own an NFT on Ethereum but want to sell it on a Solana-based marketplace. Chain abstraction allows this by bridging the NFT to Solana while ensuring its metadata and ownership history remain intact.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The NFT is locked on Ethereum, and a wrapped version is created on Solana.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The marketplace interacts with the Solana version, displaying it as if it were native to Solana.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the NFT is sold, the buyer can choose to keep it on Solana or transfer it back to Ethereum.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

contract NFTBridge {
    event NFTLocked(address indexed user, uint256 tokenId, string destinationChain);

    IERC721 public nftContract;

    constructor(address _nftContract) {
        nftContract = IERC721(_nftContract);
    }

    function lockNFT(uint256 tokenId, string memory destinationChain) external {
        require(nftContract.ownerOf(tokenId) == msg.sender, "Not the owner");

        // Transfer the NFT to the bridge contract
        nftContract.transferFrom(msg.sender, address(this), tokenId);

        // Emit event for bridge service
        emit NFTLocked(msg.sender, tokenId, destinationChain);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the contract locks an NFT and emits an event. The bridge then handles minting the wrapped NFT on the target chain.&lt;/p&gt;

&lt;p&gt;How about EVM to Cosmos perhaps?&lt;/p&gt;

&lt;p&gt;Here’s an example illustrating how a smart contract on Ethereum can interact with a Cosmos chain using IBC:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract EVMToCosmosBridge {
    event TokenSentToCosmos(address indexed sender, uint256 amount, string cosmosAddress);

    mapping(address =&amp;gt; uint256) public balances;

    function sendToCosmos(uint256 amount, string memory cosmosAddress) external {
        require(amount &amp;gt; 0, "Amount must be greater than 0");

        // Simulate token lock (e.g., ERC20 transfer to contract)
        balances[msg.sender] += amount;

        // Emit event for Cosmos chain to pick up
        emit TokenSentToCosmos(msg.sender, amount, cosmosAddress);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This contract locks tokens on Ethereum and emits an event for an IBC-compatible relayer to transfer the equivalent tokens to a Cosmos chain.&lt;/p&gt;

&lt;p&gt;On the Cosmos side, a module listens for IBC events and handles incoming tokens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;tokenbridge&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"github.com/cosmos/cosmos-sdk/types"&lt;/span&gt;
    &lt;span class="s"&gt;"github.com/cosmos/ibc-go/modules/core/04-channel/types"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;HandleTokenTransfer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="n"&gt;types&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MsgRecvPacket&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// Decode the packet&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="n"&gt;TokenTransferPacketData&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Unmarshal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Packet&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c"&gt;// Mint the tokens for the recipient&lt;/span&gt;
    &lt;span class="n"&gt;recipient&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AccAddress&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Recipient&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewCoin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Denom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Amount&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;MintTokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;recipient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;MintTokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;recipient&lt;/span&gt; &lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AccAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Coin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// Use the bank module to mint and send tokens&lt;/span&gt;
    &lt;span class="n"&gt;bankKeeper&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;GetBankKeeper&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;bankKeeper&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MintCoins&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ModuleName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sdk&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewCoins&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Cosmos module listens for incoming IBC packets, decodes the token transfer details, and mints tokens to the recipient's address. It complements the Ethereum-side contract to complete the abstraction.&lt;/p&gt;

&lt;p&gt;Now, since blockchains are inherently siloed networks, they ideally wouldn’t know to even listen each other. That’s where the bridges and other tools come in. Even with bridges, potential limitations still exists. If the cross-chain bridge experiences congestion, your transaction might be delayed. Additionally, if there’s insufficient liquidity in the liquidity pool for the target token, you might get unfavorable rates or the swap could fail entirely. Lastly, any issues with the smart contracts underlying the bridge or pool could result in transaction errors or delays.&lt;br&gt;
Despite these risks, robust protocols and fallback mechanisms are constantly evolving to mitigate such problems. Scalability can also become a bottleneck as the number of connected chains increases, requiring more resources to maintain performance. Security is another concern, as cross-chain communication introduces additional attack surfaces, such as vulnerabilities in the relay chains or the Inter-Blockchain Communication (IBC) protocol. Addressing these issues is critical for achieving robust and secure interoperability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There’s a long way to go to achieve true chain abstraction, but we’re on the way already...&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>chain</category>
      <category>abstraction</category>
      <category>web3</category>
      <category>interoperability</category>
    </item>
    <item>
      <title>Chain Abstraction</title>
      <dc:creator>Kumar Anirudha</dc:creator>
      <pubDate>Sun, 15 Dec 2024 17:07:48 +0000</pubDate>
      <link>https://forem.com/anistark/chain-abstraction-5a8i</link>
      <guid>https://forem.com/anistark/chain-abstraction-5a8i</guid>
      <description>&lt;p&gt;Say you want to make an online payment, and instead of just clicking a button, you have to figure out whether the store accepts Visa, Mastercard, or PayPal. Now multiply that headache by 100x, and you’ve got the current state of blockchains. This is where chain abstraction steps in — the fintech equivalent of a universal payment processor but for blockchains. It makes the Web3 world less about mind-numbing details and more about getting stuff done.&lt;/p&gt;

&lt;p&gt;Let’s dive into what chain abstraction is, why it’s the hero we need, and how you can build cool things around it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Chain Abstraction Anyway?
&lt;/h2&gt;

&lt;p&gt;Imagine using Venmo, Apple Pay, or Google Pay without worrying about how they talk to your bank or credit card. That’s chain abstraction for blockchains. It’s all about hiding the complex, nerdy stuff like gas fees, token standards, and wallet types so users and developers can focus on what matters: buying that damn mocha.&lt;/p&gt;

&lt;p&gt;It makes interacting with blockchains feel less like coding in the Matrix and more like using Spotify. In short, it’s the magic trick that lets blockchains talk to each other and work together seamlessly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Do We Even Need This?
&lt;/h2&gt;

&lt;p&gt;Blockchains are amazing, but let’s be real: they’re a pain to use. Each chain has its quirks, its rules, and its own language. For instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ethereum makes you worry about gas fees.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Solana dazzles you with speed but has its own wallet ecosystem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Binance Smart Chain screams, "Hey, we're cheap!" but you still have to bridge assets manually.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Imagine if every payment app required you to know the bank's internal workings. You’d delete them in a heartbeat. That’s why we need chain abstraction to fix these headaches:&lt;/p&gt;

&lt;h3&gt;
  
  
  Simplified User Experience
&lt;/h3&gt;

&lt;p&gt;You don’t care which blockchain an app is on. You just want to use it without Googling, “How to send tokens from Polygon to Arbitrum.”&lt;/p&gt;

&lt;h3&gt;
  
  
  More Collaboration, Less Competition
&lt;/h3&gt;

&lt;p&gt;Developers can focus on innovation instead of building the same tools for every blockchain.&lt;/p&gt;

&lt;h3&gt;
  
  
  Onboarding for the Masses
&lt;/h3&gt;

&lt;p&gt;Your grandma won’t care about gas fees or token bridges, but she might use Web3 if it’s as easy as buying something on Amazon.&lt;/p&gt;

&lt;p&gt;Think of chain abstraction as turning a messy fintech system into a unified, user-friendly experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No More Wallet Chaos&lt;/strong&gt;: Whether it’s MetaMask, Phantom, or Keplr, users can use one interface to access all their assets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Universal Gas Fees&lt;/strong&gt;: Users pay with whatever tokens they have, instead of scrambling to swap for ETH, SOL, or MATIC.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-Chain Transactions Made Easy&lt;/strong&gt;: Think of it as a blockchain version of Wise for international transfers, but instant and decentralized.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Several blockchain superheroes are already working on this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LayerZero&lt;/strong&gt;: The omnichain messaging protocol. Think WhatsApp but for blockchains.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cosmos (IBC)&lt;/strong&gt;: The OG of chain abstraction, letting blockchains chat like old friends.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Axelar Network&lt;/strong&gt;: Focused on secure cross-chain communication. Think of it as a blockchain VPN.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Polkadot&lt;/strong&gt;: Parachains make interoperability look easy, kinda like how Apple devices magically sync.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Superfluid&lt;/strong&gt;: Abstracts token standards for seamless asset streaming across different chains.&lt;/p&gt;&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%2Fe82x3l8szgykng6f1t89.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%2Fe82x3l8szgykng6f1t89.png" alt="Chain Abstraction Illustration" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does It Work?
&lt;/h2&gt;

&lt;p&gt;Chain abstraction operates like the middleware in your favorite fintech app.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Middleware Layers&lt;/strong&gt;: Like Stripe for payments, middleware abstracts the complexity of multi-chain interactions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Universal Wallets&lt;/strong&gt;: These wallets hide the “What chain are you on?” question.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gas Fee Abstraction&lt;/strong&gt;: Imagine paying transaction fees in whatever token you like. No more “insufficient ETH” pop-ups.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So, How to Build on Chain Abstraction
&lt;/h2&gt;

&lt;p&gt;If you're a builder looking to jump in, here’s your cheat sheet:&lt;/p&gt;

&lt;h3&gt;
  
  
  Understand the Ecosystem
&lt;/h3&gt;

&lt;p&gt;Spend time with protocols like LayerZero, Cosmos, and Axelar. They’re like the Lego sets for chain abstraction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep Security in Mind
&lt;/h3&gt;

&lt;p&gt;Cross-chain means more doors to lock. Study cryptographic techniques and get comfy with audits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Dev-Friendly Tools
&lt;/h3&gt;

&lt;p&gt;Tools like Axelar SDK or Ethereum's EIP-4337 are your best friends. Don’t reinvent the wheel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Think Like a Fintech Startup
&lt;/h3&gt;

&lt;p&gt;Build for scalability and usability. If your app isn’t grandma-friendly, try again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Cool Ideas to Build
&lt;/h2&gt;

&lt;p&gt;Here are some project ideas to flex your developer muscles:&lt;/p&gt;

&lt;h3&gt;
  
  
  Cross-Chain DeFi Superapp
&lt;/h3&gt;

&lt;p&gt;Think Revolut, but for DeFi. Let users swap, lend, and stake across chains in one interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  Gasless Transactions dApp
&lt;/h3&gt;

&lt;p&gt;Let users pay fees in their favorite token or abstract gas fees entirely.&lt;/p&gt;

&lt;h3&gt;
  
  
  Blockchain Expedia
&lt;/h3&gt;

&lt;p&gt;Aggregate dApps across chains so users can search for services like booking flights or investing, without worrying about chains.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Chain abstraction is like the UPI (Unified Payments Interface) of the blockchain world. It’s making blockchains talk to each other, play well together, and be user-friendly for everyone. If Web3 is ever going to rival fintech giants like PayPal or Stripe, this is the way forward.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Developers, this is your moment. Start building tools that make blockchains boring in the best way where the tech just works, and users don’t even notice the chains under the hood. At DripVerse, this is going to be the next frontier to build on. Keep an eye out folks…&lt;/p&gt;

</description>
      <category>chain</category>
      <category>abstraction</category>
      <category>web3</category>
      <category>interoperability</category>
    </item>
    <item>
      <title>Designing The Perfect Incentivised System - Part 2</title>
      <dc:creator>Kumar Anirudha</dc:creator>
      <pubDate>Sat, 02 Nov 2024 12:11:26 +0000</pubDate>
      <link>https://forem.com/anistark/designing-the-perfect-incentivised-system-part-2-4aic</link>
      <guid>https://forem.com/anistark/designing-the-perfect-incentivised-system-part-2-4aic</guid>
      <description>&lt;p&gt;A lot of the recent rise in isekai anime also suggests a favorable wind towards perfecting our system.&lt;/p&gt;

&lt;p&gt;In the anime Hunter x Hunter, the incentive system plays a crucial role in driving the narrative and character development, particularly in the context of the Hunter Exam and various arcs throughout the series.&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%2Fqq83iu63xeuum0xhgtma.jpg" 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%2Fqq83iu63xeuum0xhgtma.jpg" alt="Heavens Arena" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hunter Exam
&lt;/h2&gt;

&lt;p&gt;The most prominent example of an incentive system in Hunter x Hunter is the Hunter Exam, which is designed to evaluate the potential of aspiring Hunters. This exam offers various incentives and motivations for participants, leading to a competitive environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Status and Prestige&lt;/strong&gt;: Becoming a Hunter is a prestigious achievement that grants access to exclusive resources, knowledge, and opportunities. The allure of becoming a Hunter motivates numerous characters to enter the exam, despite its dangers.&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%2Fcc1r3sc7080v5ehlz4kk.gif" 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%2Fcc1r3sc7080v5ehlz4kk.gif" alt="Hunter Card" width="498" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Diverse Challenges&lt;/strong&gt;: The exam comprises multiple stages, each presenting unique challenges that test candidates' physical and mental abilities. The variety of tasks incentivizes different skill sets and encourages teamwork and strategy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Elimination Format&lt;/strong&gt;: The exam's competitive nature, where candidates are eliminated based on performance, adds a layer of urgency. This structure incentivizes candidates to perform at their best to avoid being cut from the competition.&lt;/p&gt;

&lt;h3&gt;
  
  
  Individual and Team Incentives
&lt;/h3&gt;

&lt;p&gt;Throughout the series, characters often face situations where individual goals conflict with group objectives, reflecting the dynamics of incentive systems.&lt;/p&gt;

&lt;h4&gt;
  
  
  Examples:
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Alliances and Betrayals&lt;/strong&gt;: Characters like Gon, Killua, and Leorio form alliances to navigate challenges. However, their individual motivations can lead to conflicts, showcasing the tension between personal and collective goals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Personal Growth&lt;/strong&gt;: The characters are often driven by personal desires—Gon’s quest to find his father, Killua’s struggle for independence from his family, and Kurapika’s desire for revenge. These individual incentives create depth in their motivations and actions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Nen and Its Role as an Incentive System
&lt;/h3&gt;

&lt;p&gt;The Nen system in Hunter x Hunter serves as a complex incentive structure that rewards training, strategy, and creativity in combat.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key Features:
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Personalization&lt;/strong&gt;: Nen abilities are unique to each user and are based on their personality and experiences. This personalization incentivizes Hunters to invest time and effort into mastering their abilities, as they become extensions of themselves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strategic Thinking&lt;/strong&gt;: The Nen system encourages strategic thinking, as users must understand their strengths and weaknesses and those of their opponents. The incentive to outsmart foes adds layers to battles, making them not just about power but also about wits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Consequences and Trade-offs
&lt;/h3&gt;

&lt;p&gt;The series also highlights the consequences of the incentive systems in place, particularly regarding the ethical implications of the Hunters’ choices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Moral Dilemmas&lt;/strong&gt;: Characters often face moral dilemmas where the pursuit of their goals can lead to negative consequences for others. For instance, some Hunters prioritize their objectives over the well-being of others, raising questions about the ethics of their actions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sacrifices&lt;/strong&gt;: The journey of becoming a Hunter often requires personal sacrifices, be it in terms of relationships, physical well-being, or moral integrity. This reflects the trade-offs inherent in any incentive system.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Auction and the Underworld
&lt;/h3&gt;

&lt;p&gt;Another significant incentive system is the auction and underworld dealings that occur later in the series, particularly during the Greed Island and Chimera Ant arcs.&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%2Fqq2wd0r6tpnvml8d65ge.jpg" 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%2Fqq2wd0r6tpnvml8d65ge.jpg" alt="Yorknew Auction House" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Features:
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Scarcity and Value&lt;/strong&gt;: Rare items and information become valuable commodities in the auction system, incentivizing Hunters to participate in dangerous missions to acquire them. The allure of these items drives characters into conflict and competition. 💎&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Risk vs. Reward&lt;/strong&gt;: The underworld emphasizes the risk involved in pursuing rewards. Characters must weigh the potential gains against the dangers they face, illustrating the high stakes associated with their desires. ⚖&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In Hunter x Hunter, the various incentive systems—ranging from the Hunter Exam to the Nen system and the underworld dealings—serve to shape character motivations, drive the plot, and explore deeper themes of morality, competition, and personal growth. The complexity of these systems reflects the series' intricate storytelling, making it a rich exploration of human desires and the consequences of pursuing them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Tower of God
&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%2F3u4eu0vn0b26v6qktu5p.jpg" 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%2F3u4eu0vn0b26v6qktu5p.jpg" alt="tower of God" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the anime Tower of God, we see the incentive system is intricately woven into the narrative and serves as a crucial mechanism for driving character motivations, conflicts, and the overall plot. The Tower itself functions as a multi-layered arena where characters face various challenges, each governed by its own set of incentives and rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Climbing the Tower
&lt;/h3&gt;

&lt;p&gt;At the core of Tower of God is the overarching goal of climbing the Tower, which serves as the primary incentive for many characters. The Tower promises immense power, wealth, and the chance to achieve one’s dreams at the top.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Desire for Power and Fulfillment&lt;/strong&gt;: Each character has their own motivations for climbing, ranging from personal ambition to the desire to reunite with loved ones. For example, Bam’s journey is driven by his desire to find Rachel, while other characters seek glory or revenge.&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%2Fpere5d7dp6fzkelpqnv4.jpg" 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%2Fpere5d7dp6fzkelpqnv4.jpg" alt="Rankers" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges and Trials&lt;/strong&gt;: The Tower is divided into multiple floors, each presenting unique tests and challenges. Successfully overcoming these trials serves as an incentive for characters to prove their strength and skill.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Role of Rankers
&lt;/h3&gt;

&lt;p&gt;Within the Tower, there are two main categories of climbers: &lt;em&gt;regulars&lt;/em&gt; and &lt;em&gt;rankers&lt;/em&gt;. Rankers are those who have already ascended and achieved a high status, serving as both mentors and adversaries to the regulars. Of course there's irregulars as well, but lets exclude exceptions for a bit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authority and Status&lt;/strong&gt;: Rankers hold significant power and influence within the Tower, and this status serves as a major incentive for regulars to aspire to reach their level. This dynamic creates a competitive atmosphere where regulars must constantly prove themselves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rewards and Responsibilities&lt;/strong&gt;: Rankers often receive special privileges and responsibilities, which can incentivize them to assist or manipulate regulars in their ascent. The relationships between rankers and regulars can create complex social dynamics based on competition and cooperation.&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%2Fk0akwk3pcwggmxwwou2y.jpg" 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%2Fk0akwk3pcwggmxwwou2y.jpg" alt="Urek Mazino" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Test and Competition Structure
&lt;/h3&gt;

&lt;p&gt;The various tests within the Tower are structured to foster competition among regulars, which is a fundamental aspect of the incentive system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Teamwork vs. Individualism&lt;/strong&gt;: Many challenges require cooperation among climbers, creating a dual incentive of working together to succeed while also competing for individual glory. This dynamic is evident in the early tests, where characters must form alliances to survive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Elimination and Advancement&lt;/strong&gt;: The competitive nature of the tests means that failure results in elimination from the Tower, which serves as a powerful motivator. The threat of elimination encourages characters to push their limits and take risks.&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%2Fcezof68mum8d0s4n0lcz.jpg" 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%2Fcezof68mum8d0s4n0lcz.jpg" alt="Tower of God Season 2" width="640" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In Tower of God, the incentive system is multifaceted, shaping the motivations and actions of characters as they navigate the challenges of the Tower. The interplay between personal desires, competition, and the hierarchical structure of regulars and rankers creates a rich narrative landscape. The series delves into the complexities of ambition, sacrifice, and the human experience, making the incentive system an integral part of its storytelling.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Solo Levelling
&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%2F33f864wua3o13dsuix4z.jpg" 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%2F33f864wua3o13dsuix4z.jpg" alt="Solo Levelling" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of my personal favorites. In the anime Solo Leveling, the ranking and incentive system is central to the story's premise and character development. The world is divided into Hunters—individuals who possess supernatural abilities and engage in battles against monsters from dungeons. The ranking system not only categorizes Hunters but also serves as a key incentive mechanism, motivating characters to grow stronger and face increasingly formidable challenges. Here’s a detailed exploration of the ranking and incentive system in &lt;em&gt;Solo Leveling&lt;/em&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  Hunter Ranks
&lt;/h3&gt;

&lt;p&gt;The ranking system in Solo Leveling categorizes Hunters based on their strength and abilities. The ranks are typically divided into several tiers, from the lowest to the highest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;E-Rank&lt;/strong&gt;: The weakest category, often consisting of inexperienced Hunters with limited abilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;D-Rank&lt;/strong&gt;: Slightly stronger than E-Rank, but still considered low-tier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;C-Rank&lt;/strong&gt;: Competent Hunters capable of handling moderate threats.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;B-Rank&lt;/strong&gt;: Stronger Hunters who can take on more challenging dungeons.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A-Rank&lt;/strong&gt;: Highly skilled Hunters with significant abilities and experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;S-Rank&lt;/strong&gt;: The elite class of Hunters, known for their exceptional strength and prowess.&lt;/p&gt;&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%2F4c13lkdza74o3zsja5aj.jpg" 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%2F4c13lkdza74o3zsja5aj.jpg" alt="Rankings" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This ranking system not only establishes a hierarchy among Hunters but also influences their status, opportunities, and how they are treated in society.&lt;/p&gt;

&lt;h3&gt;
  
  
  Incentives for Levelling Up
&lt;/h3&gt;

&lt;p&gt;The ranking system provides various incentives for Hunters to level up and improve their abilities.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recognition and Prestige&lt;/strong&gt;: Higher-ranked Hunters gain social status and respect. The desire to be recognized as a strong and capable Hunter drives many characters to strive for improvement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Access to Better Resources&lt;/strong&gt;: Higher ranks often translate to access to more lucrative missions and dungeons, as well as better gear and resources. This creates a tangible incentive for Hunters to train and advance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Financial Rewards&lt;/strong&gt;: Completing higher-level dungeons typically yields greater monetary rewards. As Hunters rise in rank, the potential for earning increases, motivating them to take on more challenging tasks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Of course in this anime only our protagonist can level up.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Role of Dungeons
&lt;/h3&gt;

&lt;p&gt;Dungeons are critical to the ranking system, as they serve as the primary battlegrounds for Hunters. The difficulty of the dungeon often corresponds to the rank of the Hunters needed to clear it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Increased Challenge&lt;/strong&gt;: Higher-ranked dungeons require stronger Hunters, presenting a significant incentive for individuals to level up. The potential for earning greater rewards in higher-level dungeons drives Hunters to improve their skills.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Experience and Growth&lt;/strong&gt;: The process of entering dungeons allows Hunters to gain valuable experience, level up, and hone their abilities. As they face stronger monsters, they have the opportunity to prove themselves and ascend in rank.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Protagonist’s Journey
&lt;/h3&gt;

&lt;p&gt;The story follows Sung Jin-Woo, an E-Rank Hunter who starts at the bottom of the ranking system. After a near-fatal encounter in a double dungeon, he gains a unique ability that allows him to "level up" in a video game-like manner.&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%2Fvagdvcffzlv6bab8f1rb.jpg" 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%2Fvagdvcffzlv6bab8f1rb.jpg" alt="Level Up" width="640" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Unique Incentive Mechanism
&lt;/h4&gt;

&lt;p&gt;Jin-Woo’s ability to level up independently of the traditional ranking system sets him apart. This mechanic serves as a powerful incentive for his growth, as he can train and gain strength rapidly compared to his peers.&lt;/p&gt;

&lt;h4&gt;
  
  
  Transformative Growth
&lt;/h4&gt;

&lt;p&gt;As he levels up, Jin-Woo transitions from being one of the weakest Hunters to an S-Rank Hunter. His journey highlights the incentives tied to perseverance, dedication, and the pursuit of power.&lt;/p&gt;

&lt;h3&gt;
  
  
  Social and Psychological Factors
&lt;/h3&gt;

&lt;p&gt;The ranking and incentive system also explores social dynamics and psychological motivations among Hunters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Competition and Rivalry&lt;/strong&gt;: The hierarchical nature of the ranking system fosters competition among Hunters. This rivalry can lead to alliances or conflicts, as individuals strive to outperform one another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fear of Weakness&lt;/strong&gt;: Many Hunters experience anxiety about their rank, as being labeled weak can lead to social stigma and reduced opportunities. This fear drives characters to push themselves harder and take greater risks to improve their status.&lt;/p&gt;

&lt;h3&gt;
  
  
  Consequences of the System
&lt;/h3&gt;

&lt;p&gt;The ranking and incentive system in Solo Leveling also has its darker aspects, revealing the pressures and challenges that come with the pursuit of power.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Moral Dilemmas&lt;/strong&gt;: Characters may face ethical choices when pursuing their goals, such as sacrificing others for personal gain or engaging in ruthless competition.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mental Strain&lt;/strong&gt;: The constant pressure to rank up and improve can lead to mental strain and burnout, as Hunters push themselves to their limits.&lt;/p&gt;&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%2Fqjjxeo9zw6zfayg43ak9.jpg" 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%2Fqjjxeo9zw6zfayg43ak9.jpg" alt="Monarchs" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The ranking and incentive system in Solo Leveling serves as a vital framework for character motivations, societal dynamics, and the overarching plot. By establishing clear tiers of strength and associated rewards, the system encourages characters to grow and adapt, creating a compelling narrative of struggle and triumph. The series effectively explores themes of ambition, competition, and the costs associated with the pursuit of power, making the ranking system an integral aspect of its storytelling.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Similar scoring systems are used in multiple real life scenarios as is in anime. The limits of a limitless system is the most crucial point for the existence of any perpetual system. If we know what's supposed to be the peak and what's the rock bottom, we have our range to work with. But often, in society and life, the strongest keeps changing and so does our knowledge of the weakest. &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%2Fyklhaoats8kd9z7o00sl.jpg" 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%2Fyklhaoats8kd9z7o00sl.jpg" alt="Strongest" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...to be continued.&lt;/p&gt;

</description>
      <category>perpetual</category>
      <category>incentive</category>
      <category>rating</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Designing The Perfect Incentivised System - Part 1</title>
      <dc:creator>Kumar Anirudha</dc:creator>
      <pubDate>Tue, 29 Oct 2024 05:47:53 +0000</pubDate>
      <link>https://forem.com/anistark/designing-the-perfect-incentivised-system-part-1-31l</link>
      <guid>https://forem.com/anistark/designing-the-perfect-incentivised-system-part-1-31l</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;As I started writing this, it became apparent as to how deep the rabbit hole really is... 🐰&lt;/p&gt;

&lt;p&gt;So, I'm breaking up the discovery phase in multiple parts. If you're just catching up, start at the beginning... 🏆&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Incentive systems are frameworks designed to motivate individuals or groups to achieve specific goals by offering rewards, recognition, or penalties. These systems can be implemented in various contexts, from businesses to governments, and are essential for driving behavior that aligns with desired outcomes.&lt;/p&gt;

&lt;p&gt;A well-structured incentive system does more than offer financial rewards. It considers intrinsic motivation, such as the satisfaction of achievement, recognition, or personal growth. Successful incentive systems balance short-term gains with long-term sustainability, preventing negative behaviors like gaming the system or burnout.&lt;/p&gt;

&lt;p&gt;However, designing effective incentive systems requires understanding our psychology, individual preferences, and the dynamics of the environment. Poorly designed systems can lead to unintended consequences, such as encouraging counterproductive competition or diminishing intrinsic motivation. Therefore, the challenge lies in creating incentives that inspire optimal behavior while maintaining fairness and promoting a culture of continuous improvement.&lt;/p&gt;

&lt;p&gt;Incentive systems are not one-size-fits-all. They must be adaptable, transparent, and aligned with the broader values and goals of the organization or community. When executed well, they can significantly enhance performance, engagement, and innovation. But, don't take my word for it. Let's take a trip through time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Origin Story
&lt;/h2&gt;

&lt;p&gt;From the earliest days, we understood that offering something desirable—like food, shelter, or status—could motivate individuals or groups to act in certain ways. These foundational ideas evolved over time, shaping how modern societies and organizations drive productivity and success.&lt;/p&gt;

&lt;p&gt;In the workplace, formal use of incentive systems became prominent during the Industrial Revolution in the 18th and 19th centuries. Factories, driven by mass production, started using financial rewards—like piece-rate pay, where workers earned money based on output—as a way to boost efficiency and productivity. This marked one of the earliest structured incentive systems in modern business.&lt;/p&gt;

&lt;p&gt;By the early 20th century, thinkers like Frederick Taylor and his "scientific management" principles influenced how organizations designed these systems. Taylor emphasized optimizing workflows and using incentives to increase output. His work laid the groundwork for performance-based rewards, which many industries adopted to motivate workers while maximizing profits.&lt;/p&gt;

&lt;p&gt;Over time, incentive systems grew beyond financial rewards. By the mid-20th century, companies began incorporating more diverse incentives, like promotions, recognition programs, and professional development opportunities, acknowledging that motivation was about more than just money.&lt;/p&gt;

&lt;p&gt;Today, incentive systems have evolved further, especially in the digital age. Companies leverage everything from flexible work arrangements to social recognition on platforms, understanding that a blend of intrinsic (personal satisfaction, purpose) and extrinsic (monetary rewards, perks) motivators is essential for driving both individual and organizational success.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📜 The idea of using incentives goes all the way back to ancient Egypt! Pharaohs used a kind of "bonus" system to motivate workers building the pyramids. Workers were sometimes paid in beer—a valuable commodity back then—encouraging them to work harder and stay motivated during massive construction projects.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Nosedive
&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%2Fkh7jtt360tbd3sd9160y.jpeg" 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%2Fkh7jtt360tbd3sd9160y.jpeg" alt="" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Black Mirror episode "Nosedive" (Season 3, Episode 1), the entire society operates on a highly sophisticated incentive system based on a personal rating system that impacts nearly every aspect of people's lives. This episode provides a dystopian commentary on how a culture driven by social ratings and approval can create incentives that influence behavior in troubling ways.&lt;/p&gt;

&lt;h3&gt;
  
  
  Social Rating as Currency
&lt;/h3&gt;

&lt;p&gt;In Nosedive, each person is constantly rated on a scale of 1 to 5 ⭐️ after every interaction, whether it's a casual conversation, a service experience, or a social media post. These ratings are given and received through augmented reality (via implants and smart devices), making social validation an omnipresent and quantifiable aspect of life.&lt;/p&gt;

&lt;h3&gt;
  
  
  Incentive Structure:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;High Ratings = Privilege&lt;/strong&gt;: People with a high rating (closer to 5 ⭐️) have access to better services, exclusive communities, and high social status. For example, they can rent luxury apartments, book first-class flights, and attend elite social events. This creates a strong incentive for individuals to continually strive for positive ratings. ✨&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Low Ratings = Social Exclusion&lt;/strong&gt;: People with low ratings (under 3 ⭐) face social ostracism and exclusion. They are denied access to certain services, treated with disdain, and can lose their jobs, housing, or even friends. This drives a constant fear of dropping in social status. 🚩&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Behavioral Modification Through Ratings
&lt;/h3&gt;

&lt;p&gt;The rating system in Nosedive creates powerful incentives for people to adjust their behavior, often in artificial or inauthentic ways. People engage in overly polite, agreeable, and upbeat interactions, constantly trying to please others to maintain or improve their ratings. Authenticity and genuine connection takes a backseat to a shroud of perfection.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Politeness and Conformity&lt;/strong&gt;: The system encourages extreme politeness and conformity because even small, everyday interactions (like ordering coffee or meeting a stranger) are rated. People aim to avoid conflict or any behavior that might offend others, leading to shallow and artificial interactions. Do you think future meaning of AI will be Artificial Interactions?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Social Media Performance&lt;/strong&gt;: People carefully curate their social media profiles and posts to reflect an idealized version of their lives. The system incentivizes creating a false sense of happiness and success to earn positive ratings. On some level this might even feel relatable in our current society.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cascading Effects of Low Ratings
&lt;/h3&gt;

&lt;p&gt;Once someone’s rating starts to fall, the system makes it increasingly difficult for them to recover. This cascading effect mirrors the real-world phenomenon of negative feedback loops, where one small mistake leads to more severe consequences.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Instant Demotion in Social Status&lt;/strong&gt;: In the episode, the protagonist, Lacie, experiences a sudden drop in her rating after a series of negative interactions. As her rating falls, people begin treating her worse, and even minor slip-ups lead to further ratings hits.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Punitive Measures&lt;/strong&gt;: At one point, Lacie is punished for a public outburst by having her rating severely downgraded, making it even harder for her to participate in society. This punishment creates fear among others, incentivizing them to be even more cautious about their behavior.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Economic and Social Mobility Tied to Ratings
&lt;/h3&gt;

&lt;p&gt;The social rating system directly influences economic and social mobility. People with high ratings enjoy better career opportunities, housing, and access to resources, while those with lower ratings are marginalized and often trapped in poverty or undesirable circumstances.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;💼 Job Opportunities&lt;/strong&gt;: Many jobs in the Nosedive universe require a minimum rating. For example, Lacie’s dream is to move into an upscale apartment complex, but she needs a rating of 4.5 or higher to qualify for a discount. This incentivizes her to engage in strategic social interactions and build relationships with high-status individuals to boost her rating.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🏘 Housing &amp;amp; Services&lt;/strong&gt;: Access to certain housing, transportation, and even healthcare services is based on one’s rating. People with lower ratings find themselves excluded from basic services, motivating them to constantly improve their scores to regain access.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Incentive Trap
&lt;/h3&gt;

&lt;p&gt;While the system is designed to incentivize "good" behavior and social harmony, it ends up encouraging manipulation, superficiality, and emotional suppression. Instead of fostering genuine connections, it pushes people to prioritize their public image over authentic relationships.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inauthenticity&lt;/strong&gt;: People are incentivized to present an idealized version of themselves, even at the cost of their own well-being. Lacie, for example, suppresses her emotions and thoughts to appear perfect, but this leads to a breakdown when her façade starts to crack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Social Pressure&lt;/strong&gt;: The constant pressure to perform for others creates a toxic social environment where people are judged solely by their ratings, rather than by their character or contributions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Systemic Breakdown &amp;amp; Personal Collapse
&lt;/h3&gt;

&lt;p&gt;In the end, the incentive system in Nosedive proves unsustainable. Lacie’s obsession with improving her rating leads to her mental and emotional unraveling. She spirals into desperation, and her inability to conform to the social norms results in her exile from the high-status world she aspired to join.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🏃🏻‍♂️ Escape from the System&lt;/strong&gt;. Ironically, Lacie finds freedom after her rating drops to zero and she’s imprisoned. In a critical moment, she exchanges insults and genuine emotions with another prisoner, highlighting that, outside the rating system, people can express themselves freely and honestly without the pressure of constant judgment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The incentive system in Black Mirror's Nosedive illustrates how an over-reliance on ratings, approval, and superficial metrics can distort our behavior and relationships. While it rewards politeness, success, and conformity, it also suppresses individuality, authenticity, and emotional expression. The episode serves as a cautionary tale about how unchecked incentive systems, driven by external validation, can lead to societal and personal dysfunction.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Game Theory
&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%2Fys8ynp2xdylh178rv6q6.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%2Fys8ynp2xdylh178rv6q6.png" alt="Game Theory" width="768" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Game theory is the study of strategic interactions between individuals or groups where the outcome for each participant depends not only on their own actions but also on the actions of others. Developed in the mid-20th century by mathematician John von Neumann and economist Oskar Morgenstern, game theory has since become a crucial tool in economics, politics, psychology, and even biology.&lt;/p&gt;

&lt;p&gt;🧩 At its core, game theory seeks to understand how rational players make decisions in situations of conflict or cooperation. A key concept is the Nash equilibrium, introduced by John Nash, where no player has an incentive to change their strategy given what others are doing. Other famous models include the &lt;strong&gt;Prisoner’s Dilemma&lt;/strong&gt;, where two players may not cooperate even if it's in their best interest, and &lt;strong&gt;Zero-Sum Games&lt;/strong&gt;, where one player's gain is another’s loss.&lt;/p&gt;

&lt;p&gt;Game theory helps explain real-world scenarios like negotiations, business competition, public policy, and even social behaviors, offering insights into how people can optimize decisions in complex environments. Game theory provides valuable insights for designing effective incentive systems by analyzing strategic interactions among individuals or groups. When creating an incentive system, it’s crucial to understand how participants will respond to various incentives and the potential outcomes of their choices. &lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Strategic Interactions
&lt;/h3&gt;

&lt;p&gt;Incentive systems often involve multiple stakeholders whose decisions affect one another. Game theory helps predict how individuals will behave in response to different incentives. By modeling these interactions, designers can anticipate possible outcomes and create systems that encourage desired behaviors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Identifying Nash Equilibria
&lt;/h3&gt;

&lt;p&gt;The concept of Nash equilibrium is pivotal in understanding how individuals may settle into stable strategies where no one has an incentive to change their behavior unilaterally. In designing an incentive system, identifying potential Nash equilibria can help ensure that the chosen incentives promote cooperative behavior rather than competitive or counterproductive actions.&lt;/p&gt;

&lt;p&gt;For example, in a workplace scenario, if an incentive system rewards individual performance without considering team dynamics, employees may prioritize personal gains over collaborative efforts. Game theory can help designers find equilibrium strategies that foster both individual and collective performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Addressing the Prisoner’s Dilemma
&lt;/h3&gt;

&lt;p&gt;The Prisoner’s Dilemma illustrates how rational individuals may not cooperate, even when it’s in their best interest. This dilemma often arises in incentive systems, especially when individual rewards conflict with group goals.&lt;/p&gt;

&lt;p&gt;By understanding this dynamic, designers can create incentive structures that encourage collaboration. For instance, implementing team-based bonuses alongside individual rewards can mitigate the risk of individuals acting solely in their self-interest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Incentives and Information Asymmetry
&lt;/h3&gt;

&lt;p&gt;Game theory also addresses situations where players have different levels of information, leading to information asymmetry. In incentive systems, this can manifest when one party knows more about the task or effort than the other, leading to mistrust or exploitation.&lt;/p&gt;

&lt;p&gt;Designers can counteract these issues by ensuring transparency and communication within the incentive system. For example, implementing performance metrics that are visible to all stakeholders can help align interests and build trust, reducing the chances of opportunistic behavior.&lt;/p&gt;

&lt;h3&gt;
  
  
  Feedback Loops and Dynamic Strategies
&lt;/h3&gt;

&lt;p&gt;Incentive systems often operate in dynamic environments where strategies may evolve over time. Game theory helps analyze feedback loops in these systems, allowing designers to understand how participants’ strategies may change in response to the incentives offered.&lt;/p&gt;

&lt;p&gt;By considering potential shifts in behavior, designers can create flexible incentive structures that adapt over time, ensuring they remain effective as circumstances change. For example, introducing periodic reviews or adjusting rewards based on changing goals can maintain participant engagement and motivation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Balancing Short-Term and Long-Term Goals
&lt;/h3&gt;

&lt;p&gt;Game theory can guide the design of incentive systems that balance short-term and long-term objectives. Participants may focus on immediate rewards at the expense of future benefits, leading to suboptimal outcomes.&lt;/p&gt;

&lt;p&gt;Designers can use game-theoretic principles to create incentives that align short-term actions with long-term goals. For example, structuring bonuses to include both immediate rewards and deferred compensation can encourage sustained effort and commitment to the organization’s vision.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Incorporating game theory into the design of incentive systems provides a robust framework for understanding the strategic interactions of participants. By analyzing these dynamics, designers can create more effective and equitable systems that promote cooperation, align individual and group interests, and ultimately drive desired behaviors. The insights from game theory enable organizations to navigate the complexities of our behavior and foster environments where everyone can thrive.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;...to be continued.&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%2Fxn5xi04qobkr12ofm85y.jpeg" 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%2Fxn5xi04qobkr12ofm85y.jpeg" alt="Tower of God" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>perpetual</category>
      <category>incentive</category>
      <category>systemdesign</category>
      <category>rating</category>
    </item>
    <item>
      <title>What is NFT?</title>
      <dc:creator>Kumar Anirudha</dc:creator>
      <pubDate>Wed, 29 Sep 2021 09:40:54 +0000</pubDate>
      <link>https://forem.com/anistark/what-is-nft-3gpo</link>
      <guid>https://forem.com/anistark/what-is-nft-3gpo</guid>
      <description>&lt;p&gt;NFT or Non-Fungible Token, is the latest in the long line of jargon that you might be hearing a lot about recently. So, why should you care and what is it even? Let’s try to understand the origin and thereby the hype around it.&lt;/p&gt;

&lt;p&gt;A digital token is just another piece of a smart contract code that’s running somewhere on a particular blockchain. When cryptocurrency came out and everybody started issuing their tokens, we saw a meteoric rise to Digital Tokens or CryptoCurrencies in the form of ICOs (Initial Coin Offerings) that every other project was really into at the time. Most used CryptoCurrencies came on the more popular decentralised networks like Ethereum, in the form of ERC-20s. This gave a widespread knowledge around what cryptocurrencies are and ERC-20 became a common term to be used in analogous to digital tokens wherever specified. However, several improvements on specific use-cases kept happening over time. These improvements are usually referred to as &lt;a href="https://eips.ethereum.org/erc" rel="noopener noreferrer"&gt;EIPs(Ethereum Improvement Proposals)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One of the most sought after use-cases was ERC-721 or deeds or as more commonly known as Non-Fungible Tokens.&lt;br&gt;
NFTs can represent ownership over digital or physical assets. It’s obviously not a new concept. It’s been around since 2014.&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%2Fyalgleco2jexeflxawn1.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%2Fyalgleco2jexeflxawn1.png" alt="NFT_Icon.png" width="700" height="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Physical property — houses, unique artwork&lt;/li&gt;
&lt;li&gt;Virtual collectables — unique pictures of kittens, collectable cards&lt;/li&gt;
&lt;li&gt;"Negative value" assets — loans, burdens, and other responsibilities
In general, all houses are distinct and no two kittens are alike. NFTs are distinguishable and you must track the ownership of each one separately.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This by itself doesn’t really mean much but when you really think about it, we already have an extremely large scale demand for such unique items. From collectible cards, items, and luxury antiques, our lives revolve around uniqueness. The more unique an item, the more valuable it becomes. It’s the very core of how our economics work and how every valuable item is identified. Now, with ERC-721, we got a way to represent it online and have a very simple way to buy and sell such assets.&lt;br&gt;
Of course, it comes with its own set of problems like enormous gas fees which one has to pay for networks like Ethereum. Makes it almost impossible to acquire one or more of these very special NFTs for normal people. The NFT market value tripled in 2020, reaching more than $250 million. During the first quarter of 2021, NFT sales exceeded $2 billion. Plagiarism is another big concern where a true digital identity solution can very well fix it. We’ll take all the issues and possible solutions in perhaps a separate post of its own. I feel it deserves a more in-depth analysis.&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%2F6ot7pmdbg41kgevjqa4q.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%2F6ot7pmdbg41kgevjqa4q.png" alt="Banner_NFT-marketplace.png" width="749" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Marketplaces
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://opensea.io/" rel="noopener noreferrer"&gt;OpenSea&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;As one of the most commonly referred NFT marketplaces, OpenSea has established it’s dominance in the space. You can practically buy or sell any type of NFT here. The process is as simplified as it can be. &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.binance.com/en/nft/home" rel="noopener noreferrer"&gt;Binance NFT&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Binance NFT Marketplace brings together artists, creators, and crypto enthusiasts on a single platform to create and trade top NFTs. The platform features 3 product lines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Events: Buy premium and exclusive NFTs created by global leading artists&lt;/li&gt;
&lt;li&gt;Marketplace: Mint, purchase, and bid on NFTs from creators around the world&lt;/li&gt;
&lt;li&gt;Mystery Box: Stand a chance to win rare NFTs in a box full of surprises&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://crypto.com/nft/marketplace" rel="noopener noreferrer"&gt;Crypto.com NFT&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://rarible.com/" rel="noopener noreferrer"&gt;Rarible&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://foundation.app/" rel="noopener noreferrer"&gt;Foundation&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://superrare.com/" rel="noopener noreferrer"&gt;SuperRare&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://wax.atomicmarket.io/" rel="noopener noreferrer"&gt;Atomic Market&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://myth.market/" rel="noopener noreferrer"&gt;Myth Market&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.bakeryswap.org/#/home" rel="noopener noreferrer"&gt;BakerySwap&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://axieinfinity.com/" rel="noopener noreferrer"&gt;Axie Marketplace&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://knownorigin.io/" rel="noopener noreferrer"&gt;KnownOrigin&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://makersplace.com/" rel="noopener noreferrer"&gt;MakersPlace&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://solanart.io/" rel="noopener noreferrer"&gt;Solana Art&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://nbatopshot.com/" rel="noopener noreferrer"&gt;NBA Top Shot&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://async.art/" rel="noopener noreferrer"&gt;Async Art&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://portion.io/" rel="noopener noreferrer"&gt;Portion&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://enjin.io/products/marketplace" rel="noopener noreferrer"&gt;Enjin Marketplace&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.bakeryswap.org/#/home" rel="noopener noreferrer"&gt;BakerySwap&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Even traditional art giants like &lt;a href="https://www.christies.com/" rel="noopener noreferrer"&gt;Christies&lt;/a&gt; are setting up shop around it can step into the modern age.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variations
&lt;/h2&gt;

&lt;p&gt;Over time, some variations of ERC-721 have emerged as well.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ERC-1155 which offers semi-fungibility and works over a class of assets instead of particular assets.&lt;/li&gt;
&lt;li&gt;FLOW blockchain provides proof-of-stake consensus. Mostly used by NBA Top Shot.&lt;/li&gt;
&lt;li&gt;Tezos also works on a proof-of-stake based NFT.&lt;/li&gt;
&lt;li&gt;Solana has also started supporting NFTs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Create your own NFT
&lt;/h2&gt;

&lt;p&gt;A simpler way is to start using one or the platform above mentioned and get started with it. If you want to create your own marketplace or product as such, there’s always a way to do so.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select a DLT network on which you’d like to issue the NFTs on. Preferably one with less transaction fee.&lt;/li&gt;
&lt;li&gt;Write an NFT smart contract or equivalent in that particular network. Here’s a good getting started point are in &lt;a href="https://docs.openzeppelin.com/contracts/2.x/api/token/erc721" rel="noopener noreferrer"&gt;OpenZepplin Docs&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Make sure there’s an easy interface because mind you, most of your users are really just everyday Joes who just want to purchase as an investment strategy. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  So, what all can you use NFTs for?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Art&lt;/li&gt;
&lt;li&gt;GIFs&lt;/li&gt;
&lt;li&gt;Videos and sports highlights&lt;/li&gt;
&lt;li&gt;Collectibles&lt;/li&gt;
&lt;li&gt;Virtual avatars and video game skins&lt;/li&gt;
&lt;li&gt;Designer sneakers&lt;/li&gt;
&lt;li&gt;Music&lt;/li&gt;
&lt;li&gt;Tweets&lt;/li&gt;
&lt;li&gt;Github Commits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, be wary of where you’re buying these NFTs from. Are they authorised sources or someone broker marketplace who’s just selling via some other marketplace? Are they really the owner or authorised seller of the items. Are they backed by a reputable organisation or foundation? Which blockchain or DLT platform are they using and how much transaction fee is that purchase going to cost you? Also, make sure you’re aware of your country or state's legalities and taxation procedures. NFTs are also subject to capital gain tax such as any stock you might own.&lt;/p&gt;

&lt;p&gt;Originally Published at &lt;a href="https://blog.anirudha.dev/what-is-nft" rel="noopener noreferrer"&gt;https://blog.anirudha.dev/what-is-nft&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>nft</category>
      <category>blockchain</category>
      <category>marketplace</category>
      <category>dlt</category>
    </item>
    <item>
      <title>To Go with Golang</title>
      <dc:creator>Kumar Anirudha</dc:creator>
      <pubDate>Fri, 05 Feb 2021 12:07:28 +0000</pubDate>
      <link>https://forem.com/anistark/to-go-with-golang-2b79</link>
      <guid>https://forem.com/anistark/to-go-with-golang-2b79</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At least that's how the website describes itself.&lt;br&gt;
The first time I tried golang was about 3 years ago as a hobby project. However lack of an implementation need and a busy work schedule made my side project obsolete. Of course, you would know what that feels like. Familiar territory. So, when the opportunity rose to write a new service in golang, I absolutely jumped at it.&lt;/p&gt;

&lt;p&gt;I'm supposed to build a small web service accepting http connection and storing some data on mongodb. Returns a certain set of result, and so on. Basic CRUD stuff. If you're not interested in #webdev, I believe this is your stop. If you're interested however, read on to know about what I used and why. The entire dev cycle from dev to deploy phase.&lt;/p&gt;

&lt;p&gt;First of all, why I opted for golang anyway? The service I'm supposed to write needs a highly concurrent persistent api service. It needs to be fast and also easily scalable. We could have gone with python fastapi, but at this stage I just wanted to learn golang.&lt;/p&gt;
&lt;h3&gt;
  
  
  Setting up Golang
&lt;/h3&gt;

&lt;p&gt;If you've finally decided to go ahead with this, let's do this.&lt;br&gt;
Easiest way probably is to just &lt;a href="https://golang.org/doc/install" rel="noopener noreferrer"&gt;download from the official website&lt;/a&gt; and get going.&lt;br&gt;
&lt;a href="https://medium.com/golang-learn/quick-go-setup-guide-on-mac-os-x-956b327222b8" rel="noopener noreferrer"&gt;Here&lt;/a&gt;'s another article which very nicely explains the setup process. This is ideally for mac OS. In case you're looking for other OSes, please follow respective guides.&lt;/p&gt;

&lt;p&gt;Be sure to setup your GOPATH very properly as this will remain as your common ground for any defined packages installed in your system.&lt;/p&gt;

&lt;p&gt;Once done, make sure your console recognises the GOPATH.&lt;br&gt;
&lt;code&gt;echo $GOPATH&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  HTTP Service
&lt;/h3&gt;

&lt;p&gt;I went with &lt;a href="https://github.com/valyala/fasthttp" rel="noopener noreferrer"&gt;fasthttp&lt;/a&gt;, which provides high performance, zero memory allocations in hot paths and Up to 10x faster than net/http for a large throughput service. Go provides out of the box http support but for a beginner, it felt much easier to go with a framework, thereby ended up using fiber.&lt;/p&gt;
&lt;h3&gt;
  
  
  API
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/gofiber/fiber" rel="noopener noreferrer"&gt;Fiber&lt;/a&gt; is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go.&lt;br&gt;
Make sure to use Fiber v2. Fiber V2 has a lot of breaking changes to Fiber v1. I had to spend an extra hour just upgrading these &lt;a href="https://github.com/gofiber/fiber/issues/736" rel="noopener noreferrer"&gt;breaking changes&lt;/a&gt; cause I started with v1.&lt;/p&gt;

&lt;p&gt;A simple fiber service can be started using just this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"github.com/gofiber/fiber/v2"&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;fiber&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;fiber&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SendString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, World 👋!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;":3000"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You now have a live server running at your &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connect to a DataBase
&lt;/h3&gt;

&lt;p&gt;Next, we need our web service to talk to our web-service. There are quite a few ODM(Object Document Mapper) out there. But given my initial requirement was pretty straightforward, I went the default &lt;a href="https://github.com/mongodb/mongo-go-driver" rel="noopener noreferrer"&gt;mongodb golang driver&lt;/a&gt;.&lt;br&gt;
It's pretty straightforward to connect an mongodb client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;mongo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ApplyURI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"mongodb://localhost:27017"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, now we got an active db connection going.&lt;br&gt;
Ideally, that's all we would need to create the smallest possible POC(Proof Of Concept) of any web-service you can think of.&lt;br&gt;
Obviously, do go through the proper documentation as there are many pitfalls at every stage. Might as well address a few of those on a separate post.&lt;/p&gt;

&lt;p&gt;However, to make a production level POC, we need a few more stuff. So, let's discover a few add-ons to our service:&lt;/p&gt;
&lt;h3&gt;
  
  
  Logging
&lt;/h3&gt;

&lt;p&gt;Logging is one of the most important aspects in any programming. To see what's working and where has been the crux of any development really. We sometimes debug using our logs. Specially in production.&lt;br&gt;
The easiest and in-built way of printing/logging can be done using &lt;a href="https://golang.org/pkg/fmt/" rel="noopener noreferrer"&gt;fmt&lt;/a&gt; or &lt;a href="https://golang.org/pkg/log/" rel="noopener noreferrer"&gt;log&lt;/a&gt; packages.&lt;br&gt;
A small example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Printing with fmt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;buf&lt;/span&gt;    &lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Buffer&lt;/span&gt;
&lt;span class="n"&gt;logger&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"logger: "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Lshortfile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Logging with log"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The use log is highly encouraged as compared to fmt. Log is thread safe where as fmt is not. A Logger can be used simultaneously from multiple goroutines; it guarantees to serialize access to the Writer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fatalf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Fatal err happened:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also add fatal logs if in case you would want to flag certain types of logs which might be critical to the application.&lt;/p&gt;

&lt;p&gt;Some added advantages of using Fiber is it's logging module. If you're on v1, you would need to install the &lt;a href="https://github.com/gofiber/logger" rel="noopener noreferrer"&gt;logger package&lt;/a&gt; separately, but in v2 it has been made available within v2 itself: &lt;code&gt;"github.com/gofiber/fiber/v2/middleware/logger"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you need to log each request as and when it comes in, you can add something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;requestid&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="n"&gt;Use&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="n"&gt;Config&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// For more options, see the Config section&lt;/span&gt;
  &lt;span class="n"&gt;Format&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"${pid} ${locals:requestid} ${status} - ${method} ${path}​&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;​"&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, each route visited will come up on your console.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hot Reloading
&lt;/h3&gt;

&lt;p&gt;Golang is a compiled language, which means unlike Python or NodeJS which are interpreted languages, we need to build it everytime we would want to run it.&lt;br&gt;
Ideally we build the project as such: &lt;code&gt;go build .&lt;/code&gt;&lt;br&gt;
And then we run it like: &lt;code&gt;./app-name&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, we can still run the dev version as: &lt;code&gt;go run main.go&lt;/code&gt;&lt;br&gt;
Or if there's more than one file: &lt;code&gt;go run *.go&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But while development process, we often make changes and would want to check the output without having to restart the go server manually.&lt;br&gt;
You can obviously write your own small shell script to detect any file changes on the entire directory and restart &lt;code&gt;go run&lt;/code&gt; everytime.&lt;br&gt;
If you're using docker, you can also write the entire &lt;code&gt;go build .&lt;/code&gt; and &lt;code&gt;./app-name&lt;/code&gt; process inside the container.&lt;/p&gt;

&lt;p&gt;Needed a more robust way, which is provided by this package called fresh.&lt;br&gt;
&lt;a href="https://github.com/gravityblast/fresh" rel="noopener noreferrer"&gt;Fresh&lt;/a&gt; is a command line tool that builds and (re)starts your web application everytime you save a Go or template file.&lt;br&gt;
You can also customise the log color that comes with the default fresh setup. It requires a default &lt;code&gt;runner.conf&lt;/code&gt; file. If you want to go with the default options, you don't even need this file on your project root.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root:              &lt;span class="nb"&gt;.&lt;/span&gt;
tmp_path:          ./tmp
build_name:        runner-build
build_log:         runner-build-errors.log
valid_ext:         .go, .tpl, .tmpl, .html
no_rebuild_ext:    .tpl, .tmpl, .html
ignored:           assets, tmp
build_delay:       600
colors:            1
log_color_main:    cyan
log_color_build:   yellow
log_color_runner:  green
log_color_watcher: magenta
log_color_app:     blue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we've a complete dev setup done and dusted.&lt;/p&gt;

&lt;h3&gt;
  
  
  Routing
&lt;/h3&gt;

&lt;p&gt;I'm obsessed with structured code. Everything can be written in a single file and ran but a structured codebase, makes it all the more easier to document, read and later manage it.&lt;br&gt;
Thereby, routing is a crucial part of adopting a new framework.&lt;br&gt;
Fiber comes with inbuilt route grouping&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;fiber&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="n"&gt;api&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/api"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// /api&lt;/span&gt;

    &lt;span class="n"&gt;v1&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c"&gt;// /api/v1&lt;/span&gt;
    &lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/list"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;             &lt;span class="c"&gt;// /api/v1/list&lt;/span&gt;
    &lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;             &lt;span class="c"&gt;// /api/v1/user&lt;/span&gt;

    &lt;span class="n"&gt;v2&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/v2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c"&gt;// /api/v2&lt;/span&gt;
    &lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/list"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;             &lt;span class="c"&gt;// /api/v2/list&lt;/span&gt;
    &lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;             &lt;span class="c"&gt;// /api/v2/user&lt;/span&gt;

    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;":3000"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can help you in writing a more structured app as such you might need to authenticate only a particular group or log a particular route and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment
&lt;/h3&gt;

&lt;p&gt;Probably best to go with a containerised deployment. We have deployed on &lt;a href="https://cloud.google.com/kubernetes-engine" rel="noopener noreferrer"&gt;Kubernetes - Google Kubernetes Engine (GKE)&lt;/a&gt; which only needs an additional &lt;code&gt;Dockerfile&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It's better to go with a multi-stage docker setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;golang:1.12-alpine&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;build_base&lt;/span&gt;

&lt;span class="k"&gt;RUN &lt;/span&gt;apk add &lt;span class="nt"&gt;--no-cache&lt;/span&gt; git

&lt;span class="c"&gt;# Set the Current Working Directory inside the container&lt;/span&gt;
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /tmp/go-sample-app&lt;/span&gt;

&lt;span class="c"&gt;# We want to populate the module cache based on the go.{mod,sum} files.&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; go.mod .&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; go.sum .&lt;/span&gt;

&lt;span class="k"&gt;RUN &lt;/span&gt;go mod download

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;

&lt;span class="c"&gt;# Unit tests&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nv"&gt;CGO_ENABLED&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0 go &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt;

&lt;span class="c"&gt;# Build the Go app&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;go build &lt;span class="nt"&gt;-o&lt;/span&gt; ./out/go-sample-app .

&lt;span class="c"&gt;# Start fresh from a smaller image&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; alpine:3.9&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apk add ca-certificates

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; --from=build_base /tmp/go-sample-app/out/go-sample-app /app/go-sample-app&lt;/span&gt;

&lt;span class="c"&gt;# This container exposes port 8080 to the outside world&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 8080&lt;/span&gt;

&lt;span class="c"&gt;# Run the binary program produced by `go install`&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["/app/go-sample-app"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A complete guide on dockerising your golang app can be found &lt;a href="https://codefresh.io/docs/docs/learn-by-example/golang/golang-hello-world/" rel="noopener noreferrer"&gt;here&lt;/a&gt; and &lt;a href="https://www.docker.com/blog/containerize-your-go-developer-environment-part-1/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With this we've now a deployed version of our golang app. Connect that gke ip to your preferred DNS provider and share the link. Feel free to leave a link of you first golang app in the comments. Would love to see what everyone is working on.&lt;/p&gt;

&lt;p&gt;If you have a different view on some of the stack used or talked here, feel free to add your thoughts. We're all learning and would love to see the more popular frameworks and best practices in use.&lt;/p&gt;

&lt;p&gt;Cheers and until next time...&lt;/p&gt;




&lt;p&gt;(Originally published &lt;a href="https://blog.anirudha.dev/post/to-go-with-golang/" rel="noopener noreferrer"&gt;here&lt;/a&gt;)&lt;br&gt;
Hope it was helpful and do let me know what else you would love reading more about.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
