<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Igor Shadurin</title>
    <description>The latest articles on DEV Community by Igor Shadurin (@shadurin).</description>
    <link>https://dev.to/shadurin</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%2F1186043%2F520e8d08-246d-46c3-955e-31bf2e1b929d.jpeg</url>
      <title>DEV Community: Igor Shadurin</title>
      <link>https://dev.to/shadurin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shadurin"/>
    <language>en</language>
    <item>
      <title>How to generate AI images 8x cheaper?</title>
      <dc:creator>Igor Shadurin</dc:creator>
      <pubDate>Wed, 28 Jan 2026 08:02:56 +0000</pubDate>
      <link>https://dev.to/shadurin/how-to-generate-ai-images-8x-cheaper-502k</link>
      <guid>https://dev.to/shadurin/how-to-generate-ai-images-8x-cheaper-502k</guid>
      <description>&lt;p&gt;A few months ago, I was working on a pet project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://yumcut.com/?utm_source=devto_article_1" rel="noopener noreferrer"&gt;YumCut&lt;/a&gt; is an end-to-end service for creating short vertical videos: from writing the text and generating images to editing and adding subtitles.&lt;/p&gt;

&lt;p&gt;A critical problem showed up quickly: cost. One minute of video required about twenty generated images, or $0.8/min. Besides the visuals, you also need to generate audio - $0.2/min - plus minor additional costs for editing and subtitle generation.&lt;/p&gt;

&lt;p&gt;I started looking for a way out. This article is about the unconventional techniques that helped reduce the cost by several times, and about an open-source solution that makes it possible to generate images eight times cheaper than commercial APIs. Full code and instructions are available on &lt;a href="https://github.com/IgorShadurin/yumcut-cheap-image-generation" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  First approach: multiple scenes in one frame
&lt;/h2&gt;

&lt;p&gt;The logical solution seemed obvious: generate several images in a single request by placing scenes next to each other. In theory, this should reduce costs proportionally to the number of images.&lt;/p&gt;

&lt;p&gt;The first attempt was to put all eight scenes into the prompt at once. The result was disastrous: the model simply mixed all elements into one blurry composition, unusable for video editing.&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%2Fii128e66ftrb1rdnn269.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%2Fii128e66ftrb1rdnn269.png" alt="Messy images" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By reducing the number of scenes to two per image, I got an acceptable result. That already cut the cost in half, but it was still far from the target.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key insight: borders must be literally visible
&lt;/h3&gt;

&lt;p&gt;It turned out that AI models struggle to determine logical boundaries between separate areas. The solution was simple: use colored zones (red and blue).&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%2F0st4w8a8ljisgwfgw1ye.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%2F0st4w8a8ljisgwfgw1ye.png" alt="Red and blue" width="800" height="1422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of an abstract description, I started sending a PNG template with clear borders and a matching instruction: "The first idea is in the red area, the second idea is in the blue area. Fill each area completely."&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%2F0j3rbw85rlv4ad2pho0x.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%2F0j3rbw85rlv4ad2pho0x.jpg" alt="Two sides images" width="800" height="890"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This technique did not require additional costs, but it dramatically improved the quality of scene separation. The model now understood the structure and rarely mixed elements.&lt;/p&gt;

&lt;p&gt;However, this was only a partial solution. I needed a drastic reduction. I had to cut the price by another order of magnitude.&lt;/p&gt;

&lt;h2&gt;
  
  
  Second approach: migrating to open-source alternatives
&lt;/h2&gt;

&lt;p&gt;The idea was to find open-source/open-weight image-generation models, run them in the cloud, and reduce costs that way.&lt;/p&gt;

&lt;p&gt;First, I had to identify which models were freely available. There are many: Qwen-Image, FLUX, HunyuanImage, Stable Diffusion, and others. For my use case, I had one extra requirement - the ability to reuse characters across many generated images. That is why I chose Qwen-Image-Edit.&lt;/p&gt;

&lt;p&gt;I audited the market of commercial generators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Major APIs (OpenAI/Google Gemini/Stability AI): similar prices or higher&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Alibaba cloud services: about $0.04 per image - roughly the same&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Self-hosted options like RunPod: you need a large number of images per run to reach meaningful savings&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The picture was disappointing - even the creators of Qwen-Image, Alibaba, were offering the model at inflated prices. But then I found &lt;a href="https://runware.ai/" rel="noopener noreferrer"&gt;runware.ai&lt;/a&gt; and &lt;a href="https://together.ai/" rel="noopener noreferrer"&gt;together.ai&lt;/a&gt;, where generating images with Qwen-Image-Edit and Qwen-Image was almost eight times cheaper than Nano Banana - ~$0.005 vs. $0.04.&lt;/p&gt;

