<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Gareth</title>
        <link>https://paragraph.com/@garethfuller</link>
        <description>Lead frontend at Balancer. Big fan of dogs. Enjoy cycling.</description>
        <lastBuildDate>Thu, 16 Apr 2026 02:57:24 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>Gareth</title>
            <url>https://storage.googleapis.com/papyrus_images/1021c17e0c7a44081d2d2a993fe9b679cf9c4eef0c37fa23a7adfb32f34e2ae2.png</url>
            <link>https://paragraph.com/@garethfuller</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[How to build a DeFi app in 2024]]></title>
            <link>https://paragraph.com/@garethfuller/how-to-build-a-defi-app-in-2024</link>
            <guid>nM3jHb8AWq1cQEWtiTO7</guid>
            <pubDate>Mon, 13 Jan 2025 10:34:28 GMT</pubDate>
            <description><![CDATA[A guide to building production DeFi apps that scale. Back in 2021, I joined Balancer, the popular AMM on Ethereum. I joined at a time when they had gained product market fit for the protocol but the v1 app left a lot to be desired. I was recruited to lead their frontend/product efforts and build out a v2 of the web app. The Balancer leadership at the time were very ideological about decentralization at all layers of the stack and so pushed for the v2 app to be as decentralized as possible. Wh...]]></description>
            <content:encoded><![CDATA[<p>A guide to building production DeFi apps that scale.</p><p>Back in 2021, I joined <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://balancer.fi/">Balancer</a>, the popular AMM on Ethereum. I joined at a time when they had gained product market fit for the protocol but the v1 app left a lot to be desired. I was recruited to lead their frontend/product efforts and build out a v2 of the web app.</p><p>The Balancer leadership at the time were very ideological about decentralization at all layers of the stack and so pushed for the v2 app to be as decentralized as possible. What did that mean?</p><ul><li><p>Static app — The idea being that it can more easily be deployed on decentralised file hosting networks like <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ipfs.tech/">IPFS</a>.</p></li><li><p>No API — Restricted to fetching data from Subgraphs, which were supposed to be the decentralized alternative to a caching API layer, and also onchain calls.</p></li></ul><p>The thought process at the time was that we were moving towards an internet where this would be the norm for DeFi protocols and that the complexity and UX problems would reduce over time. I guess it was also thought that decentralized access points (domains) to these decentralized hosting networks would become more popular, i.e. pointing an <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ens.domains/">ENS</a> address at an IPFS hash and expecting users to access apps that way.</p><p>This did not play out.</p><p>Unfortunately, the world didn’t go this way. Primarily because the technology didn’t improve enough to make the UX better than a typical web2 app, in fact, it’s still much worse if you try to build this way.</p><p>The critical point is that decentralizing frontends is pointless unless the access points are decentralized. I talk more about this in my post about <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://dappness.com/posts/why-frontends-wont-be-decentralized">why frontends won’t be decentralized (anytime soon)</a>.</p><h2 id="h-a-new-start" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">A new start</h2><p>Balancer v3 gave us the opportunity to rethink everything. We looked at the decisions we’d made in the past and the disappointing results of those decisions when it came to UX. It became clear we had to ditch the decentralized frontend philosophy and build and open-source ‘web2’ app. By web2 I just mean leveraging web2 tech as much as possible when building a web3 app, e.g. a server-rendered app instead of a statically built app. This change in direction allowed us to pick the best tech for the job.</p><p>So with that context, here is how I would build a web3 app in 2024.</p><h2 id="h-ditch-static-apps-decentralization-theatre" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Ditch Static Apps: Decentralization theatre</h2><p>Again, tl;dr; pick the best tech for the job. If the access point (domain name) is not decentralized everything else is irrelevant. For now, leverage the latest frontend tech or build with whatever allows you to optimize for UX, for us it was a server-rendered Next.js app. If decentralization of all layers of the stack is important to your project then open-source the app, make it as easy to deploy as possible and write good documentation.</p><h2 id="h-keep-the-frontend-dumb-push-logic-to-sdk-and-api" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Keep the Frontend Dumb, Push Logic to SDK and API</h2><p>In Balancer v2 we made the mistake of cramming a lot of caching and extractable logic into the frontend codebase. In self-contained web2 apps this is easier to avoid, with fairly well established patterns for separation of concerns. As with web2, the ideal is to keep the frontend as dumb as possible.</p><p>We pixel monkeys just want to make rectangles look pretty! Nothing more nothing less.</p><p>In web3 separation of concerns is a little harder to define. Generally, you also want to keep your API as dumb as possible and just cache and format onchain data there. The logic leftover needs to be carefully separated between an SDK and the frontend.</p><h2 id="h-build-a-protocol-sdk" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Build a protocol SDK</h2><p>Move any pure logic that helps the frontend interact with the smart contracts into a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/balancer/b-sdk">protocol SDK</a>. If it’s useful for the frontend, it will be useful to other developers who may want to interact with the underlying protocol. The more you make the underlying protocol accessible to developers the greater the network effects. From a frontend dev perspective, the goal here is to extract as much isolated protocol logic as possible so that the frontend code can be really dumb.</p><h2 id="h-cache-and-format-onchain-data-in-an-open-source-api" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Cache &amp; format onchain data in an open-source API</h2><p>It shouldn’t be much more complicated than the title suggests. I’m not an expert on the tooling in this department but I know it’s rapidly improving. Use subgraphs and or other available services to cache the raw onchain data and feed those into an API for formatting and any further data processing. Make the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/balancer/backend">API open-source</a> so that others can spin it up alongside your frontend, if decentralization is important to your protocol.</p><h2 id="h-the-frontend-stack" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The frontend stack</h2><h2 id="h-just-use-react" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Just use React</h2><p>I made this mistake for v2. Vue had already been chosen when I joined Balancer to lead the v2 build-out. At the time I was more proficient with Vue than React so I was quite happy with that choice. The problem is, network effects. Like it or not Web3 is a niche tech vertical. There just aren’t enough people building dev tooling in our niche to span all framework ecosystems equally, so by the law of network effects the best tooling is in the React ecosystem. It’s also where the best people are for hiring, with exceptions of course.</p><p>Don’t make it harder than it needs to be, just use React.</p><h2 id="h-frameworks-are-your-friend" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Frameworks are your friend</h2><p>Don’t reinvent the wheel. If you’ve gone with React… then go with Next.js. Use whatever framework does the most for you. There is enough engineering to do to get Web3 apps working nicely without worrying about typical web2 problems.</p><h2 id="h-component-libraries-dont-reinvent-the-wheel" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Component libraries, don’t reinvent the wheel</h2><p>Continuation of the above point. Try to minimise the time spent working on typical frontend/web2 problems like component building, so you can spend as much time as possible working on web3 flows and UX. There are plenty of challenges there that will take up your time.</p><h2 id="h-web3-tooling" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Web3 tooling</h2><p>As of writing this post, there are clear winners in this space. Pick <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://viem.sh/">Viem</a>/ <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://wagmi.sh/">Wagmi</a> as your core web3 packages, these are for interacting with your smart contracts and constructing transaction flows.</p><p>Then, pick a wallet provider that is built on top of wagmi. Two popular choices here are <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.rainbowkit.com/">RainbowKit</a> and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.family.co/connectkit">ConnectKit</a>. We used RainbowKit in Balancer v3 but I don’t think there is a clear winner here yet.</p><p>Whatever you do, don’t build your own wallet provider. It may seem simple at first but it’s a Pandora’s box of edge cases.</p><p>A final comment on web3 tooling: don’t forget smart accounts. This is especially true if you are building a DeFi app where your primary users are likely to be interacting with the dapp via a multi-sig like Safe.</p><p>Building a DeFi app in 2024 is still surprisingly difficult. This is especially true if your dapp is data-heavy and requires some non-trivial smart contract interactions. I expect this to get easier over the next few years but it depends on how the wider crypto ecosystem plays out. The core problem at the moment is chain fragmentation, especially in the Ethereum ecosystem. If good chain abstraction can be achieved at the tooling layer then building mult-chain DeFi apps will become quite a bit easier. But I struggle to see how that works in practice at this point in time.</p><p>I also want to point out that nothing I’ve included here is groundbreaking… Most of this is just common sense. As engineers, it’s so easy to get caught up trying to build fancy solutions. For DeFi apps the key is to focus in on the core interactions and how you manage those, i.e. the transaction flows and presenting onchain data.</p><p><em>I have specifically included the year in the title of this post because I expect it to become redundant. At least I hope it does. Maybe in 2025 or 2026 there will be a common way to access fully decentralized apps and common patterns for how to build them.</em></p><hr>]]></content:encoded>
            <author>garethfuller@newsletter.paragraph.com (Gareth)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/f4125491d57b06300b44d07246e32324be571286c6ac2ec13ae4b2bc03d66728.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Why frontends won't be decentralized]]></title>
            <link>https://paragraph.com/@garethfuller/why-frontends-won-t-be-decentralized</link>
            <guid>3wvypTrGHFxEkSVOkDgn</guid>
            <pubDate>Wed, 08 Jan 2025 15:42:08 GMT</pubDate>
            <description><![CDATA[Decentralizing frontends is hard and won&apos;t happen anytime soon.What&apos;s the point of decentralization? If you have a bar of gold under your mattress and the government decides they want that gold, you can fight to keep it or try to get out of the country with it. Tokens on sufficiently decentralized networks like Bitcoin and Ethereum are no different to that bar of gold. However, unless you&apos;re a technical wizard, moving those tokens around requires an interface, typically a web i...]]></description>
            <content:encoded><![CDATA[<p>Decentralizing frontends is hard and won&apos;t happen anytime soon.</p><hr><p>What&apos;s the point of decentralization?</p><p>If you have a bar of gold under your mattress and the government decides they want that gold, you can fight to keep it or try to get out of the country with it.</p><p>Tokens on sufficiently decentralized networks like Bitcoin and Ethereum are no different to that bar of gold. However, unless you&apos;re a technical wizard, moving those tokens around requires an interface, typically a web interface.</p><p>So in the context of DeFi, the point of decentralization is censorship-resistant access and control of your assets.</p><p>The government should not be able to control your access to your assets.</p><p>The problem with decentralizing access to your onchain assets is that governments can control the access points to web interfaces through DNS.</p><h2 id="h-the-dns-problem" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The DNS problem</h2><p>Imagine the internet as a huge city, and websites are buildings in this city. DNS is like the city&apos;s information desk at the town hall. When you want to visit your friend&apos;s house (a website), you only know their name, not their address. So you go to the information desk and ask, &quot;Where does John Smith live?&quot; The friendly clerk at the desk (the DNS server) quickly looks through their records and tells you, &quot;John lives at 123 Main Street.&quot;.</p><p>The problem is the clerk at the town hall. The government employs her and if the government doesn&apos;t want anyone to visit John, because he&apos;s organizing a protest, the government can tell the clerk to deny any requests for John&apos;s address.</p><p>This doesn&apos;t completely block you from finding John, but because everyone typically goes through the information desk at the town hall, it puts 99% of people off going any further. People are busy, they don&apos;t have time to walk the streets searching for John&apos;s house. So John&apos;s protest dies.</p><p>To decentralize access truly, we must first tackle this centralization at the heart of the internet. Enter the Ethereum Name Service (ENS), the best attempt to provide a decentralized alternative to DNS. However, here&apos;s the catch: getting the entire internet to switch from traditional top-level domains (TLDs) to ENS domains is like asking the world to start driving on the left side of the road tomorrow. It&apos;s a massive, disruptive change involving significant shifts in infrastructure, browser compatibility, and user behaviour. It&apos;s just not going to happen anytime soon.</p><p>So what alternative solutions do we have?</p><h2 id="h-the-mess-with-mirrors" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The mess with mirrors</h2><p>Some might argue that mirrored sites could offer a solution. These are alternative URLs hosting the same content, providing redundancy and resisting censorship. But this is where the theory diverges from reality. Users trust websites based on familiar domain names and the brand reputation tied to them. Introducing many different, unfamiliar domains breeds confusion and mistrust.</p><p>Moreover, mirrors are far from bulletproof. They can be taken down, and keeping them synchronized is a logistical nightmare. Users are left questioning whether the mirror they’re using is safe or has been compromised, hardly the seamless experience we aspire to provide.</p><h2 id="h-local-app-stores" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Local app stores?</h2><p>Another proposed solution is to have local DeFi app stores. That is, a way to download entire web apps onto your computer and for those apps to only rely on non-centralized supporting services for fetching data and performing operations with your assets.</p><p>Whilst this again seems like a good idea, in practice, it just doesn&apos;t work:</p><ol><li><p>It forces DeFi protocols to build extremely limited apps that will inevitably have worse UX than typical web apps. This is not going to help convince the masses to use DeFi...</p></li><li><p>It again, like ENS, requires a massive disruptive change involving significant shifts in infrastructure and user behaviour.</p></li></ol><hr><p>So now what? It all seems kind of hopeless, right? We&apos;re on this path with the development of the internet which appears to only lead to centralization and censorship.</p><p>If you&apos;re disappointed in this summary of our options, good, so am I, and unfortunately, I don&apos;t have a smoking gun to offer in this post.</p><p>The only current solution we do have in this fight is to open-source everything.</p><p>By making the code for DeFi apps open-source and easily deployable, we don&apos;t decentralize the access itself, but we distribute the power and control over its deployment and maintenance.</p><p>Open-source projects thrive on transparency and trust. Anyone can inspect the code for vulnerabilities or backdoors. Developers can fork the project, create their own versions, and host them independently. This ensures the project&apos;s resilience and longevity. But let&apos;s be honest—this approach relies on the technical acumen of users and developers to deploy and maintain these apps.</p><p>It’s not a practical, long-term, solution for the future of censorship-resistant finance.</p><p><em>Originally published at </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://dappness.com/posts/why-frontends-wont-be-decentralized"><em>https://dappness.com</em></a><em>.</em></p>]]></content:encoded>
            <author>garethfuller@newsletter.paragraph.com (Gareth)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/8c618962e3c974464bd70f9fdb41ff215dc04c2d87ff07da5b53e5a45031a018.png" length="0" type="image/png"/>
        </item>
    </channel>
</rss>