&lt;h2&gt;
  
  
  Third approach: improving image detail
&lt;/h2&gt;

&lt;p&gt;As it turned out, with low image-generation prices the model started producing more uniform images - all scenes looked too similar to each other.&lt;/p&gt;

&lt;p&gt;Here is an example of generated images with different prompts about a happy cat on the beach:&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%2Fi9upcbona0gksvofn9fx.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%2Fi9upcbona0gksvofn9fx.jpg" alt="Cat 1" width="800" height="800"&gt;&lt;/a&gt;&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%2F2aul8i97h140w19302up.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%2F2aul8i97h140w19302up.jpg" alt="Cat 2" width="800" height="800"&gt;&lt;/a&gt;&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%2F7zu51t72o3ronnsx0wkh.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%2F7zu51t72o3ronnsx0wkh.jpg" alt="Cat 3" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though the images look good, there is a missing layer for improving the story prompts. The obvious solution is to add a layer between the story prompt and the image generator. But it has to be an LLM that does not increase the cost significantly.&lt;/p&gt;

&lt;p&gt;To test many LLMs, I used &lt;a href="https://openrouter.ai/" rel="noopener noreferrer"&gt;openrouter.ai&lt;/a&gt;. Once you write the wrapper code, you can switch to any available model. After testing a dozen models, I settled on openai/gpt-oss-120b with low reasoning effort. The improved image-generation prompt costs about ~$0.0003, and the images above turn into results like these.&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%2Fzyspjsvuqugqp537zz0c.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%2Fzyspjsvuqugqp537zz0c.jpg" alt="Cat 1 improved" width="800" height="800"&gt;&lt;/a&gt;&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%2F140757i1qsm5o3l3e4h2.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%2F140757i1qsm5o3l3e4h2.jpg" alt="Cat 2 improved" width="800" height="800"&gt;&lt;/a&gt;&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%2Fn0sp1pz3hgfcjdfij9nd.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%2Fn0sp1pz3hgfcjdfij9nd.jpg" alt="Cat 3 improved" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The images became more diverse even with nearly the same prompt. GPT OSS improved the description for Qwen-Image, and you now have a lever that lets you control the style and mood of the images.&lt;/p&gt;

&lt;p&gt;Results: numbers that speak for themselves&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%2F9bi1jawbm2syqkq7vezy.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%2F9bi1jawbm2syqkq7vezy.jpeg" alt="A table with the results" width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By combining the two approaches, the price drops by another factor of two, but sometimes you will see artifacts in the images because the original image is being split.&lt;/p&gt;

&lt;p&gt;This price was good enough for me, so I stopped at this result.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Dive into dApps: Your Ultimate Guide to Start Crafting Them Today!</title>
      <dc:creator>Igor Shadurin</dc:creator>
      <pubDate>Tue, 17 Oct 2023 09:45:48 +0000</pubDate>
      <link>https://dev.to/shadurin/dive-into-dapps-your-ultimate-guide-to-start-crafting-them-today-5h0b</link>
      <guid>https://dev.to/shadurin/dive-into-dapps-your-ultimate-guide-to-start-crafting-them-today-5h0b</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Content Overview&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What is dApp?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What client-side technologies should be used for a dApp?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Which type of domain should you choose?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Authentication: MetaMask's Dark Side&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Blockchain Selection: Which Chains Are Best for dApps?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Funding Your Idea Through Grants&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What is dApp?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The commonly accepted definition of a dApp is, in short, an application that can operate autonomously using a distributed ledger system. At first glance, it seems straightforward. But, when you begin to question and list examples of dApps, it appears most dApps wouldn't qualify. It may even seem as if true dApps don't exist.&lt;/p&gt;

&lt;p&gt;If one developer tried to explain to another what a dApp is in 2023, they'd probably say, "Well, it's like a website that calls various APIs working with blockchain." Just like that, the magic of the term 'dApp' would vanish. The other developer would think, "What's the big deal? Why so much fuss about it?"&lt;/p&gt;

&lt;p&gt;The reason is that the genuine concept of dApps has long been sacrificed for user convenience. Originally, the term implied that every instance of the application runs on the user's device. You'd fetch wallet balances from your node, and you'd send transactions from it as well. The application itself should be stored on a distributed storage system resistant to censorship, outages, and attacks. All user-generated data should also be stored in such storage or directly in a blockchain smart contract.&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%2F6ewasuqqczfn18u7jf0s.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%2F6ewasuqqczfn18u7jf0s.png" alt="dApps Architecture" width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's a captivating concept, but it clashed with reality. Blockchain data can weigh gigabytes or even terabytes. Decentralized storage requires specific software, space for distributed data, isn't as fast as AWS, and often needs specialized browsers. Interacting with smart contracts costs money in cryptocurrency, and purchasing it isn't straightforward for first-timers. Then, factor in the complexity of setup, the need for specialized knowledge, ample free time, and the myriad of blockchains out there.&lt;/p&gt;

&lt;p&gt;So, dApp developers started offloading the most complex parts for users to separate services, interfacing with them solely via APIs. Now, almost every blockchain has its API. This means dApps have to store settings for each network to cater to more users.&lt;/p&gt;

&lt;p&gt;While APIs for distributed storage exist, hosting the dApp on them isn't efficient. Most solutions can't compete with web2 in speed and convenience. Hence, such storage systems are only used for tasks where response time isn't a priority. Even on Hackernoon, Arweave is used only for backing up articles.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What client-side technologies should be used for a dApp?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Well, if we aim to reach the maximum number of people in 2023 and 2024, then client-side web technologies are the way to go for creating a dApp. True, backend technologies like PHP and Python won't cut it, but any framework based on JavaScript/Typescript will do the trick. You can pick from the top 3 frameworks: React, Angular, or Vue.js. However, in my experience, Web3 components for Angular are rarer. My personal choice is React with Typescript. Of course, nobody's stopping you from using plain JavaScript, but why would you?&lt;/p&gt;

&lt;p&gt;Further, for interacting with smart contracts, you'll need some kind of library. The most popular ones are Web3.js and ethers.js. In my opinion, both aren't the most elegant. Their APIs frequently change, and code examples older than a year might not work straight away. My personal pick is ethers.js. Its structure feels more intuitive to me, and compared to Web3.js, the solutions tend to be more concise. In the documentation of various projects, examples are usually provided for at least these two libraries.&lt;/p&gt;

&lt;p&gt;First and foremost, create an empty project (React + Typescript).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-react-app project-name &lt;span class="nt"&gt;--template&lt;/span&gt; typescript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Navigate to the project directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;project-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install ethers. This will ensure you have the most up-to-date version. Keep in mind that older examples from the internet might not work without adjustments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i ethers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;Which type of domain should you choose?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;No, I'm not talking about top-level domains like .com, .org, and the like. I'm discussing whether one should opt for decentralized domains instead of traditional ones.&lt;/p&gt;

&lt;p&gt;Yes, domains can be decentralized too. Instead of the usual top-level domains, you might come across ones like .eth, .nft, .wallet, .crypto, and .go. Unfortunately, using them in popular browsers (like Chrome and Safari) without additional extensions won't work. Various companies have been trying for years to establish a domain zone that functions both in web2 and web3. So far, agreements have only been reached with less popular browsers like Opera and Brave. In these browsers, Web3 domains work.&lt;/p&gt;

&lt;p&gt;So, if your target audience primarily uses the most popular browsers, the choice is clear: you need a Web2 domain. However, if your application becomes popular, domain squatters might purchase a domain with your project's name. When the Web3 revolution takes place and domains become accessible in all browsers, these squatters will likely demand a hefty price for that domain.&lt;/p&gt;

&lt;p&gt;From this, it emerges that Web3 domains might be worth purchasing as a safeguard against squatters or for a hardcore audience using specific browsers.&lt;/p&gt;

&lt;p&gt;Furthermore, such domains can serve as an alternative to the unreadable wallet addresses. Instead of a complex address like &lt;code&gt;0x5301b241879e66EC45fD284D3D97A5C51472D6f3&lt;/code&gt;, you could use a domain like &lt;code&gt;mydapp.crypto&lt;/code&gt; to send and receive funds.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Authentication: MetaMask's Dark Side&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Currently, MetaMask stands as the most popular browser extension for storing people's wallet private keys. The private key is the most crucial element - "Not Your Keys, Not Your Crypto". Entrusting such a vital component to anyone is a no-go, making it preferable to store it on one's device. MetaMask, in this context, allows users to keep their private key locally and doesn't share it with anyone, not even dApps, no matter how nicely they ask.&lt;/p&gt;

&lt;p&gt;Despite its millions of users, getting started with MetaMask isn't straightforward. One has to go through a myriad of not-so-simple steps to set up an initial empty wallet. And then, an equal number of steps are required to fund that wallet. I can confidently say that the next billion users will opt for a different solution. But as of now, it's the industry standard, and every dApp should support MetaMask.&lt;/p&gt;

&lt;p&gt;But what if I told you there are over a hundred other wallets out there? It would be ideal to support those as well. But don't pull your hair out just yet! Solutions already exist that support all popular wallets. Typically, apart from browser extensions, these solutions also cater to mobile apps, significantly broadening the potential user base.&lt;/p&gt;

&lt;p&gt;Examples of services you can use: Web3Auth, WalletConnect.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Blockchain Selection: Which Chains Are Best for dApps?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If you delve into the website of nearly any blockchain project, you're often met with bold claims: their blockchain is the fastest, most user-friendly, cheapest, and boasts millions of users now or will very soon. So, with this vast array of blockchains and ecosystems, how do you pick the right one?&lt;/p&gt;

&lt;p&gt;In my view, the answer is clear-cut: if the blockchain is EVM-compatible, you're already halfway there. EVM, or Ethereum Virtual Machine, backed by the Ethereum Foundation, is a standard that any blockchain project can adopt. Critically, all tools for testing, debugging, deployment, linting, explorers, etc., will seamlessly integrate with this new chain. This means that if you create a dApp for one EVM-compatible project, it can, with minimal configuration, work across nearly all others. Sounds like magic, right?&lt;/p&gt;

&lt;p&gt;Regarding non-EVM compatible projects, when developing dApps for them, you must have a clear rationale. Recognize that targeting these chains may limit your user base, offer fewer tools, and present more unprecedented bugs. The smart contract languages also differ, sometimes drastically. Here are the languages used for smart contract development in the top 20 capitalization projects: Solidity, Plutus, FunC. Each of these languages is tailored specifically for individual blockchains. Grasping each requires considerable time, as their operational principles vary substantially.&lt;/p&gt;

&lt;p&gt;Of course, you can architect your dApp to operate across a majority of these diverse chains. However, that's an advanced move and quite time-consuming. Straddling two worlds isn't always straightforward.&lt;/p&gt;

&lt;p&gt;Let's dive right back into building our dApp with the newfound knowledge at our disposal. For this walkthrough, I'll be using the Gnosis Chain as our EVM-compatible blockchain. It's an L2 network that boasts cost-efficient transactions. For several years now, I've deployed a public notes smart contract on it, allowing users to create textual notes under their usernames. You can find it at this address: &lt;code&gt;0xf6b270136Da7F8a2113B93a3b9Eeaf5160C45bA0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To read data from this contract, you first need to instantiate a provider. A provider essentially acts as an RPC API to a specific blockchain node. The server delivering the data is already in sync with the blockchain network and provides the most up-to-date state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;const provider &lt;span class="o"&gt;=&lt;/span&gt; new JsonRpcProvider&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'https://rpc.gnosischain.com/'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To fetch data from our contract, we'll create an instance of &lt;code&gt;Contract&lt;/code&gt; from &lt;code&gt;ethers&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;const contract &lt;span class="o"&gt;=&lt;/span&gt; new Contract&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'0xf6b270136Da7F8a2113B93a3b9Eeaf5160C45bA0'&lt;/span&gt;, notesAbi, provider&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I had linked my contract address with a .eth domain, then you could access the contract like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;const contract &lt;span class="o"&gt;=&lt;/span&gt; new Contract&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'myapp.eth'&lt;/span&gt;, notesAbi, provider&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this instance, we're passing in my smart contract's address, the provider, and the ABI (Application Binary Interface). The ABI ensures that the node can interpret state data from binary correctly. The ABI content is quite detailed for this article, so I've moved it to a separate URL.&lt;/p&gt;

&lt;p&gt;Next, we need to prepare the username in the required format to use it for data retrieval:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;const usernameHash &lt;span class="o"&gt;=&lt;/span&gt; keccak256&lt;span class="o"&gt;(&lt;/span&gt;toUtf8Bytes&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'igor'&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, you can fetch all the records I've saved in the smart contract like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;const items &lt;span class="o"&gt;=&lt;/span&gt; await contract.getNotes&lt;span class="o"&gt;(&lt;/span&gt;usernameHash&lt;span class="o"&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 can check out the entire code for &lt;code&gt;App.tsx&lt;/code&gt; &lt;a href="https://gist.github.com/IgorShadurin/a5b768f145a7e5c314839baf00d6e0f2" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also, a quick heads-up: In the example, I'm using a free provider. If you're scaling a dApp with a significant user base, it might not be suitable. In such cases, you'd either want to set up your node or opt for paid providers from services like Alchemy or Infura.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Funding Your Idea Through Grants&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In the fast-paced world of dApps, innovative ideas can often operate at a loss for extended periods. It's great if you've got a plan to turn a profit swiftly and a few thousand dollars to sustain yourself in the meantime. But if you don't, fret not.&lt;/p&gt;

&lt;p&gt;Ideas with a sound financial potential always catch the eye of venture angels and investors. But in the Web3 universe, innovation is additionally fostered through grants provided by major foundations such as Ethereum, Binance, and Optimism. These grants are often disbursed without any strings attached, either in phases or as a lump sum. Unlike venture capital, grants don't come with the business obligations typical of angel investors.&lt;/p&gt;

&lt;p&gt;Projects awarded grants from a specific foundation should, in the long run, positively impact that specific ecosystem. The conditions and allocated amounts vary from one foundation to another, with grant amounts ranging from hundreds to hundreds of thousands of dollars. These are often disbursed in the project's native tokens.&lt;/p&gt;

&lt;p&gt;To gauge if your project idea aligns with a particular grant program, study previously awarded grants and benchmark against your own. Think you can deliver something similar, or even better? You're likely grant material.&lt;/p&gt;

&lt;p&gt;But bear in mind, securing a grant can be a long process. Despite being a fantastic avenue to bring your project to life, be prepared for &lt;em&gt;each&lt;/em&gt; stage to take weeks or even months. The stages you'll navigate are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Application Preparation&lt;/strong&gt;. Many grant applications are straightforward. You'll be detailing your idea and showcasing your team's expertise. Put forward a compelling pitch about both the project and the team. Lack of experience in Web3 might reduce your chances of securing a grant.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project Evaluation&lt;/strong&gt;. After submitting your application, anticipate a long evaluation phase. The higher the grant amount requested, the longer the evaluation. Typically, you'll receive an approval or rejection email. However, some projects might ghost your application. A month post-submission, don't hesitate to follow up on the application status. And feel free to apply to multiple foundations. Some projects might even qualify for grants from various foundations. Just be wary of potential conflicts of interest and clarify the feasibility of securing multiple grants upfront.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Contract Signing&lt;/strong&gt;. Post grant approval, you'll engage in a phase of document preparation and signing by all committee members. While you can often start working before the contract signing, there's no guarantee that the contract will get finalized. The hold-up isn't always on the foundation's end; sometimes, sanctions might prevent a grant's disbursement based on your citizenship or residency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project Acceptance&lt;/strong&gt;. Acceptance of your grant can be slow-paced. Every committee member will thoroughly vet your solution. Prep a top-tier demo of your project since some members might have less technical knowledge and will evaluate based solely on your demo resources: demo sites, video presentations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Grant Payout&lt;/strong&gt;. Post a successful grant review, the approval decision goes to accounting. Here, too, payments can get held up, especially if multiple people's confirmations are required. Often, these individuals are engaged across various projects, not just grants.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To obtain a list of nearly all projects offering grants, search for "List Web3 Grants" online.&lt;/p&gt;

&lt;p&gt;As you can see, if you have experience in web2 development, not all concepts in web3 will be clear at first. Many things might raise questions. Nevertheless, this article calls for a part 2, where we could build a full-fledged application using different networks, with the capability to store data in a decentralized manner, as well as interact with smart contracts either at the user's expense or the developer's.&lt;/p&gt;

&lt;p&gt;See you in the next part!&lt;/p&gt;

</description>
      <category>dapps</category>
      <category>blockchain</category>
      <category>cryptocurrency</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
