<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oreoluwa Israel on Medium]]></title>
        <description><![CDATA[Stories by Oreoluwa Israel on Medium]]></description>
        <link>https://medium.com/@oreoluwaisrael?source=rss-2bfa48710588------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3V2G_DBscXzNQgOj</url>
            <title>Stories by Oreoluwa Israel on Medium</title>
            <link>https://medium.com/@oreoluwaisrael?source=rss-2bfa48710588------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 15:15:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oreoluwaisrael/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Uniswap V3 For Dummies!]]></title>
            <link>https://coinsbench.com/uniswap-v3-for-dummies-cdcf39723f3c?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdcf39723f3c</guid>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Mon, 07 Sep 2026 12:53:16 GMT</pubDate>
            <atom:updated>2026-09-09T09:17:19.954Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*Z9HA8RwqxSXVEkB9xs1KGQ.jpeg" /><figcaption>v3 spicee…</figcaption></figure><blockquote><em>“My premise was that dummies are smart but are made to feel dumb by the techno, financial, and pervasive ‘babble’ across a wide variety of topics…”</em></blockquote><blockquote><em>— John Kilcullen</em></blockquote><h3>Introduction: This One Feels So Different…Why!?</h3><p>If you read my piece on Curve V1, you saw how Michael Egorov looked at the constant product formula, <em>x</em> · <em>y</em> = <em>k</em>, and realized it caused massive slippage for stablecoins. His fix was to bend the curve so it acted flat near $1.00.</p><p>Uniswap V3 attacks an even bigger problem, but it does it from a completely different angle.</p><p>When the whitepaper dropped in March 2021, a lot of people who might have thought they understood AMMs got stuck. In V1 and V2, you put two tokens into a pool, got back an LP token, and let the contract sit there. In V3, half the things you take for granted are missing. There are no standard LP tokens. The pool doesn’t even track token reserves during a swap. Instead, you get “virtual reserves,” ticks, and square root prices.</p><p>It looks like a mess of unnecessary math until you see the actual problem Hayden Adams and his team were trying to solve.</p><p>Once you see what your money was actually doing in Uniswap V2, the entire V3 design stops looking like academic noise and starts looking like common sense… I hope.</p><h3>The Real Problem: 90% of Your Capital Does Nothing</h3><p>Let’s start with the waste.</p><p>Say you want to provide liquidity for an ETH/USDC pool on Uniswap V2. Let’s say ETH is at $2,000, and you deposit 1 ETH and 2,000 USDC. That’s $4,000 of your own money locked in the contract.</p><p>Under the hood, V2 takes your $4,000 and spreads it across every possible price from zero to infinity.</p><p>But let’s think about what that means in practice. For your pool to ever need the capital it reserved for ETH at $0.10, ETH has to crash by 99.99%. For it to need the capital reserved for ETH at $500,000, ETH has to do a 250x.</p><p>In the real world, over a normal month, ETH might just bounce between $1,800 and $2,200.</p><p>See what your $4,000 deposit is actually doing while the price is sitting in that range:</p><pre>===================================================================<br>UNISWAP V2 CAPITAL CHECK (ETH at $2,000)<br>===================================================================<br>Deposit: 1 ETH + 2,000 USDC ($4,000 total)<br>Real-world price range: $1,800 to $2,200<br><br>1. If ETH drops to $1,800:<br>   The pool sells about $200 of your USDC to buy 0.1 ETH.<br><br>2. If ETH climbs to $2,200:<br>   The pool sells about 0.05 ETH to give you about $97 USDC.<br><br>Total capital that actually moved: ~$400.<br>Capital that sat there untouched: ~$3,600.<br>===================================================================</pre><p>Roughly 90% of your money just sat there doing nothing. It didn’t facilitate trades, and it didn’t earn fees. It just existed to keep a formula happy across prices that never occurred.</p><p>Curve solved this for pegged assets by changing the math of the pool itself. But ETH isn’t pegged to anything. So Uniswap’s answer was: let liquidity providers pick their own boundaries.</p><p>Instead of spreading your cash from 0 to infinity, you tell the contract, “Only use my money between $1,800 and $2,200.”</p><p>That my friends is <strong>concentrated liquidity</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*4nlVzMD36RiYL-oomCveXg.png" /><figcaption>conc. liquidity</figcaption></figure><h3>Virtual Reserves: The Shifted Curve</h3><p>Now let’s look at how they actually implemented this without breaking the basic mechanics people were used to.</p><p>The paper gives this formula in Section 2:</p><p>(<em>x</em> + <em>L</em> / √<em>p_b</em>) · (<em>y</em> + <em>L</em> · √<em>pₐ</em>) = <em>L</em>²</p><p>That looks intimidating, but then again, I find some dogs intimidating so I’m not exactly the best judge.</p><p><em>pₐ</em> is just your lower price bound ($1,800). <em>p_b</em> is your upper price bound ($2,200). <em>L</em> is the liquidity, which is really just √<em>k</em>.</p><p>And what that formula is doing is essentially a trick to let a small amount of money act like a huge pool.</p><p>Think about what happens as the price moves inside your chosen window:</p><ul><li>As the price of ETH rises toward $2,200, people are buying your ETH. When the price hits $2,200, you have run out of ETH completely. Your position is now 100% USDC.</li><li>If the price drops toward $1,800, people are selling ETH to you. When the price hits $1,800, you run out of USDC. Your position is now 100% ETH.</li></ul><p>In V2, a pool never runs out of either token. In V3, you run out on purpose the moment the price leaves your window.</p><p>The terms (<em>L</em> / √<em>p_b</em>) and (<em>L</em> · √<em>pₐ</em>) are what the paper calls <strong>“virtual reserves”.</strong> They aren’t real tokens in the contract. They are just offset numbers added to your real deposit so that, while the price is inside your range, the math behaves like a traditional, deep Uniswap pool.</p><p>You put in $400, but the trader swapping against you gets the slippage of a $4,000 pool.</p><p>And if the price leaves your range? Your liquidity goes dormant. It stops trading and stops earning fees until the price wanders back inside your boundaries.</p><h3>Why LP Tokens Had to Die</h3><p>In V2, when you deposit money, you get back an ERC-20 token. If you own 10% of the pool tokens, your position is identical to anyone else who owns 10%.</p><p>In V3, that breaks down completely.</p><p>Say you put $1,000 between $1,800 and $2,200. I put $1,000 between $1,950 and $2,050.</p><p>If ETH spends the week trading at $2,000, my position is way more concentrated than yours, so I earn a lot more in fees. If ETH moves to $2,100, my position goes completely inactive while yours keeps trading.</p><p>Because no two users have the same range, liquidity is no longer fungible. You can’t issue an ERC-20 to represent it. So if you’ve ever opened Uniswap V3, provided liquidity, and wondered why an NFT showed up in your wallet instead of an ERC-20 token balance, this is why. Your position is a one-of-a-kind receipt with your exact price boundaries baked into its metadata.</p><p>This also killed auto-compounding fees. In V2, your 0.3% fee stayed inside the pool, increasing <em>k</em>. In V3, because positions are constantly falling in and out of range, fees can’t be added back into the active liquidity automatically. They sit in a separate counter as raw tokens until you manually claim them.</p><h3>Ticks: Why Not Just Pick Any Price You Want?</h3><p>This was the first real question I had to sit with when reading Section 6.1:</p><p>If the whole pitch is giving liquidity providers total freedom, why can’t I just set my range from $1,802.4319 to $2,197.8821? Why did the authors force everyone into these things called “ticks”?</p><p>But then we have to think about what the smart contract would have to do if anyone could pick literally any decimal number.</p><p>If Alice sets her range at $1,800.123, Bob at $1,800.124, and Charlie at $1,800.125, then every single time someone swaps, the contract has to stop, calculate partial trades across microscopic price boundaries, and run expensive floating-point decimal checks. On the EVM, where every computation costs real gas, doing that continuous math across thousands of arbitrary user inputs would make a single swap cost hundreds of dollars in transaction fees.</p><p>The only way to keep gas sane is to quantize price space. You force everyone to snap their boundaries to pre-set pegs on a board.</p><p>Those pegs are <strong>ticks</strong>.</p><p>A tick is just an integer index, <em>i</em>, that defines a price point using this formula:</p><p><em>p</em>(<em>i</em>) = 1.0001ⁱ</p><p>Why 1.0001?</p><p>Because 0.0001 is 0.01%, or exactly one basis point. Every integer step up or down represents a clean 0.01% price movement:</p><pre>Tick 0:     1.0001^0    = 1.000000<br>Tick 1:     1.0001^1    = 1.000100  (+0.01%)<br>Tick -1:    1.0001^-1   = 0.999900  (-0.01%)<br>...<br>Tick 76000: 1.0001^76000 ≈ 1999.64   (Around $2,000 ETH)</pre><blockquote>One honest caveat: this table assumes both tokens use the same decimal precision. In a real deployment like ETH/USDC, where USDC has 6 decimals and WETH has 18, the actual on-chain tick for $2,000 sits somewhere very different. The math above is the pure, idealized version, real integrations need to account for that decimal offset separately.</blockquote><p>You can’t pick arbitrary numbers, but with every step being 0.01%, you have more than enough precision for any real-world strategy.</p><p>To save even more gas, the contract doesn’t even let you use every single tick for every pair. It introduces a variable called tickSpacing. For stablecoin pools, it lets you use every 10th tick (0.1% steps). For standard pairs like ETH/USDC, you can only initialize every 60th tick (~0.6% steps).</p><p>By turning price space into a grid of discrete ticks, the contract turns a messy calculus problem into a clean, predictable discrete state machine.</p><p><em>(Quick note: Section 4 has a chunk on governance setting the protocol fee fractions between 1/4 and 1/10, and setting tick spacings. Honestly, you can skip that. It’s just DAO administrative wiring. It doesn’t change how the pool actually trades.)</em></p><h3>The Coordinate Shift: Why Did Token Balances Disappear?</h3><p>This is the part that threw me the hardest when I first read Section 6.2.</p><p>If you look at the core swap function in Uniswap V3, the contract does not track token balances <em>x</em> and <em>y</em> to calculate the trade.</p><p>Instead, the global state tracks two numbers:</p><ol><li>Liquidity (<em>L</em>)</li><li>The square root of price (√<em>P</em>)</li></ol><p>Why throw away real balances and track a square root?</p><p>Because tracking reserves on a curve forces you to do messy non-linear math. But if you track √<em>P</em> and <em>L</em>, the swap calculation becomes straight multiplication and division.</p><p>Let’s do the math by hand so you can see it:</p><pre>===================================================================<br>A SIMPLE V3 SWAP BY HAND<br>===================================================================<br>Pool State:<br>• Price of ETH (P) = $2,500<br>• Square root of price (√P) = √2,500 = 50<br>• Active Liquidity (L) = 1,000<br><br>A trader comes in with 100 USDC (token Y) to buy ETH (token X).<br>So Δy = 100.<br><br>How does the contract find the new price?<br>Formula: Δ√P = Δy / L<br><br>1. Calculate how much √P moves:<br>   Δ√P = 100 / 1,000 = 0.1<br><br>2. Add that to the old √P:<br>   New √P = 50 + 0.1 = 50.1<br><br>3. What is the new price?<br>   New Price = 50.1 * 50.1 = $2,510.01<br><br>4. How much ETH does the trader get?<br>   Formula: Δx = Δ(1 / √P) * L<br>   Δ(1 / √P) = (1 / 50) - (1 / 50.1) = 0.02 - 0.01996008 = 0.00003992<br>   ETH Out = 0.00003992 * 1,000 = 0.03992 ETH<br>===================================================================</pre><p>See what just happened. To find the price movement, the contract didn’t solve a quadratic equation or calculate square roots. It divided the incoming tokens by <em>L</em>.</p><p>As long as the swap doesn’t cross a tick, <em>L</em> doesn’t change. The price nudges forward in a straight line. That is why the contract stores √<em>P</em>. It turns an expensive curve calculation into cheap integer arithmetic on the EVM.</p><p>To avoid decimals, the contract stores √<em>P</em> in a format called <em>Q64.96</em>. It just means the number is multiplied by ²⁹⁶ so it can sit in a standard integer without losing precision.</p><h3>Crossing Ticks: How the Swap Loop Works</h3><p>What happens when someone makes a trade so large that the price blows past your upper tick at $2,200?</p><p>At $2,200, your ETH is gone. Your liquidity has to leave the pool.</p><p>If the contract had to loop through a list of every user who had a position at $2,200 to remove them, a large trade would run out of gas and fail.</p><p>The paper solves this by attaching a single number to each tick: liquidityNet (Δ<em>L</em>).</p><p>When you set up your position, the contract added your liquidity to the bottom tick, and subtracted it from the top tick.</p><p>When a trade pushes the price across that $2,200 tick, the contract doesn’t know who you are. It just reads that tick’s Δ<em>L</em> and adds it to the pool’s global liquidity:</p><p><em>L_new</em> = <em>L_old</em> + Δ<em>L</em></p><p>Because your liquidity was stored as a negative number at the upper tick, adding it immediately subtracts your capital from the pool. It takes one line of code, whether that tick had one user or five thousand.</p><p>To find where the next initialized tick is without checking every empty number along the way, the contract uses a bitmap. Each tick is represented by a single bit (1 if it has liquidity, 0 if empty). The EVM can scan 256 ticks in a single operation, find the next active boundary, and jump straight to it.</p><h3>Fee Growth: Outside? Outside of What?</h3><p>Now for Section 6.3. This is the part that caused me the biggest headache when reading the paper:</p><p><em>f_r</em> = <em>f_g</em> — <em>f_b</em>(<em>i_l</em>) — <em>f_a</em>(<em>i_u</em>)</p><p>The paper calls <em>f_o</em> “fee growth outside.”</p><p>When you first read that, you immediately ask(or at least i did): <em>Outside? Outside of what?</em> A tick isn’t a range; it’s a single point on a line. How can something be “outside” of a single line?</p><p>Here is the mental model: think of a tick as a wall. The current price of the pool is standing on one side of that wall.</p><p>By definition, <em>feeGrowthOutside</em> (<em>f_o</em>) tracks all the fees that were accumulated on the side of the wall <strong>where the price is NOT currently standing</strong>.</p><p>If the current price is standing to the right of tick 100, then <em>f_o</em> for tick 100 records all the fees that were ever earned to the left of tick 100.</p><p>Now watch what happens when a trade pushes the price across that wall from right to left: the entire perspective flips. What used to be the “other side” is now the side the price is standing on.</p><p>So the contract updates the tick’s memory with one simple subtraction:</p><p><em>f_o</em> := <em>f_g</em> — <em>f_o</em></p><p>All the fees that ever existed (<em>f_g</em>), minus what was on the other side, gives you what is on this side now.</p><p>Because every tick keeps track of what happened away from the price, finding the fees earned <em>inside</em> your specific range [<em>i_l</em>, <em>i_u</em>] doesn’t require knowing the history of every trade. You just use basic subtraction:</p><pre>===================================================================<br>THE INSIDE FEE CALCULATION<br>===================================================================<br>1. Take ALL fees that ever happened in the pool:<br>   feeGrowthGlobal (f_g)<br><br>2. Subtract fees that happened BELOW your bottom tick:<br>   f_b(i_l)<br><br>3. Subtract fees that happened ABOVE your top tick:<br>   f_a(i_u)<br><br>What is left over?<br>f_r = f_g - f_b(i_l) - f_a(i_u)<br>===================================================================</pre><p>That gives you <em>f_r</em>: the total fees earned inside your boundaries from the beginning of the pool until this exact second.</p><p>When you want to withdraw your earnings, the contract looks at what <em>f_r</em> was when you entered, subtracts that from what <em>f_r</em> is right now, and multiplies by your liquidity:</p><p><em>fees</em> = <em>L</em> · (<em>f_r_now</em> — <em>f_r_start</em>)</p><p>That’s it. It doesn’t matter if you were in the pool for two days or three years. Calculating your fees takes three subtractions and a multiplication.</p><h3>The Oracle: Why Arithmetic Averages Were a Trap</h3><p>The last major change in Section 5 is the price oracle, and the whitepaper makes a switch that is very easy to read past: it abandons the arithmetic mean from V2 and switches to a <strong>geometric mean</strong>.</p><p>Why make that change? Because arithmetic averages on token prices lead to mathematical absurdities.</p><p>Let me show you with actual numbers before we touch the formula.</p><p>Say ETH trades at $100 in Block 1. In Block 2, it spikes to $400.</p><p>What was the average price?</p><pre>===================================================================<br>THE ARITHMETIC TWAP TRAP (Uniswap V2 Style)<br>===================================================================<br>Block 1: ETH = $100 (or 1 USD = 0.01 ETH)<br>Block 2: ETH = $400 (or 1 USD = 0.0025 ETH)<br><br>1. AVERAGE PRICE OF ETH IN TERMS OF USD:<br>   Average = (100 + 400) / 2 = $250 per ETH<br><br>2. AVERAGE PRICE OF USD IN TERMS OF ETH:<br>   Average = (0.01 + 0.0025) / 2 = 0.00625 ETH per USD<br><br>3. CHECK IF THEY AGREE:<br>   If 1 USD = 0.00625 ETH, then 1 ETH should be:<br>   1 / 0.00625 = $160 per ETH.<br>===================================================================</pre><p>Look at that result.</p><p>Depending on which token you put in the numerator, your oracle says the average price of ETH was either <strong>$250</strong> or <strong>$160</strong>.</p><p>They don’t agree. In Uniswap V2, this forced the contract to maintain two separate accumulators for every pair, and external protocols had to be extremely careful which one they used, or an attacker could arbitrage the difference.</p><p>Uniswap V3 fixes this by tracking the <strong>geometric mean</strong>.</p><p>In a geometric mean, you multiply the prices and take the root:</p><pre>Geometric Mean of ETH in USD = √(100 * 400) = $200 per ETH<br>Geometric Mean of USD in ETH = √(0.01 * 0.0025) = 0.005 ETH per USD<br><br>Check: 1 / 0.005 = $200 per ETH.</pre><p>The numbers match in both directions. The reciprocal of the average is actually the average of the reciprocals.</p><p>To do this on-chain without running expensive roots, V3 doesn’t accumulate the raw price. It accumulates the tick index directly:</p><p><em>a_t</em> = ∑ <em>i</em></p><p>Remember that ticks are defined logarithmically: <em>p</em> = 1.0001ⁱ.</p><p>In mathematics, adding logarithms together is the exact same thing as multiplying the underlying numbers. By simply adding the tick indices across time, the accumulator naturally calculates a geometric mean price. One single accumulator serves both tokens without distortion.</p><p>And instead of forcing external protocols to run their own checkpoints, V3 builds a circular buffer of up to 65,536 observation slots directly inside the pool. Any contract can ask for the average price over the last 30 minutes in a single, read-only call.</p><h3>Closing…</h3><p>If you got to this point, welcome!</p><p>Uniswap V3 can feel like a totally different animal compared to V2 or Curve V1, and that’s because it is. But once you pull apart the math, you see that none of this was added for decoration:</p><ul><li>Virtual reserves let your capital actually work instead of sitting idle.</li><li>Ticks turn an impossible continuous curve into manageable pieces.</li><li>√<em>P</em> turns heavy curve math into basic division.</li><li>Net liquidity on ticks keeps boundary crossings at constant gas.</li><li>Outside fee tracking lets the contract calculate years of earnings in a fraction of a second.</li><li>Geometric TWAPs make price feeds mathematically consistent in both directions.</li></ul><p>It’s easy to get lost in the jargon of whitepapers, but Uniswap V3 is ultimately just an exercise in stripping out waste. Once you see why each piece had to be built that way, the whole design clicks.</p><blockquote>Tried to make the formatting better in this piece, I hope you find it informative and helpful.</blockquote><blockquote>Thank you!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdcf39723f3c" width="1" height="1" alt=""><hr><p><a href="https://coinsbench.com/uniswap-v3-for-dummies-cdcf39723f3c">Uniswap V3 For Dummies!</a> was originally published in <a href="https://coinsbench.com/">CoinsBench</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uniswap V2 For Dummies!]]></title>
            <link>https://coinsbench.com/uniswap-v2-for-dummies-93d6df67bd56?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/93d6df67bd56</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Mon, 07 Sep 2026 10:45:42 GMT</pubDate>
            <atom:updated>2026-09-09T09:17:18.364Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*KxRbjyh2zU3JuUA1rZEfUw.jpeg" /><figcaption>uniswap babyy</figcaption></figure><blockquote><strong>“My premise was that dummies are smart but are made to feel dumb by the techno, financial, and pervasive ‘babble’ across a wide variety of topics…”</strong></blockquote><blockquote><strong>— John Kilcullen</strong></blockquote><h3>Introduction: The Sequel That Actually Built DeFi</h3><p>If you read my breakdown of Curve V1, you already know the thesis: Automated Market Makers (AMMs) are elegant, living machines wrapped in unnecessarily intimidating math.</p><p>In that essay, we looked at how Michael Egorov saw the constant-product formula, x * y = k, and realized it was a terrible fit for stablecoins. We watched him bend that curve into a flat line near balance so you would not lose hundreds of dollars swapping one dollar for another.</p><p>Now, we need to take a step back and examine the parent architecture.</p><p>In March 2020, Hayden Adams, Noah Zinsmeister, and Dan Robinson dropped the Uniswap V2 Core whitepaper. If Uniswap V1 proved that an on-chain AMM could work at all, V2 proved it could become the foundational liquidity layer of an entire financial ecosystem.</p><p>A lot of people probably think Uniswap V2 was just “V1, but with arbitrary token pairs.” That is barely scratching the surface. V2 is where the authors took a messy, experimental proof of concept written in Vyper and rebuilt it in Solidity as a hardened, minimalist state machine.</p><p>They stripped out the bloat, invented flash swaps by turning trade execution on its head, solved on-chain price manipulation with modular timestamp arithmetic, and patched share-inflation attacks using plain integer truncation.</p><p>Let us open the whitepaper and walk through its engineering line by line, exactly the way we did with Curve.</p><h3>The Evolution: Cutting Out the Mandatory ETH Tollbooth</h3><p>The paper opens in Section 2.1 by addressing the single biggest limitation of Uniswap V1: <strong>Arbitrary ERC-20 / ERC-20 Pairs</strong>.</p><p>In Uniswap V1, every single liquidity pool had to be paired against ETH.</p><p>If you had DAI and wanted USDC, there was no direct DAI/USDC pool. The protocol forced you through two separate swaps:</p><ol><li>Swap DAI for ETH.</li><li>Swap that ETH for USDC.</li></ol><p>Think about the drag this created on every single trade. You paid gas for two transactions. You paid the 0.3% liquidity provider fee twice, bleeding 0.6% off the top. You took on double the price slippage. Most dangerously, you were exposed to the price volatility of ETH during the trade. If ETH fluctuated between those two hops, your execution price shifted with it.</p><p>For liquidity providers, the situation was worse: impermanent loss.</p><p>If you wanted to provide liquidity for two stablecoins that track the same dollar, you could not pair them directly. You had to provide DAI/ETH or USDC/ETH. The moment ETH moved in price, you suffered impermanent loss against an asset you never wanted exposure to in the first place.</p><p>Uniswap V2 threw that model out. Any ERC-20 token can pair directly with any other ERC-20 token. One hop. One 0.3% fee. Zero unnecessary ETH volatility.</p><p>The authors openly acknowledge the tradeoff in the paper: allowing arbitrary pairs fragments liquidity. Instead of one deep pool of ETH against everything, you might have DAI/USDC, DAI/USDT, and USDC/USDT. But routing across pools is an off-chain computational problem that aggregators can solve. Forcing users to pay double fees and take on unneeded volatility was a structural tax that had to go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJp_VVGMDWykfUtIE3IsAQ.png" /><figcaption>swap paths</figcaption></figure><h3>The Invariant Lie: Why <em>x</em> · <em>y</em> = <em>k</em> Does Not Stay Constant</h3><p>Many explainers online repeats the same line: Uniswap runs on the constant-product formula:</p><pre>x · y = k</pre><p>That formula is a clean mental model, but it is technically false the moment real-world fees exist.</p><p>If $k$ stayed perfectly constant on every trade, liquidity providers would make zero profit. The fees they earn have to live somewhere, and that somewhere is inside the pool reserves.</p><p>Section 3.2.1 of the paper shows the actual formula the contract enforces:</p><p>$$(x_1–0.003 \cdot x_{\text{in}}) \cdot y_1 \ge x_0 \cdot y_0$$</p><p>Look at what this inequality is actually doing.</p><p>You walk up to a pool holding $x_0$ and $y_0$. You deposit an input amount, $x_{\text{in}}$.</p><p>The contract does not let your entire deposit help satisfy the balance. It cuts a 0.3% fee ($0.003 \cdot x_{\text{in}}$) off the top of your input. Only the remaining 99.7% of your tokens goes toward preserving the invariant. The 0.3% cut is dumped into the pool reserves as uncounted surplus.</p><p>Because that fee remains behind in the contract balances, the new product of the pool, $x_1 \cdot y_1$, is strictly greater than the old product, $x_0 \cdot y_0$.</p><p>The constant-product formula is not constant at all. It is a <strong>monotonically increasing product formula</strong>. With every trade that executes against the pool, $k$ gets slightly larger. The pool becomes permanently deeper, and that growth in $k$ is the exact mechanism through which liquidity providers accumulate their earnings.</p><h3>The EVM Reality: Banishing Decimals with 1,000,000</h3><p>Look at that formula again:</p><p>$$(x_1–0.003 \cdot x_{\text{in}}) \cdot y_1 \ge x_0 \cdot y_0$$</p><p>If you try to write $0.003$ in Solidity, the compiler will throw an error. The Ethereum Virtual Machine does not have native support for floating-point numbers or decimals. It operates entirely on unsigned integers.</p><p>If you try to calculate 0.003 * x_in using standard integer math, any fraction simply truncates to zero. If that happened, every trade smaller than 333 wei would pay zero fees, slowly bleeding the pool dry.</p><p>The authors solve this with simple elementary-school algebra: clear the decimals by scaling the entire equation up.</p><p>Multiply both sides of the balance adjustment by 1,000:</p><p>$$1000 \cdot (x_1–0.003 \cdot x_{\text{in}}) = 1000 \cdot x_1–3 \cdot x_{\text{in}}$$</p><p>Because Uniswap V2 also allows you to pay fees on token $y$ (which happens during flash swaps, as we will see shortly), the contract applies this exact same scaling to both sides of the equation simultaneously:</p><p>$$(1000 \cdot x_1–3 \cdot x_{\text{in}}) \cdot (1000 \cdot y_1–3 \cdot y_{\text{in}}) \ge 1000 \cdot 1000 \cdot x_0 \cdot y_0$$</p><p>Notice the right-hand side: multiplying both input terms by 1,000 means the product of the old reserves must be multiplied by $1,000 \times 1,000$, which equals $1,000,000$.</p><p>Now look at the actual production code in UniswapV2Pair.sol:</p><pre>uint balance0Adjusted = balance0.mul(1000).sub(amount0In.mul(3));<br>uint balance1Adjusted = balance1.mul(1000).sub(amount1In.mul(3));<br>require(<br>    balance0Adjusted.mul(balance1Adjusted) &gt;= uint(_reserve0).mul(_reserve1).mul(1000**2), <br>    &#39;UniswapV2: K&#39;<br>);<br></pre><p>There are no floating-point approximations, no external libraries, and no rounding errors. Just plain, integer arithmetic that guarantees nobody can extract a single wei of value without leaving the appropriate fee behind.</p><h3>The Architecture: Core vs. Router Separation</h3><p>In Uniswap V1, the core exchange contract did everything: it held the user’s funds, calculated the trade math, handled routing, and executed the swaps.</p><p>Uniswap V2 introduces a strict separation of concerns in Section 3.2:</p><ul><li><strong>The Core (</strong><strong>UniswapV2Pair.sol and </strong><strong>UniswapV2Factory.sol):</strong> Holds the actual liquidity reserves. It is deliberately dumb, minimal, and stripped of unnecessary logic. It does not care about user interfaces, slippage tolerances, or multi-hop trade routing. Its only job is to protect the reserves and enforce the $k$-invariant.</li><li><strong>The Periphery (</strong><strong>UniswapV2Router02.sol):</strong> The user-facing coordinator. It calculates how many tokens you should get, checks your slippage deadlines, handles multi-pair trade paths, and pulls your tokens.</li></ul><p>Why does this split matter?</p><p>Because the Core contract cannot be upgraded. Once deployed, the liquidity sitting inside it is locked into whatever logic is compiled into that bytecode. If you build complex routing logic directly into the Core contract and find a bug later, all of that pooled capital is at risk.</p><p>By pushing all convenience features, slippage limits, and path-routing into the Router, the system becomes modular. If a developer invents a more gas-efficient routing algorithm next year, they deploy a new Router. The Core never has to change, and liquidity providers never have to migrate their capital.</p><h3>Optimistic Transfers and Flash Swaps</h3><p>This separation of concerns leads directly to one of the most radical design choices in DeFi: <strong>Optimistic Transfers</strong> (Section 2.3).</p><p>Traditional exchanges operate on a strict sequence:</p><ol><li>The exchange pulls your payment via transferFrom().</li><li>The exchange calculates the trade.</li><li>The exchange sends you the output tokens.</li></ol><p>Uniswap V2 turns this entire process backward.</p><p>The Core pair contract does not pull your tokens. In fact, if you call swap(), the contract sends you the output tokens <strong>first</strong>, before verifying that you have paid a single penny.</p><pre>// 1. Optimistically transfer the requested tokens out to the recipient<br>if (amount0Out &gt; 0) _safeTransfer(_token0, to, amount0Out);<br>if (amount1Out &gt; 0) _safeTransfer(_token1, to, amount1Out);<br><br>// 2. Call the recipient with arbitrary data if requested (Flash Swap callback)<br>if (data.length &gt; 0) IUniswapV2Callee(to).uniswapV2Call(msg.sender, amount0Out, amount1Out, data);<br><br>// 3. Inspect the contract&#39;s actual balance right now<br>uint balance0 = IERC20(_token0).balanceOf(address(this));<br>uint balance1 = IERC20(_token1).balanceOf(address(this));<br><br>// 4. Enforce the invariant<br>require(balance0Adjusted.mul(balance1Adjusted) &gt;= uint(_reserve0).mul(_reserve1).mul(1000**2), &#39;UniswapV2: K&#39;);</pre><p>Look at what is happening:</p><ul><li>The contract hands you the tokens you asked for.</li><li>If you pass arbitrary bytes in the data parameter, the contract pauses and calls an external function on your address: uniswapV2Call().</li><li>You now have complete freedom to run whatever custom logic you want with those borrowed tokens across the rest of the blockchain.</li><li>Once your callback finishes, execution returns to the pair contract. It reads its own token balances via balanceOf(address(this)).</li><li>If its new balances satisfy the $k$-invariant check (meaning you either paid for the tokens you took or sent them back, plus the 0.3% fee), the transaction completes smoothly.</li><li>If the balances fail the check, the transaction reverts completely. The EVM unwinds state, and it is as if the tokens never left the pool.</li></ul><p>This single mechanism unlocked <strong>Flash Swaps</strong>.</p><p>Suppose you spot an arbitrage opportunity: ETH is trading at $2,000 on Uniswap and $2,100 on Sushiswap. Under the old model, you could only capture that profit if you already had $200,000 in cash sitting in your wallet.</p><p>With Uniswap V2 optimistic transfers, you do not need capital. You ask the Uniswap pool for 100 ETH. It hands you the ETH upfront. Your callback takes that ETH, sells it on Sushiswap for $210,000 USDC, routes $200,600 USDC back to the Uniswap pool to cover the swap fee, and pockets the remaining $9,400 USDC as pure profit.</p><p>All in a single atomic transaction. You borrowed the pool’s entire depth, settled an arbitrage trade, and paid it back without the pool taking on a sliver of credit risk.</p><h3>The TWAP Oracle: Making Manipulation Impossibly Expensive</h3><p>Before Uniswap V2, if an external smart contract (like a lending market or synthetic asset platform) needed to know the price of an asset, it usually called:</p><p>$$\text{Price} = \frac{\text{reserve}_A}{\text{reserve}_B}$$</p><p>This design invited disaster.</p><p>Because of flash loans and atomic execution, an attacker could borrow 50,000 ETH, dump it into the Uniswap pool to crash the spot price to zero, trigger a liquidation on a lending platform that read that spot price, and buy their ETH back, all within a single block.</p><p>The whitepaper solves this in Section 2.2 with the <strong>Time-Weighted Average Price (TWAP)</strong> oracle.</p><p>The authors recognized a fundamental truth about blockchain physics: you cannot prevent a well-funded attacker from distorting the price of an AMM for a single transaction. But you can make it exponentially and unsustainably expensive to keep that price distorted over time.</p><p>Instead of tracking spot prices, Uniswap V2 records a cumulative historical price:</p><p>$$a_t = \sum_{i=1}^{t} p_i \cdot \Delta t_i$$</p><p>Every time someone interacts with the pool, the contract checks how many seconds have passed since the price was last updated ($\Delta t$). It takes the spot price at the start of the block, multiplies it by $\Delta t$, and adds that figure to a running accumulator variable:</p><pre>// * Solidity<br><br>uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired<br>if (timeElapsed &gt; 0 &amp;&amp; _reserve0 != 0 &amp;&amp; _reserve1 != 0) {<br>    // * never overflows, and + overflow is desired<br>    price0CumulativeLast += uint(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed;<br>    price1CumulativeLast += uint(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) * timeElapsed;<br>}</pre><p>If an external protocol wants to know the average price of an asset over the past hour, it does not read the current price. It checkpoints the value of $a_{t1}$ at the start of the hour, reads $a_{t2}$ at the end of the hour, and divides by the elapsed seconds:</p><p>$$p_{t_1, t_2} = \frac{a_{t_2} — a_{t_1}}{t_2 — t_1}$$</p><p>This neutralizes flash loan attacks completely.</p><p>If an attacker borrows $100,000,000 to skew the spot price within a single block, the elapsed time ($\Delta t$) within that transaction is zero seconds. The manipulated price is multiplied by zero. It contributes nothing to the cumulative price accumulator.</p><p>To meaningfully move a 24-hour TWAP, the attacker would have to hold the pool out of balance for hours across hundreds of consecutive blocks. Doing so turns every arbitrageur in the ecosystem against them. At every single block, external traders will happily trade against the attacker’s distorted price, draining their capital until the attack becomes financial suicide.</p><h3>The UQ112.112 Format and the 136-Year Clock</h3><p>To implement this TWAP on-chain without draining users with gas fees, the authors had to solve an aggressive storage layout puzzle.</p><p>Writing to Ethereum storage slots via the SSTORE opcode is one of the most expensive operations in the EVM. A single storage slot holds 256 bits. If you store two token reserve variables and a timestamp across three separate slots, every swap becomes expensive.</p><p>Section 2.2.1 introduces the packing strategy:</p><ul><li>Reserve 0 is capped at <strong>112 bits</strong> (uint112).</li><li>Reserve 1 is capped at <strong>112 bits</strong> (uint112).</li><li>The block timestamp is cast to <strong>32 bits</strong> (uint32).</li></ul><p>Add them together:</p><p>$$112 + 112 + 32 = 256 \text{ bits}$$</p><p>The reserves of both tokens and the timestamp of the last trade fit perfectly into <strong>one single 32-byte storage slot</strong>. Updating the state of the pool requires just one storage write instead of three.</p><p>To calculate the fractional prices for the accumulator, the authors built an integer-based fixed-point math library: <strong>UQ112.112</strong>.</p><p>A UQ112.112 number uses 112 bits for the integer part and 112 bits for the fractional part.</p><p>When you divide reserve 1 by reserve 0, the numerator is shifted left by 112 bits before the division occurs:</p><p>$$\text{Price} = \frac{\text{reserve}_1 \cdot 2^{112}}{\text{reserve}_0}$$</p><p>This gives the contract 112 bits of precision for fractional values without floating-point mechanics.</p><p>Because this number requires 224 bits, it leaves exactly 32 bits open in a standard 256-bit word. Those remaining 32 bits are used as overflow space for the cumulative price additions.</p><p>What about that 32-bit timestamp?</p><p>A standard Unix timestamp measures the number of seconds since January 1, 1970. A 32-bit unsigned integer can only count up to $2^{32} — 1$, which equals $4,294,967,295$ seconds.</p><p>On February 7, 2106, the timestamp will hit that ceiling and wrap back around to zero.</p><p>The whitepaper points out that this overflow is completely benign due to standard modular arithmetic:</p><p>$$(0–4294967290) \pmod{2^{32}} = 6$$</p><p>As long as an oracle checks the price accumulator at least once every 136 years, the subtraction between two consecutive checkpoints produces the exact correct elapsed delta, completely ignoring the overflow. The math self-heals natively in hardware.</p><h3>The Share Inflation Attack: Burning the First 1,000 Shares</h3><p>Section 3.4 addresses an attack vector against liquidity pools: <strong>The First Depositor Attack</strong>.</p><p>When you deposit tokens into an existing pool, how many LP tokens do you receive?</p><p>Your share allocation is proportional to your contribution relative to the pool reserves:</p><p>$$s_{\text{minted}} = \frac{x_{\text{deposited}}}{x_{\text{starting}}} \cdot s_{\text{starting}}$$</p><p>If you add 10% to the pool’s assets, you get 10% of the total share supply.</p><p>When a pool is first created, $x_{\text{starting}}$ is zero. You cannot divide by zero.</p><p>In Uniswap V1, the initial share count was simply set to the amount of ETH deposited. But V2 allows arbitrary token pairs where neither side is ETH, and token decimals can vary from 6 to 18.</p><p>The authors solved this by setting the initial shares to the <strong>geometric mean</strong> of the deposited amounts:</p><p>$$s_{\text{minted}} = \sqrt{x_{\text{deposited}} \cdot y_{\text{deposited}}}$$</p><p>This decouples share creation from the deposit ratio. Whether you deposit at a 1:1 ratio or a 1:400 ratio, the initial share supply scales with the true geometric depth of the pool.</p><p>This design introduces a dangerous edge case.</p><p>Imagine an attacker targets a brand-new pool:</p><ul><li>The attacker deposits a microscopic amount: 1 wei of token A and 1 wei of token B.</li><li>The formula runs: $\sqrt{1 \cdot 1} = 1$. The attacker receives exactly <strong>1 share</strong> of the pool. Total supply is now 1.</li><li>The attacker transfers 1,000,000 USDC directly to the contract address using a standard ERC-20 transfer, without calling mint().</li></ul><p>The pool reserves are now 1,000,000 USDC, but the total supply of shares remains locked at 1. That single share held by the attacker is now worth the entire 1,000,000 USDC reserve.</p><p>Now, an everyday user comes along and tries to deposit $500 into the pool.</p><p>The contract calculates how many shares the user should get:</p><p>$$s_{\text{minted}} = \frac{\text{amount}_{\text{in}}}{\text{reserve}} \cdot s_{\text{total}} = \frac{500}{1,000,000} \cdot 1 = 0.0005 \text{ shares}$$</p><p>Because the EVM cannot handle fractional shares, $0.0005$ truncates directly to <strong>0</strong>.</p><p>The contract takes the user’s $500, mints them zero shares, and credits that deposited capital to the existing total supply. The attacker burns their single share and walks away with their original deposit plus the user’s $500.</p><p>The whitepaper’s defense is ruthlessly effective:</p><pre>if (_totalSupply == 0) {<br>    liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY);<br>    _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first 1000 shares<br>}</pre><p>The protocol forces the very first depositor to permanently burn the first 1,000 shares (1e-15 tokens) by sending them to address(0).</p><p>Because those 1,000 shares can never be redeemed, the denominator can never be reduced to 1. To pull off the same rounding exploit, an attacker would have to donate 1,000 times more capital to move the share price, burning hundreds of thousands of dollars permanently to the zero address. The defense turns a zero-cost exploit into a guaranteed financial loss.</p><h3>The Architecture in Retrospect</h3><p>When you step back and look at Uniswap V2 as an interconnected machine, every single component fits together with zero waste:</p><ul><li>Arbitrary ERC-20 pairs eliminate the ETH double-tax.</li><li>The separation of Core and Router keeps the money-holding layer small, immutable, and verifiable.</li><li>Inverting the swap order allows the contract to hand out assets before checking payment, creating flash swaps with zero credit risk.</li><li>Packing reserves into $112 + 112 + 32$ bits fits the core pool state into a single storage slot, unlocking the TWAP accumulator while slashing gas costs.</li><li>Integer scaling and the 1,000-share burn eliminate rounding vulnerabilities at the EVM boundaries.</li></ul><p>It is a masterwork of defensive systems engineering. It took an academic equation and molded it to the strict, unforgiving laws of the Ethereum Virtual Machine.</p><p>Understanding these mechanics sets the stage for what comes next. In V2, liquidity is spread uniformly across an infinite price range from zero to infinity, leaving the vast majority of capital sitting idle.</p><p>That inefficiency is the exact problem Hayden Adams and his team tackled in their next leap forward: <strong>Uniswap V3 and Concentrated Liquidity</strong>.</p><h3><strong>Closing…</strong></h3><p>If you got to this point, welcome! I hope this walk through the mechanics made the machine click for you.</p><p>What makes the Uniswap V2 paper special isn’t just the math; it’s how ruthlessly practical the engineering is. Hayden, Noah, and Dan didn’t just write theoretical equations; they wrote them with the cold realities of the EVM in mind, designing around 256-bit storage slots, integer truncation, and reentrancy risks.</p><p>There are countless guides out there explaining how to swap tokens or provide liquidity, but looking under the hood at why these specific architectural choices were made gives you a genuine appreciation for the craft. Uniswap V2 wasn’t just an upgrade; it was an exercise in pure, defensive design, and understanding it sets the foundation for every modern AMM built since.</p><p><strong>Disclaimer.<br></strong>I am really sorry about the formatting of the mathematical expressions and how bad it is in comparison to the last piece on Curve V1, I am working on making it better and editing post publishing but I tried to make the core content as understandable as possible even without seeing the expressions. I had sat so long on this and didn’t want to procrastinate any longer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93d6df67bd56" width="1" height="1" alt=""><hr><p><a href="https://coinsbench.com/uniswap-v2-for-dummies-93d6df67bd56">Uniswap V2 For Dummies!</a> was originally published in <a href="https://coinsbench.com/">CoinsBench</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Curve V1 For Dummies!]]></title>
            <link>https://coinsbench.com/curve-v1-for-dummies-a10d508876b6?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/a10d508876b6</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 15:46:54 GMT</pubDate>
            <atom:updated>2026-09-09T09:17:13.781Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*z5h3B3l4kmVJEXZr.jpg" /><figcaption>curveee</figcaption></figure><blockquote>“My premise was that dummies are smart but are made to feel dumb by the techno, financial, and pervasive ‘babble’ across a wide variety of topics…”</blockquote><blockquote>— John Kilcullen</blockquote><h3><strong>Introduction: Who is This For? (And Why “Dummies”?)</strong></h3><p>Let’s get something straight right away: calling this a guide “for dummies” is not an insult. In fact, if you look at the history of the famous book series, the word “dummy” was never meant to describe someone who isn’t smart. It describes highly intelligent, capable people who are tired of being gatekept by industry jargon, academic pretence, and dense technical math.</p><p>When it comes to Decentralized Finance (DeFi), everyone starts out as a beginner. Automated Market Makers (AMMs) are inherently beautiful architectures, but the whitepapers explaining them are often intentionally complicated. This guide is built to strip away the “crypto-babble,” translate the advanced calculus into plain English, and bring you into a deep, solid understanding of why Curve V1 works the way it does.</p><p>And if you are a fan who has been following my non-technical essays, I deeply appreciate you, but I must kindly note that this piece is specifically designed to help people who haven’t fully grasped AMMs yet. If you are here to finally crack open the hood of Curve and see exactly how it works, let’s go!</p><p><strong>The Evolution of the Pool</strong></p><p>October 2018, about a month before the official launch, the founder of Uniswap released a whitepaper, a technical documentation introducing and explaining the concept of Automated Market Makers.</p><p>Before this, if you wanted to trade one token for another, you needed someone on the other side of that trade, at a price you both agreed on, at the same moment. That’s how every exchange had worked. The problem with that, if you think about it for more than a second, is: what if nobody wants to sell exactly when you want to buy? Uniswap’s answer was quite simple: What if a pool of tokens sitting in a contract could just be the other side of every trade, forever, no human required?</p><p>That’s the whole idea. Two tokens sit in a pool. You trade against the pool. A formula decides the price, not a person.</p><p>But there was just a little problem with V1: every pool was paired against ETH. Want to swap DAI for USDC? There’s no DAI/USDC pool. You go DAI → ETH → USDC. Two trades, two fees, two doses of slippage stacked on each other.</p><p>Then V2 came along and fixed that in 2020. Now, any token could pair directly with any other. One hop instead of two.</p><p>But V2 kept the same formula underneath, the <strong>constant product formula</strong>, x * y = k. And this is where it gets quite interesting, because that formula is a decent fit for volatile tokens, but a genuinely bad fit for stablecoins.</p><p>Let me show you what I mean before I show you the paper.</p><p>Say you’ve got a pool with 100,000 USDC and 100,000 DAI sitting in it. You want 5,000 DAI. Run the math using x * y = k, and you don’t pay 5,000 USDC for it, nah, you pay about 5,279.</p><pre>===================================================================<br>AMM CONSTANT PRODUCT FORMULA CALCULATION (Uniswap V2)<br>===================================================================<br>Target: Calculate USDC input required to withdraw 5,000 DAI<br><br>1. INITIAL POOL STATE<br>   • Initial USDC Reserve (x) = 100,000.00<br>   • Initial DAI Reserve (y)  = 100,000.00<br>   • Pool Fee Rate            = 0.3% (0.003)<br><br>   Calculate the invariant Constant Product (K):<br>   K = 100,000 * 100,000 = 10,000,000,000<br><br>2. TARGET WITHDRAWAL<br>   • DAI to Withdraw          = 5,000.00<br>   • New DAI Reserve (y_new)  = 100,000 - 5,000 = 95,000.00<br><br>3. NEW USDC RESERVE REQUIREMENT<br>   Formula: New USDC (x_new) = K / y_new<br>   x_new = 10,000,000,000 / 95,000 = 105,263.16<br><br>4. NET ASSET DIFFERENTIAL (Before Fees)<br>   • Net USDC Needed = x_new - x<br>   • Net USDC Needed = 105,263.16 - 100,000 = 5,263.16<br><br>5. TOTAL INPUT REQUIRED (Accounting for 0.3% Fee)<br>   Formula: Total Input = Net Input / (1 - Fee)<br>   • Total USDC Required = 5,263.16 / (1 - 0.003)<br>   • Total USDC Required = 5,263.16 / 0.997 = 5,279.00<br>===================================================================</pre><p>Sit with that. USDC and DAI are both supposed to be worth exactly one dollar. You just paid $5,279 to receive $5,000 worth of value. That’s not a rounding error, nah that’s real money gone, on a trade between two things that are meant to be identical in price.</p><p>This is exactly the itch Michael Egorov scratched when he wrote the StableSwap whitepaper in November 2019. So let’s actually go through it line by line, the way I had to, because some of it will throw you the first time you read it, the same way it threw me.</p><p><strong>The Abstract: “Uniswap with leverage”</strong></p><p>Egorov opens by calling StableSwap “Uniswap with leverage.” Hold that phrase, you’ll understand exactly why later.</p><p>Then he drops this line: <em>“when MakerDAO decreased its stability fee to 5.5%, many users of Compound (which had the interest rate of 11% at the time) preferred to stay there because they’ve taken the loan in DAI, and converting between DAI and USDC is an expensive task.”</em></p><p>If you don’t already live in DeFi, that sentence means nothing. Let me help with some world-building.</p><p>MakerDAO lets you lock up collateral and borrow DAI against it. That borrowing has a cost, the “stability fee”, which is essentially interest. Compound is a separate lending protocol where you can also borrow, but in different tokens, often USDC.</p><p>So imagine you already borrowed DAI from Compound, paying 11% interest. Suddenly, MakerDAO drops its own fee to 5.5%. In a perfect world, you’d just move your loan over and cut your interest rate in half. But you can’t just teleport a DAI loan into a DAI loan somewhere else; you’d have to pay back what you owe, which means getting your hands on DAI to repay it, and if what you’re holding is USDC, you now need to swap USDC for DAI first.</p><p>And that’s the whole point Egorov is making: on a regular AMM, that swap alone could cost you real money in slippage, maybe enough to erase the entire benefit of moving to the cheaper loan. People were stuck paying more interest than they needed to, purely because moving between two “identical” stablecoins wasn’t actually free.</p><p>That’s the pain. Now the paper gets into the mechanism.</p><p><strong>“Imagine a liquidity provider which has constant price”</strong></p><p>Egorov starts by describing the simplest possible pool, one where the price never changes, no matter what. Sell some of coin X, get the same amount of coin Y back. Always 1:1.</p><p>He writes this as: ∑xi = const Just add up all the coins, and that total never moves.</p><p>This sounds great on paper, literally. Perfect stablecoin behaviour, right? But he immediately tells you why it breaks: <em>“This doesn’t work in a fluctuating market unless the price is adjusted all the time. It can be done with price oracles, but it has risks and not very decentralized.”</em></p><p>Which means that if DAI ever loses its peg, say it drops to $0.90 outside this pool, nothing in this formula knows that happened. The pool keeps trading DAI for USDC at a flat 1:1, forever, no matter what the real world is doing, you could introduce an <a href="https://chain.link/education/blockchain-oracles">Oracle</a>, but that also has its own risks. So in the event that the pool is as is, no Oracle used and the depeg happens as described above, an attacker sees DAI trading cheaply everywhere else, buys DAI cheap on the open market, walks into this pool, and trades it 1:1 for your good USDC. They keep doing that until every dollar of real USDC is gone and the pool is left holding a mountain of worthless DAI.</p><p>That’s why this formula is dangerous on its own. It’s the “rigid slide” meaning it’s perfectly smooth, but with nothing stopping you from sliding right off the end.</p><p><strong>“The price is determined as −dxi/dxj”</strong></p><p>Egorov drops this here, once, with zero explanation, and doesn’t circle back to it clearly until pages later. This tripped me up badly the first time through, so let’s kill it now.</p><p>dx and dy just mean &quot;a tiny change in x&quot; and &quot;a tiny change in y.&quot; The price of a trade, at any exact moment, is just how much y you get for a tiny nudge of x; the slope of the curve at that exact point. Not the average price across your whole trade. The instantaneous price, right where you&#39;re standing on the curve.</p><p>Why does this matter? Because it means the “steepness” of a curve isn’t just a visual detail, it’s literally the exchange rate you’re getting at that instant. Flat curve, good rate. Steep curve, terrible rate. Keep this in your back pocket; we’ll need it again for the graphs.</p><p><strong>Uniswap, Bancor, Kyber and that Balancer line you can skip</strong></p><p>Egorov briefly explains that Uniswap and similar protocols solved the “constant price is dangerous” problem differently; instead of a flat price, they let the price move, using xy = const. This is the formula you probably already know from Uniswap.</p><p>Then there’s one sentence about Balancer generalising this to ∏xi^wi = const. Genuinely, you can skip this or look into it separately if interested. It&#39;s Egorov giving academic credit to Balancer&#39;s more general version of the same idea. It has nothing to do with how StableSwap itself actually works. Don&#39;t let it slow you down.</p><p>What matters is the very next line: this constant-product approach works fine for something like ETH, but <em>“it’s not very well working for something which is meant to be stable.”</em> Which brings us right back to our $5,279 problem.</p><p><strong>Constructing the StableSwap Invariant, the part that actually needs slowing down</strong></p><p>This is the section where nearly every real question I had piled up. Let’s take it slow, exactly as slow as I needed it.</p><p>Egorov starts by writing out both extremes again, generalised for any number of coins:</p><p>Constant sum: ∑xi = D Constant product: ∏xi = (D/n)^n</p><p>New term here:D. Don&#39;t overthink it. D is just the total value of everything in the pool, measured in a world where every coin is worth exactly $1, and the pool is perfectly balanced. If you&#39;ve got 100 USDC and 100 DAI sitting perfectly balanced, D is 200.</p><p>Now here’s the idea he’s reaching for: what if you could blend these two formulas together? Not switch between them but actually combine them into one single equation that behaves like the flat constant-sum line near balance, and morphs into the safer constant-product curve as things get imbalanced.</p><p>He calls the blending knob <strong>leverage</strong>, written as the Greek letter χ (chi). If χ is 0, you get pure constant-product, the safe, steep Uniswap curve. If χ is infinite, you get pure constant-sum, the dangerous flat line.</p><p>So he tries the obvious thing first, multiply the constant-sum side by χ and just add it to the constant-product side:</p><p>χ * ∑xi + ∏xi = χ*D_n + (D/n)^n</p><p>And then this line shows up: <em>“χ should ideally be a dimensionless parameter.”</em> And a couple lines later, out of nowhere: χD^(n-1).</p><p>Creating a question I had to sit with: <strong>why is D^(n-1) suddenly multiplying χ?</strong></p><p>It’s not magic. It’s just unit-matching. Think about it physically: the constant-product side (∏xi) is multiplying n different token amounts together, so for 2 tokens, that&#39;s dollars × dollars, which gives you &quot;dollars squared.&quot; The constant-sum side (∑xi) is just adding amounts, that&#39;s still plain &quot;dollars,&quot; not &quot;dollars squared.&quot;</p><p>You cannot add “dollars” to “dollars squared” and have the equation mean anything, the same way you can’t add 5 meters to 5 square meters and get a sensible answer. So Egorov multiplies the sum side by D^(n-1) specifically because that&#39;s exactly the missing power needed to bring both sides up to the same &quot;dollars-to-the-power-of-n&quot; dimension. For 2 coins, that&#39;s D^1, one extra factor of D, and now both sides of the equation are properly matched, dimensionally speaking. It&#39;s not some clever trick. It&#39;s just making sure the units on both sides of the equals sign actually agree.</p><p><strong>Why a fixed leverage isn’t good enough</strong></p><p>Right after building that blended formula, Egorov says something that’s easy to read past too fast: <em>“it wouldn’t support prices going far from the ideal price 1.0.”</em></p><p>Let me build why that’s true, in case you didn’t really get it as he intended.</p><p>Say you’ve got a small pool: 100 USDC and 100 DAI, with a fixed high leverage, acting like it’s way deeper than it really is. A trader shows up wanting basically all the DAI, 95 out of 100. If your leverage is locked at a high fixed number the whole time, the formula keeps pretending the pool is deep and flat, all the way up until the trader has drained 95% of your DAI. Then it snaps, but by then it’s too late; the damage to that side of the pool is already done.</p><p>A fixed leverage doesn’t know when to back off. It’s flat when it should be flat, and dangerously still flat exactly when it shouldn’t be.</p><p>So the fix: make the leverage itself change depending on how balanced the pool currently is.</p><p><strong>The dynamic leverage: χ that breathes</strong></p><p>Here’s the formula Egorov lands on:</p><p>χ = A * ∏xi / (D/n)^n</p><p>Notice: A is now a fixed constant you choose when you set up the pool — this is your actual tuning knob (the paper uses A = 100 for its slippage calculations). χ is what actually gets used in the invariant, and it moves based on how balanced things are.</p><p>Watch what happens at the extremes:</p><p>When the pool is perfectly balanced, every xi exactly equal to D/n, the fraction ∏xi / (D/n)^n becomes exactly 1. So χ = A. Full leverage. Maximum flatness. The pool acts exactly like your constant-sum, 1:1 dream.</p><p>When the pool gets badly imbalanced, say, almost all the DAI is gone, that product ∏xi shrinks toward zero much faster than the denominator does. The whole fraction collapses toward 0. So χ collapses toward 0 too. Full leverage disappears. The formula falls back to a nearly pure constant-product curve, the safe, steep one right when safety actually matters.</p><p>That’s the whole trick. Leverage that’s alive. High when you’re safe, and automatically backing off the moment you’re not.</p><p><strong>Reading the graphs (Figures 1 and 2)</strong></p><p>Remember the derivative-as-price idea from earlier? We’ll see it at play here.</p><p>Figure 1 plots token X against token Y for three invariants, all starting from a balanced 5-and-5. The straight red line is constant-sum. The curved black hyperbola is Uniswap’s constant-product. The blue line sits on top of the red line near the middle, then bends to match the black curve near the edges.</p><p>Figure 2 changes the axes entirely; now it’s trade size on the bottom, and the price you actually receive on the side. This is the one that makes slippage click.</p><p>Here’s the intuition: imagine you’re walking along the curve, one small step at a time, each step representing you putting in a bit more of token X.</p><p>On the flat part of the curve, each step you take barely changes your vertical position, meaning you get almost exactly what you’d expect back, close to a perfect 1:1. Low steepness, low slippage.</p><p>On the steep part, each identical step you take drops you enormous distances vertically, meaning the amount of token Y you’re getting back for each bit of X you put in shrinks fast. High steepness, brutal slippage.</p><p>That’s it. That’s the whole relationship. Steepness isn’t just a shape on a graph; it’s a direct, physical measurement of how bad your trade is about to get.</p><p><strong>The one sentence hiding an entire mechanism</strong></p><p>Right before the paper moves into simulation results, there’s this line, almost thrown away: <em>“That is done by finding an iterative, converging solution either for D, or for xj when all other variables are known.”</em></p><p>Don’t skip this sentence. This is doing an enormous amount of quiet work.</p><p>The full StableSwap equation, with all its A’s and D’s and products, cannot be solved with plain algebra. There’s no clean, one-step formula you can rearrange to instantly get your answer. Instead, the actual smart contract has to guess an answer, check how close the guess is, adjust, and guess again, over and over, dozens of times if needed, until the answer is close enough to trust. This method is called Newton-Raphson, and it’s quietly running, on-chain, every single time you make a swap or add liquidity to a Curve pool.</p><p>The paper mentions this in one sentence. Perhaps it deserves its own chapter. We’ll get there… I guess.</p><p><strong>Simulations and Performance</strong></p><p>Egorov didn’t just build this on theory, he backtested it. He pulled real historical price feeds for DAI, USDC, and USDT from three different exchanges (Coinbase Pro, Binance, and HitBTC) over six months, May to October 2019, and simulated how this invariant would have performed with $30,000 of liquidity sitting in it.</p><p>Two numbers came as a result that are worth a second look:</p><p><strong>A = 85</strong> turned out to be the optimal leverage for that specific dataset. Not 100, not 10–85. This is worth sitting with for a second: the “right” amplification coefficient isn’t some universal constant baked into the math. It’s tuned to how volatile the assets actually are in practice. Egorov picked <strong>A</strong> based on watching how these three stablecoins actually behaved against each other over real months, not by guessing.</p><p><strong>312% APR</strong> for liquidity providers, at that optimal setup. That number is doing a lot of heavy lifting in the abstract, where Egorov calls this pool an efficient “fiat savings account.” The logic here: because slippage is so much lower than a normal Uniswap pool, more trading volume naturally routes through this pool. More volume means more fees. More fees, spread across depositors, means a much higher yield than dumping your stablecoins into a regular AMM ever would.</p><blockquote>Quick note: <br>Worth flagging honestly; this number comes from a specific six-month backtest, in a specific market environment, assuming traders behave the way historical arbitrage data suggested they would. It’s a simulation result, not a guarantee. That’s a healthy thing to notice as a builder and auditor reading any whitepaper, simulated returns are a snapshot of the past, dressed up as a promise about the future.</blockquote><p><strong>Implementation</strong></p><p>Short section, but two details matter here for anyone who eventually wants to read or audit the actual code.</p><p>First: it’s written in <strong>Vyper</strong>, not Solidity. Egorov made that choice deliberately, and it might be the same reason serious Curve forks stick with Vyper today: it’s a stricter, more limited language by design. It forces safety by omitting features like inline assembly and unbounded loops, while embedding built-in reentrancy protection directly at the compiler level.</p><p>Second, that Newton-Raphson solving we talked about earlier isn’t done in floating-point math. It’s done using <strong>integer arithmetic only</strong>, directly inside the smart contract. That’s a deliberate constraint too; the EVM doesn’t have native floating-point numbers, and even if it did, floating-point math introduces rounding behaviour that’s dangerous when you’re moving real money. Every iteration of that guess-check-adjust loop happens in plain integers, which is part of why the precision and rounding boundaries in real Curve code are such a common audit focus.</p><p>The paper closes by noting the same mechanism could extend beyond stablecoins to interest-bearing tokens like cDAI or staked assets. That throwaway line, written in 2019, is essentially Egorov previewing what would eventually become Curve V2’s entire reason for existing.</p><p><strong>Closing…</strong></p><p>If you got to this point, welcome! I hope you had a fun and really mind-illuminating experience.</p><p>I fell in love with this Whitepaper because of how incredibly enticing it was written, like an invitation into the mind of the author… and whilst there are possibly hundreds of different explainers of the same work, I hope that this one helps you understand it at the deepest possible level so you have the proper intuition behind it and see why this paper is truly a work of art.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a10d508876b6" width="1" height="1" alt=""><hr><p><a href="https://coinsbench.com/curve-v1-for-dummies-a10d508876b6">Curve V1 For Dummies!</a> was originally published in <a href="https://coinsbench.com/">CoinsBench</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feedback!]]></title>
            <link>https://oreoluwaisrael.medium.com/feedback-27b01a963cfb?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/27b01a963cfb</guid>
            <category><![CDATA[christianity]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 07:23:26 GMT</pubDate>
            <atom:updated>2026-06-08T07:23:26.056Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*PB51Z7yKkWWQ_9FwoHHJJg@2x.jpeg" /><figcaption>let’s go!</figcaption></figure><blockquote>“To be is to be perceived. And so to know that we exist, we need a mirror. If the mirror is not a human eye, we will seek it in the structure of our own creations…”</blockquote><blockquote>— George Berkeley.</blockquote><p>One of my Professors in college in what i would call his paper (for lack of a befitting term) on Automata Theory and Computability established a thought in the first few pages that recently began to ring in my head again…</p><p>He was trying to explain that a Process prescribes and/or specifies the instances of transitions from an “Undesirable” to a “Desirable” state, which simply means a process is more or less each of the different stages that are present in the transition from an undesired state or situation to the goal you are trying to accomplish (desirable state). He went on to describe what <strong>Feedback</strong> is and its importance to both Material Agencies (Machines) and Biological Agencies (Humans, Living Organisms) and further implied that machines can easily achieve a desired state without <strong>feedback</strong> because they are blindly compliant, whereas humans cannot function without <strong>feedback</strong> because we are inherently aware. His argument was that for humans, <strong>feedback</strong> is an existential necessity for progression, something we don’t just crave but need so much that prolonged silence or a lack of signal of any form, can fundamentally paralyze our agency.</p><p>That is a profound observation if you ask me…almost makes me want to forgive him for not giving me an A but let’s not get ahead of ourselves…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*D5BBdvjxY9Smg-jNlSaRpA@2x.jpeg" /><figcaption>i am sure you’ve noticed by now that i started making bold each mention of the title, well i didn’t expect it to turn out this many and i am tired, so…</figcaption></figure><h3>Feedback, why!?</h3><p>What is it about Feedback that’s so important that the people in my head have not shut up about it in a while…?</p><p>For the sake of this argument, let’s define Feedback simply as Response, and this could come in any way or form depending on the situation or Agency that requires it, Response is one thing that matters a lot in a person’s journey in life.</p><p>This stance stems from a realization that i have come into of recent, i have studied quite a number of people closely and from afar and i have seen that everyone has an earnest desire to know that they are not wasting the time, efforts, resources exerted on a task. They need a Feedback loop that keeps their decisions informed.</p><p>In a way, this human necessity mirrors the paradigm shift we see in advanced computation. Where a classical computer blindly executes a single path at a time, crashing into a dead end, losing momentum, and forced to reboot sequentially , quantum computers operate on an entirely different plane. They solve complex tasks at infinitely high speeds not merely because of raw, simultaneous parallelism, but because of how they handle failure. Through quantum superposition and interference (big fancy words you don’t need to worry about), the system explores the entire maze of possibilities at once. At each internal juncture in the process, when a dead end is reached, the math ensures that the incorrect path actively cancels itself out, dynamically shifting energy to amplify the correct path. The system seamlessly pivots because it acknowledges the dead end instantly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*eLDiOHVnYYOVCJTxfwdHEg@2x.jpeg" /><figcaption>caught…🤐</figcaption></figure><p>I believe that humans crave that exact same algorithmic efficiency. We are terrified of running a linear script for years only to find we have walked straight into a wall. We require a relentless, immediate stream of feedback to act as our internal interference mechanism , canceling out our false starts, validating our current coordinates, and assuring our consciousness that our exertion is moving us closer to a meaningful state.</p><p>And this is evident across different areas in our respective lives, it is evident in our relationships, our careers, academics and even in our relationship with God.</p><h3>Communication ≠ Feedback…</h3><p>Feedback more often than not is much more than communication, it’s deeper than that. Communication can happen in a straight, dead line. A radio tower broadcasts static into space; a classical computer outputs a string of text; a person yells into an empty room or a canyon. This is communication, data has been encoded and sent. Feedback, however, requires that the output loops back to alter the input. It is the mechanism that says, “Because this happened there, I must change what I am doing here.” It is not just the transmission of information; it is the consequence of information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*16q0MVjALTBHT9M_qHinCQ@2x.jpeg" /><figcaption>snippet.</figcaption></figure><p>And I say this cause it’s true, think about it, when you or someone else is starving for a signal in career, spiritual, or relational silence, you aren’t just looking for “communication” (like a generic automated email response or small talk). Nah, what is sought after, what they’re all looking for is feedback, proof that their presence has caused a ripple, altered the environment, or that something they’ve done or are currently doing is bringing them closer to their desires, proof that they’re at least doing something right no matter how little or insignificant it may be at the moment, proof that if they do continue and keep digging, they will hit water and maybe eventually hit oil and then maybe just maybe by God’s grace, they will eventually hit Gold…</p><p>Feedback gives them that succinct proof, might not be loud but it is confirmation enough at a time when it is needed the most.</p><h3>Translating the Silence.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*beN8ovE9GL4s6axH6C9nxQ@2x.jpeg" /></figure><p>In studying people, I have discovered that a lot of people have found substitutes for the exact source of the feedback they truly need or have found another kind of feedback entirely.</p><p>They have substituted conversations with people with conversations with AI models mostly because the feedback is quick and a lot of the complexities involved in discussing real issues with another human being are all non-existent when speaking to Claude (except the off chance that you’re responses are being recorded, a chance people won’t mind taking). They have also substituted real feedback with curated digital validation, they broadcast fashionable parts of their lives to online strangers for quick likes rather than facing the vulnerability of a private conversation. Others trade external genuine and helpful advice for paralyzing self-analysis, overthinking, running endless mental loops to guess what people think without ever risking asking them directly. Many even substitute relational feedback with quantifiable achievements, chasing work metrics or fitness goals to feel successful so they never have to confront the messy reality of their emotional lives.</p><p>That is where we’re unfortunately at and it scares me…</p><p>But I get it, I genuinely do…</p><p>Because I am not talking about people who don’t care. I am talking about the ones who care the most. The ones who have heard the word <em>koinonia</em> their entire lives, who have preached deep fellowship, but have never actually tasted it. These are the saved, faithful believers who pray for the sick and watch them get healed, while their own bodies remain sick. They truly believe God blesses, yet they live paycheck to paycheck. They testify that Jesus ensures success, but they just failed the very exam they fasted and prepared for the most. They do not lack faith; they lack answers. They will tell anyone else in a crisis that prayer is the key, but in the quiet of their own rooms, their own prayers seem to hit a brass ceiling, their journals are filled with unanswered requests. They understand that The Holy Spirit is the one to turn to at every point in time, they know this truly but when you have no personal track record of hearing God’s voice , when the silence has been your only consistent feedback, you naturally turn to whatever actually responds. We tend to rely on what delivers as humans. And in that desperate gap, the substitute doesn’t seem so bady.</p><p>And without realizing it, the original Feedback source is substituted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*OotxW5_gH4eVsdyW7Kehog@2x.jpeg" /><figcaption>substitution…</figcaption></figure><h3>Hope!?</h3><p>It is kinda beautiful when you realize what this teaches us though, about what it means to be a human being, a creature that wasn’t made to be able to function in silence, one that simply cannot survive in a vacuum.</p><p>I mean we can handle the failure, the chronic pain, and the unanswered requests, but we cannot handle the implication that our exertion means absolutely nothing to the universe, that the drum we are beating makes no sound whatsoever. We need to know the current is wired back into the activity. We need a signal to tell us that our time is not being poured into a bottomless pit.</p><p>So we take the response wherever we can find it. Everybody knows what they’re doing, this isn’t a case of Ignorance. We know fully well that the AI model is incapable of comprehending the depths and complexities involved in the crazy randomness of everyday life, we are fully aware that the machine on the other side doesn’t actually feel a thing but we ask anyway, it’s become the “Therapist” for many people.</p><p>It is a fragile compromise, but it is a necessary one. Because when you have given everything you have to the silence, you realize that the most dangerous thing a person can do is to stop knocking entirely. But as long as something is responding, we are still here. We are still trying to find our way out of the maze.</p><p>And I won’t pretend that naming the substitution makes it easier to put down. Some of us have been in the compromise for so long it has started to feel like the arrangement. The AI app stays open, the numbers keep getting chased, the over thinking self-analysis loops run at 2am. Not because we have given up on the real thing but because the real thing has been quiet for so long that we have genuinely forgotten what its voice sounds like. And there is a particular kind of loneliness in that, I think specifically the loneliness of having prayed everything you have into a ceiling and heard nothing come back. Of having done everything right, by every metric you were given, and still standing in the same silence. That kind of loneliness doesn’t announce itself. It just quietly becomes the temperature of your life…the new normal.</p><p>But that can’t be all there is, because the silence of God is sometimes louder than anything else, we just need to keep waiting, keep trusting, keep praying, keep fighting, because this is the victory that overcometh the world, even our Faith.</p><p>And I know that is easier to type than to live, trust me I really do. I know that for some of you reading this, keep waiting sounds like an insult dressed as encouragement because you have been waiting. You have been trusting. You have been praying and fighting and showing up and the ceiling is still brass and the silence is still loud and the journal is still full of requests that haven’t moved, I know. And I am not going to cheapen that by telling you it will all make sense soon or that the breakthrough is just around the corner because I don’t know that and neither does anyone else. What I do know is that the tree though it be cut down doesn’t know when the water is coming either, it just holds, it just stays. And at the scent of water, not the flood, just the scent, it springs back to life like it was never cut down at all.</p><p>And so to anyone reading this who’s navigating life without Feedback, don’t lose hope…if there truly is hope for a tree that is cut down then there is more than enough hope for you because Christ in you is the Hope of Glory.</p><p>And I assure you, the Sun will shine on us again…🙂‍↕️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*PUOnLtXbPNAo0I0kB8LXLA@2x.jpeg" /><figcaption>smile :)</figcaption></figure><blockquote>Thank you for reading my rant!☺️</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27b01a963cfb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Black Box]]></title>
            <link>https://oreoluwaisrael.medium.com/black-box-e1162c14c160?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1162c14c160</guid>
            <category><![CDATA[anime]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[christianity]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[psychology]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Thu, 30 Apr 2026 09:44:20 GMT</pubDate>
            <atom:updated>2026-04-30T09:44:20.743Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/247/1*k5-kk3p50M9fjP-yT-AjpA@2x.jpeg" /></figure><p>this is a really long read guyss, please stay with me…😭</p><p>There’s a term in computer science and in engineering called a <strong>black box</strong>. It describes any system where you can observe the inputs and outputs but have no clue about what happens in between, it’s all totally hidden from you. And so you feed something in, something comes out, and whatever produced that result kinda remains a mystery to you.</p><p>It’s why the human brain is considered a black box. While neuroscience can observe brain activity, the specific way the mind “calculates” a thought or experience remains opaque. A basic calculator or a thermostat on the other hand is not a black box, and the reason is quite simple, we could map out every possible outcome the system could assume, every state is as a result of a “If-This-Then-That” logic and so there really isn’t anything hidden from us.</p><p>But you see Life though…Black box.</p><p>But let’s extrapolate that a little bit; I speak as a man but I think that <em>Life could be viewed as existing as a spectrum where on one end we have a deterministic system of governance and on the other a non-linear, nothing guaranteed system</em>. My initial draft had pointers to the fact that every outcome in life is essentially untraceable to its cause but on second thought, that isn’t quite accurate, I think it’s important to isolate the kind of system we’re dealing with because I believe(as I would try to explain in a bit) that <em>isolated natural systems tend toward determinism but the more human agency, social context, and interconnected variables you introduce, the less deterministic it becomes…</em></p><p>A simple though a bit lazy way to explain that would be to say “Humans are complex” and that would be true but doesn’t quite capture the entire picture…</p><p>Let’s examine a scenario, Two farmers plant yam, I think it’s fair to assume that ceteris paribus(all things being equal), same inputs should give us same outputs, meaning they both get yam in near equal proportions.</p><p>But you see, ceteris paribus is doing enormous work in that sentence. All other things equal. And in real life, all other things are almost never equal. Soil composition differs. Rainfall timing differs. One farmer’s land has better drainage. One gets a pest outbreak. Maybe one has a son who helps, or workers and the other doesn’t. You see, the moment you zoom out from the controlled condition, the variables multiply faster than you can track them.</p><p>Which is why I made the above claims in Italics…Planting yam is closer to the deterministic end. Two people working hard toward a career, a relationship, a calling, in different cities, different families, different economies, that’s closer to the non-linear end.</p><p>And so the Black box isn’t about nature being chaotic, nada I think nature pretty much has its own logic that’s mostly traceable, but it’s about the actual human experience of making decisions inside systems that are far too complex to fully model to the most minute detail, where your inputs are just one variable amongst hundreds you don’t control.</p><p>And so the black box problem is specifically about human life inside society, history, relationships, Tinubu and Shettima, APC, and circumstance.</p><p>If I haven’t lost you yet, I have been sitting with this thought for a while mostly because the people living in my head wouldn’t let it go, there are like different voices arriving at different conclusions, debating those conclusions, breaking them down further, debating the new ones that emerge. It doesn’t stop. And the only way I’ve found to try to make sense of it is to feed the conversation, read things, watch things, think about things until the factions have enough material to actually argue with.</p><p>Lately, that material has been rewatching Attack on Titan and Victor Frankl.</p><h3>Arc 1: The Gambler With No Information</h3><p>I’ve been rewatching AoT, and on first watch Erwin Smith comes off as a hero. Brilliant, composed, willing to sacrifice everything for the greater cause. But on rewatch you start to see it differently. This man was a gambler. High stakes, no safety net, push everything to the center of the table with both hands.</p><p>Every major move he made operated on near-zero information. The Female Titan operation. The battle in civilian territory. Sending scouts beyond the walls knowing most of them weren’t coming back. He was making costly, irreversible decisions from inside a complete black box, no visibility into what was coming, no guarantee any of it would work.</p><p>And shit is most of it didn’t. Tactically, his bets kept failing. People died. Plans collapsed.</p><p>But interestingly, Erwin understood something most miss about operating in a black box: when you genuinely cannot calculate safely, the cautious move isn’t the safest option. It’s just the least painful one.</p><p>Think about it like this. Say you have a job paying 150k naira a month. Stable. Predictable. somewhat safe. And you’re sitting on a skill, cloud engineering, data science, content creation, or some other skill the normies have that could completely change your financial trajectory, but locking in on it would require quitting, having no income for months, sitting in real uncertainty. The safe choice isn’t actually safe if the long-term cost of staying outweighs the short-term cost of leaving. Safety can be less rewarding. Safety, in the wrong context, can be the most dangerous option on the table.</p><p>Erwin knew this. Every failed gamble narrowed the possibility space. Every loss generated data. He wasn’t playing to win individual battles. He was playing to eventually see inside the box, even if it cost everything to get there.</p><p>Now contrast that with Armin. Where Erwin calculated expected value, weighing probable gains against probable losses and betting on the higher reward, Armin anchored on risk of loss first. The tunnel plan with Annie is the perfect example. The logic was sound and although I don’t see why they couldn’t think of the possibility of her inflicting injury on herself in a way that didn’t involve her mouth. That one unaccounted variable and the whole thing unraveled.</p><p>Neither approach is wrong exactly. Erwin wins wars. Armin saves individuals. But both of them were still operating in the same black box. The difference was just their tolerance for not being able to see inside it.</p><p>However, Eren’s black box was different. His wasn’t about strategy.</p><p>Here’s what I mean.</p><h3>Arc 2: What if the Dataset is the Problem!?</h3><p>Victor Frankl was a psychiatrist who survived the Nazi concentration camps and wrote a book: Man’s Search for Meaning, one of the most important books I’ve encountered. His central argument, is basically: meaning is the one variable your circumstances cannot touch. They can take everything external but they can’t determine what you decide you are suffering for. That internal orientation, choosing what your pain means, is almost unbreakable.</p><p>There are three possible places Frankl says you could find it: in love, in your work, and in the courage you show during unavoidable suffering. Hold onto any one of those and your world has less power over you than it otherwise would, because you have something that transcends it.</p><p>Now, say a philosopher reads Eren’s story through Frankl’s lens they would probably argue that Eren failed precisely here. That he didn’t try hard enough to find meaning in something deeper, didn’t hold onto anything that could have helped him transcend the difficulty. That if he had, maybe the conclusion wouldn’t have been the Rumbling.</p><p>But I don’t think argument actually works for Eren. Stay with me.</p><p>In econometrics, there’s a concept called goodness of fit, how closely your model explains the actual data. The idea is to try to get your R² as close to 1 as possible, filtering out noise, and isolating only the variables that actually move the needle. The other variables get eliminated naturally because the data itself removes them.</p><p>Eren’s R² was as close to 1 as his world could have made it. Not because he was overfitting, but because of the hand he was dealt. The circumstances he found himself in had already eliminated almost every other variable. There was no realistic possibility of finding love, building something peaceful, investing in a life outside the walls of what his world demanded. Even if we grant religion as a fourth possible source of meaning, in Eren’s universe there is essentially no God. The founding titan is the closest thing, and it’s a curse, not a comfort.</p><p>Frankl’s three sources of meaning? War had already closed most of them. Which brings us to the next problem.</p><p>Frankl was powerless. He couldn’t change what was happening to him. And when you genuinely cannot act, meaning becomes the only available response. It would almost be cruel to give a powerless person any other advice.</p><p>But Eren wasn’t powerless. He was the founding titan.</p><h3>Arc 3: Two Kinds of Power</h3><p>Which means Eren had two kinds of power available to him simultaneously, and that changes how we look at things.</p><p>He had on one hand the power to change things externally, to rumble, to become the monster, to force a conclusion that might break the cycle for everybody, permanently by wiping out 80% of humanity.</p><p>And on the other hand the power to exempt himself internally, to hold onto something greater than his circumstances, let that anchor override what the data kept telling him, to choose meaning above the output the black box kept producing.</p><p>One of those options could change things for essentially everybody. The other could only change things for him. And if the cycle would have continued without intervention, if the next generation would have walked into the same walls and the same hatred, then choosing the internal option while the external one was available starts to look less like virtue and more like a very peaceful, very private selfishness…you know the kind we know very well in Nigeria, the “it doesn’t matter who’s president, as long as it is well with my family…” I know what some of you are.🌝</p><p>And this is where the GOATness of Isayama shines.</p><p>Compare this to Sasuke’s arc in Naruto. He arrives at a similar place philosophically, the “I’ll become the concentrated evil, absorb all the hatred, be the one villain everyone unites against” conclusion. But it doesn’t land the same way. The structural build isn’t there. You feel like Kishimoto needed an endpoint and worked backwards to justify it. With Eren, you believed it with him because you watched every door close, one by one, across years. The monstrous conclusion was earned.</p><p>You see Isayama built a trap. Both of Eren’s options are simultaneously defensible and insufficient. The ending divided people so sharply because your own values determine what you see in it. If you value meaning-making above consequences then to you Eren was wrong. If you think consequences matter more, then he was tragic but logical.</p><p>No clean answer exists from inside the story.</p><h3>Arc 4: The Anchor That Survives Everything</h3><p>But I think one exists from outside it.</p><p>The problem with both of Eren’s options is that they were anchored to things that could be taken. The Rumbling depended on power that was inherited, cursed, and temporary. The transcendence that Frankl modeled depended on anchors such as love, meaning, faith in humanity, which just so happened to have already been methodically destroyed, one by one, every time he extended trust and got the same output back.</p><p>What neither option accounts for is an anchor that is destruction-proof by definition.</p><p>Step even outside of AoT.</p><p>Think about Ryu. Think about Sukuna. Two people who, by any reasonable measure, lived full lives on their own terms. Power, autonomy, complete mastery of their world. And yet there was still no satisfaction. Still something missing, something that kept pulling, like finishing a full course meal and still wanting dessert except this time, the dessert never actually arrives. You just keep eating, keep wanting more. I’m a firm believer in being contented but never satisfied with your current level, but I see people, and sometimes you can tell their quest for more isn’t necessarily driven by a desire to not be average but by an insatiable thirst for something they themselves can’t explain.</p><p>I think about someone from social media who would carefully arrange two iPad Pros, multiple iPhones and Samsungs into the corner of a room with enough expensive things in frame, some screens open on trades earning thousands on top of thousands of dollars already made. The composition was never accidental. And Elon, for all his indifference to the appearance of wealth, is still acquiring, still building, still reaching for something just beyond the last thing he achieved. Different scales, same itch, same bottomless cup.</p><p>And I’ll be honest about myself here because I think the argument earns it. One of my contradictions is that whilst I genuinely want to operate in the background, I still want to be noticed and seen.</p><p>So what are we all actually looking for?</p><p>I think it’s simple: confirmation that we exist in a way that matters to someone outside ourselves. That our presence registers. That we’re seen. And the reason it never quite does the trick is because external acknowledgement can’t answer that question permanently. It needs constant renewal. Say someone doesn’t notice or someone notices but doesn’t say anything or they say something but it feels hollow. Then the cycle repeats; The iPad Pro guy posts again. Elon acquires another company. Sukuna keeps fighting stronger opponents.</p><p>Augustine said it before any of them figured it out. “Our heart is restless until it rests in Thee.” He was describing exactly this, the thing everyone is circling without knowing what it is, the thing that achievement and acknowledgement keeps almost but never quite delivering, is the specific peace of being known completely and loved anyway by something that will not withdraw that love.</p><p>But what is that which loves completely and doesn’t fade nor withdraw their love?</p><p>God.</p><p>Honestly man, think about it, it just has to be God. And not in a vague cosmic energy kind of way. Specifically the God who, while you were still figuring yourself out, still contradicting your own self, already knew every version of you that would ever exist and decided you were worth it anyway. That’s not acknowledgement. Acknowledgement is conditional, it responds to what you present. This is something different. This is being known all the way down, nothing left to present, no trade screenshot, no carefully framed corner of your room, just you, and being loved there.</p><p>And the reason it doesn’t fade is because it was never conditional on your performance to begin with.</p><p>Now I know what the atheist says here. There is no God, the itch is just some biological thing, an evolutionary misfiring, a brain that developed the capacity to want meaning in a universe that has none. And honestly that’s the most haunting version of that position, not the angry kind but the quiet honest kind that says humans are meaning-seeking creatures in a universe that may be completely indifferent to that seeking.</p><p>But here’s what I keep coming back to. You don’t find creatures consistently thirsting for water in a universe where water doesn’t exist. Thirst evolved because water is real and findable. The fact that humans across every culture, every century, every economic condition keep circling this same unfillable wanting, keep building gods even when they tear old ones down, that itself is interesting evidence. C.S. Lewis put it simply, if I find in myself a desire which no experience in this world can satisfy, the most probable explanation is that I was made for another world.</p><p>The atheist has to explain why the itch exists at all. And “it’s just neurons” is an answer. But it’s not a satisfying one.</p><p>Which is almost the point.</p><p>It’s interesting to think about ‘cause the source of meaning you’re reaching for is so vast that nothing in your circumstances can actually exhaust it. Nothing can take it away because nothing is bigger than it. You can lose everything and it remains. You can have everything and it still surpasses it. And it makes sense that only when we see God as the only source of meaning that transcends everything, then we find rest because He is infinitely greater and bigger than the entire universe, which means everything else pales in comparison.</p><p>That’s the only anchor that survives the black box completely.</p><p>And I want to be honest, I’m not saying this as a comfortable default. I’m saying it as someone who ran it through every argument in this essay and watched it survive. The thing about Frankl’s framework is that it requires sources of meaning that exist within reach. Love. Work. Suffering with a purpose you can see. But what happens when all of those get taken? What happens when the dataset eliminates every variable except the worst ones?</p><p>That’s where Frankl’s framework quietly reaches its limit. And that’s exactly where faith steps in, not as a fallback, but as the thing that was always supposed to be the foundation.</p><h3>Arc 5: One Node in an Eternal Timeline</h3><p>There’s something I want to say here but I’m also going to be intentional about how I say it.</p><p>The most honest answer to navigating a black box, not just surviving it but actually moving through it with clarity, is the Holy Spirit. I believe that fully. The idea that you can have access to something that exists outside of time, outside of the limitations of incomplete information, outside of the very thing that makes the black box a black box in the first place, that’s not a small thing. That’s the ultimate advantage. And I’d be doing this entire essay a disservice if I didn’t name it.</p><p>But I also know that’s easy to say.</p><p>It’s easy to say “just talk to God” or “lean on the Spirit” to someone who is genuinely in the middle of their own black box, especially if they haven’t yet built the track record. Haven’t yet learned how God speaks to them specifically. Haven’t yet had enough reps to know whether the silence they’re experiencing is God being quiet or just them not yet knowing how to listen. Those are real questions. And the person asking them isn’t faithless, they’re just still in the process of finding out.</p><p>And here’s the thing about the person still waiting. Just because they haven’t seen it yet doesn’t mean it’s enough to call God unfaithful. They are one node in an eternal timeline. God exists completely outside of time, which means their current chapter, however long and however silent it feels, is not even close to the full picture. The absence of results in one lifetime isn’t a verdict on God’s faithfulness. It’s just evidence that the timeline is bigger than one person’s experience of it. And honestly, knowing that is its own kind of faith.</p><p>I have a whole other thought about this, about feedback, about how you actually learn to hear God, about what it means to stay long enough to recognize His voice, about why the gap between believing and experiencing isn’t evidence against God’s faithfulness but maybe just evidence that there’s still more to learn. That’s an essay for another day.</p><p>For now, what I’ll say is this.</p><p>Hebrews 11 doesn’t only celebrate the people who got the promise. It celebrates the ones who didn’t see it and held on anyway. The ones who had the faith without the testimony, the belief without the result, the crown without the proof. And God called them heroes. Not almost heroes. Not heroes in training. Heroes.</p><p>So if you’re reading this and you’re somewhere in that gap, you believe but haven’t fully experienced, you’re holding on but haven’t seen the answer yet, you’re not disqualified from the anchor. You’re actually already living the harder version of the faith. The version Hebrews 11 makes sure we don’t forget.</p><p>Some people will get the crown and the testimony. Some people will get the crown and the scar. But the thread running through both is the holding on. The refusal to let the circumstances be the final word.</p><p>That’s what Eren never had. Not because it wasn’t available. But because in his universe, it genuinely wasn’t. And maybe that’s the most important thing this story gives us, not a blueprint, but a mirror. A way of seeing clearly what it costs when the only anchor that cannot be taken is the one you never found.</p><p>As I close, I think the question is what you’re building inside yourself right now, before the black box closes around you, that will still be standing when everything else gets taken.</p><p>Because something will get taken. That’s not pessimism, it’s more like the dataset speaking.</p><p>The only variable worth optimizing for is the one that survives the loss of all the others.</p><blockquote>Between the monster and the meaning, I’m still becoming.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1162c14c160" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Therapy Session: Wrestling with Grace and Judgement! [Part 2]]]></title>
            <link>https://oreoluwaisrael.medium.com/therapy-session-wrestling-with-grace-and-judgement-part-2-24929a049391?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/24929a049391</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[christianity]]></category>
            <category><![CDATA[love]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Thu, 18 Sep 2025 02:00:30 GMT</pubDate>
            <atom:updated>2025-09-18T02:00:30.978Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*dUgmwrUMtVaR1_C6bVPmZA@2x.jpeg" /><figcaption>real.</figcaption></figure><blockquote>Mercy without justice is the mother of dissolution; justice without mercy is cruelty.</blockquote><blockquote>– Thomas Aquinas</blockquote><blockquote>🔗 Haven’t read Part 1 yet? Start here → <a href="https://medium.com/@oreoluwaisrael07/therapy-session-wrestling-with-grace-and-judgement-6fa282b86d17">Therapy Session: Wrestling with Grace and Judgment! (Part 1)</a></blockquote><h3>Arc 4: The Infinite God, Men and Monsters.</h3><p><strong>Therapist</strong>: (quietly) That’s the tension, isn’t it?</p><p><strong>Me</strong>: (nodding, sighs) Yeah, it is…My judgment system is flawed, I know it, I’m not God.</p><p><strong>Therapist</strong>: And what does that mean to you?</p><p><strong>Me</strong>: Hmm…I’ve always believed, and I think every Christian has to wrestle with this at some point that God is infinite. He’s not bound by our categories, our sense of time, our tiny logic boxes. He’s infinitely bigger, infinitely brighter, infinitely more brilliant.</p><p>And I get it: God exists outside of time. Past, present, future, it’s all not linear for Him; it’s one collapsed continuum, a single frame. He doesn’t just see the murderer on the train. He sees the redeemed vessel, the one who will one day preach the gospel to thousands. That’s who He sees..</p><p>But me? I don’t see that, I can’t see that. My grace is limited, my mercy has a cutoff point. My forgivenessp is tethered to what I see or experience in real time. And what I see, in this moment, is a monster. My humanity burns with anger even while my faith whispers about forgiveness. And it hurts…</p><p>I also know that if I had full knowledge of God’s plan, it would break me like Gojo’s Infinite Void in Jujutsu Kaisen, you know what it does, right? Endless knowledge collapsing into my brain until I turn to mush(brain-dead). My mind doesn’t have 0.01% of the computational power needed to hold His perspective. My RAM would crash instantly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*cSp8AUgdaQjCboE3n9hb-A@2x.jpeg" /><figcaption>Infinite Void</figcaption></figure><p>So yeah, I know He is right, but it doesn’t make it easier.</p><p><strong>Me</strong>: It hurts, it really does, ’cause that girl on the train? She could’ve been my friend; she could’ve been anyone. And in my mind, I don’t want anybody’s loved one turned into statistics, reduced to a line in somebody else’s testimony: “I killed a lot of people…but now I’m saved.” No. That doesn’t sit right with me.</p><h3>Arc 5: Mercy as the Impossible (The Pushback)</h3><p><strong>Therapist</strong>: Let me share a story with you. The details are a little blurry, but stick with me…</p><p>There is a story told about a mother who came to Napoleon on behalf of her son, who was about to be executed. The mother asked the ruler to issue a pardon, but Napoleon pointed out that it was the man’s second offence and justice demanded death.</p><p>“I don’t ask for justice,” the woman replied. “I plead for mercy.” The emperor objected, “But your son doesn’t deserve mercy.” “Sir,” the mother replied, “it would not be mercy if he deserved it, and mercy is all I ask.” Her son was granted the pardon.</p><p><strong>Me</strong>: (sits back, quiet) Wow. That’s… something. But also true.</p><p><strong>Therapist</strong>: Israel, you’ve been saying it yourself. None of us can ever deserve it. Mercy, by definition, is undeserved. Grace, by definition, is unfair.</p><p>From the boy who stole meat from his mother’s pot, to the child who snatched food from a market stall just to survive, to the adulterer and even the serial killer. Christ paid for all of it.</p><p>And if you don’t begin to see people the way Christ does, not as murderers, not as statistics, but as children He already redeemed, forgiveness will always feel impossible.</p><p><strong>Me</strong>: So you’re saying I need to love them?</p><p><strong>Therapist</strong>: Not just love them when it makes sense. Love them when it doesn’t. That’s the harder test. Because honestly, anyone can love the victim. Loving the murderer? That’s Christ-level.</p><p>(Pause in the session)</p><p><strong>Me: </strong>(voice rising, almost snapping) I feel like I can understand the words coming out of your mouth, <em>I really do! </em>But I just can’t seem to simply accept it. And maybe it’s easier for you or for anyone else because this event doesn’t affect you personally. And before you bring up that book <em>When God Doesn’t Make Sense, </em>remember, I recommended that book to you. I know the complexities of following God’s principles. I know and have had meltdowns over the stories of martyrs who watched their families die, and their last words were still, <em>“I forgive you.”</em></p><p>(leans back, a deep breath after) Trust me, I know..</p><p><strong>Therapist:</strong> So what really is the problem? Speak your truth. What is it that is difficult to accept?</p><p><strong>Me:</strong> (calm now, breathing normally, soft tone) I guess I don’t understand Mercy…what is mercy, really?<br>Yeah, I think that’s the question: “What is mercy, really?” Because mercy doesn’t mean there’s no justice. Mercy doesn’t mean we ignore judgment. Without judgment, there’s no justice. If the law says the penalty is death, do we say “no death” because of mercy?</p><p><strong>Therapist: </strong>No, mercy is not that. Truth is, mercy is something different. Mercy is choosing not to hate a person so much that you would rather they burn in hell than have a shot at Salvation. Mercy might be you whispering Christ’s name to them, even while your fists are still clenched.</p><p><strong>Me</strong>: But then I remember the girl on the train. What if she were on her way to church that morning, or what if at her intended stop, a street preacher was going to be there to preach a sermon that would have turned her heart towards God? And that monster cut her life short, played judge, jury and executioner. <br>Who gets mercy then? Where is the balance? What is mercy, really?</p><p><strong>Me</strong>: (leans forward, staring at the floor, hands interlocked) But I guess, like the entire premise of Jesus laying down His life for our sins, Mercy doesn’t necessarily make sense; it’s not exactly logical, and that’s what makes it mercy. If it made sense, it would just be Judgement.<br>And maybe that’s what breaks me the most because I ache for justice. I crave it. But my faith keeps whispering about mercy, about forgiveness, about a love that doesn’t calculate worth.</p><p><strong>Therapist</strong>: And that’s the tension you’re wrestling with, Israel. The ache for judgment and the ache for grace. Two flames are burning inside you at once.</p><p><strong>Me</strong>: (sighs, almost laughs) So maybe I’m not broken. Maybe I’m just… human.</p><p><strong>Therapist</strong>: Exactly! Human. But being human doesn’t mean staying there; it means recognising that Christ is calling you to stretch beyond what’s natural, into what’s divine.</p><p><strong>Me</strong>: You know what I was thinking about, Doc? Systems. Like, economic systems. Capitalism versus socialism.</p><p><strong>Therapist</strong>: (smiling) That’s quite a jump. But go on.</p><p><strong>Me</strong>: Yeah, it sounds random, but it’s kind of an amazing fit. Look, capitalism says: “If you don’t work, you don’t eat.” You’ve got to earn survival. You’ve got to prove you deserve the basics. And in a way, that feels like my justice system, my human heart. You do good, you get good. You do evil, you face death. Simple. But love? God’s love? That’s socialism on steroids. It says: “Everyone eats, everyone gets grace, even the lazy one, the cruel one, even the killer on the train, the school shooter, the assassin”. No prerequisites, no performance reviews, just mercy, just love. And that… (pauses, exhales sharply) That confuses me, Doc. Because my instinct is to help the guy who’s trying, the one grinding, striving, failing, but still pushing. My instinct is to turn away from the one who wastes life. But Christ doesn’t judge love by effort. He loves the useless one. The destructive one. The undeserving one.”</p><p><strong>Therapist</strong>: Can you love like that? Or let me put it this way: can you love someone just for existing? Not for what they’ve done, not for what they might become, but simply because Christ does?</p><p><strong>Me</strong>: (long silence, eyes wet, throat tight)… I don’t know, Doc. I really don’t know.</p><p><strong>Therapist</strong>: Be honest, say it as you think it.</p><p><strong>Me</strong>: (voice cracks) I think I can, or at least I think I want to. And maybe that’s the start…because Jesus accepted me, with all my contradictions and imperfections. If he can look at me and call me His own, maybe… maybe I can look at another broken person and not see just their brokenness. But it’s hard. Loving people who don’t deserve it feels like walking on glass barefoot. Every instinct screams against it. And yet, maybe this is what grace asks of me. To lean in when I want to recoil. To choose mercy when my bones ache for judgment.</p><p><strong>Therapist</strong>: That sounds like the beginning of transformation, not the end of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*wPy4cKKH8grGcdxI3ByaQg@2x.jpeg" /><figcaption>Napoleon and a mother’s plea</figcaption></figure><h3>Arc 6: Breathing Between the Two (The Becoming)</h3><p>(Silence in the room. Just breathing. No rush.)</p><p><strong>Me</strong>: (wiping my eyes, half-laughing) You know, Doc, it’s funny. I ache for justice, but I believe in grace. And somehow both live inside me like two warring states, like the Sengoku Jidai era in Japanese history.</p><p><strong>Therapist</strong>: And maybe they don’t have to cancel each other out. Maybe the tension itself is holy.</p><p><strong>Me</strong>: (nods slowly) Maybe. Because justice cries out for what’s right, and grace whispers about what’s possible. And I — I’m just here, caught between the two, trying not to drown.</p><p><strong>Me</strong>: (softly) I believe in grace. And I ache for justice. And maybe my faith is learning to breathe between the two.</p><p><strong>Therapist</strong>: Breathe between them? That’s a striking way to put it.</p><p><strong>Me</strong>: Yeah… because sometimes they feel like opposite winds. Justice pulling one way, mercy the other. And if I fight them, I tear myself apart. But if I learn to breathe between them… maybe that’s where faith lives. In the tension. In the contradiction.</p><p>(<em>leans back, eyes distant, words turning almost poetic now</em>)<br>Grace without justice feels like chaos. Justice without grace feels like cruelty. But maybe the gospel has always been both cross and resurrection, blood and mercy, law and love.</p><p>And I think… maybe that’s my calling too. To stand in that unbearable space. To ache with justice, to bleed with grace, to breathe between the two.</p><p>(voice firmer, almost a vow)</p><p>Because if love really is the greatest, greater than my anger, greater than my grief, greater than my sense of fairness, then I want it to shape me. Even when it breaks me. Even when it makes no sense.</p><p><strong>Therapist</strong>: (nodding slowly) Then you’re already becoming.</p><p><strong>Me</strong>: (a small smile, weary but resolute) Maybe. Maybe I am. By God’s grace… I will be better. Thank you, Doc.</p><p><strong>Therapist</strong>: That’s enough for today. Let’s stop here, not because you’ve reached the end, but because becoming doesn’t happen in one sitting.</p><p><strong>Me</strong>: (nodding, softer now) I know. Thank you.</p><p><strong>Therapist</strong>: Same time next week?</p><p><strong>Me</strong>: (laughs) As how? Tell you this, if you lower your rate, I’ll come every day even. 😂</p><p><strong>Therapist</strong>: (chuckling) Hehe, Au revoir, Israel.</p><p><strong>Me</strong>: Au revoir, Doc.<br>(smiling as I leave) Between judgment and mercy, I’m still becoming.</p><blockquote>In the end, maybe that is all faith asks of us, not to have perfect judgment, but to keep choosing mercy, and in the choosing, to keep becoming.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24929a049391" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Therapy Session: Wrestling with Grace and Judgement! [Part 1]]]></title>
            <link>https://oreoluwaisrael.medium.com/therapy-session-wrestling-with-grace-and-judgement-6fa282b86d17?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fa282b86d17</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[christianity]]></category>
            <category><![CDATA[true-crime]]></category>
            <category><![CDATA[therapy]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Thu, 11 Sep 2025 10:45:24 GMT</pubDate>
            <atom:updated>2025-10-06T14:03:42.115Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*XlJx_xc0Tr8O9By0CpbgKQ@2x.jpeg" /><figcaption>i&gt;&gt;</figcaption></figure><blockquote>“There is a tension in the Bible between justice and mercy… but mercy trumps justice every time.”</blockquote><blockquote>– Paul Kalanithi</blockquote><p>Every day, good, innocent people are taken away from their loved ones by people I can only describe as the worst things to ever exist. In Micah 6:8, the Bible tells us to: “to act justly and to love mercy and to walk humbly with God.” That tension, that unequal pull between judgment’s demands and mercy’s call, is what I carried into this therapy session…</p><h3>Arc 1: The Laughing Mask (Opening the Session)</h3><p><strong>Therapist</strong>: Hi Israel, what’s up? Haven’t seen you in a minute, I love that you’re here, I’m sure we’ll have a lot to discuss…So tell me, what’s on your mind?</p><p><strong>Me</strong>: On my mind? I don’t even know. I can’t exactly place my finger on it. I feel a lot of things. I feel rage. I feel sadness. I feel maybe even depression. And I feel guilt for feeling or for thinking about the things I’m thinking about. I feel emptiness because I don’t even know…</p><p><strong>Therapist</strong>: Why do you think you feel all of these things?</p><p><strong>Me</strong>: (half laughing) I don’t know. Sorry, I like to laugh when I’m going through things. It’s my default response to chaos. I laugh.</p><p><strong>Therapist</strong>: That’s okay. We all endure grief and pain in different ways.</p><p><strong>Me</strong>: Yeah, I guess so. That makes sense. I’ll just say that next time someone asks me why I’m laughing when something tragic happens.</p><p><strong>Therapist</strong>: Slow down, maybe don’t laugh in the middle of a funeral. But let’s not drift away. Tell me what’s bothering you.</p><p><strong>Me</strong>: Okay. You know the song <a href="https://open.spotify.com/track/4cB6amZ81ycrtmCSGIhl2N?si=BZjZFhZhQOqpj7-xba6VGg">Jugular Jugular</a>, it’s by Lawrence Oyor and Greatman Takit. It’s a gospel song about taking the fight to the enemy. Breaking the jugular. Crushing the devil’s head, that kind of thing. You know the verse that says, “From the days of John the Baptist until now, the kingdom of God suffers violence, and the violent take it by force”? Based on that, we’re allowed to be spiritually violent. The Bible also says we wrestle not against flesh and blood but against principalities, powers, rulers in high places.</p><p>And I believe that. I believe in being spiritually rugged. But lately I’ve been thinking about violence in another way, <strong>flesh and blood</strong>.</p><h3>Arc 2: Violence in the Flesh (The Trigger Event)</h3><p><strong>Therapist</strong>: Go on.</p><p><strong>Me</strong>: 22 Aug, 2025: Irina Zarutska was attacked and killed on the Light rail in North Carolina.</p><p>27 Aug, 2025: Two children(aged 8 and 10) killed when Minneapolis school attacker, obsessed with the idea of killing children, fires into a US Catholic school.</p><p>10 Sep, 2025: Charlie Kirk is assassinated at the Utah Campus event.</p><p>You know, when I saw the video of the events of Irina’s murder on the train, it was about 4 minutes after she walked in; there was no interaction prior between them, no words, no quarrel, nothing. Suddenly, he pulls out a pocket knife and stabs her multiple times, and then he just walks away.</p><p>And I saw her face, the fear, the shock, the look of someone realising their life was leaving their body. She was clinging to life, bleeding everywhere. And he just walked away.</p><p>How can you do that to a human being? How can you harm someone who has done nothing to you? How?</p><p><strong>Therapist</strong>: That’s an unfortunate story. A traumatic one. How did it make you feel?</p><p><strong>Me</strong>: How the hell is it supposed to make me feel? It makes my skin crawl and my blood boil. I want to pass judgment and send him to hell right at that instant; how can you even do that to a person, another human being...? (deep sigh followed by a pause for a while.)</p><h3>Arc 3: Judgement passed!</h3><p><strong>Me: </strong>But here’s the contradiction: I believe in redemption, I genuinely believe that even a serial killer who murders for the feeling of ecstasy he gets from hearing the sound of bones cracking, or one who delights in seeing blood splattered, or one who loves to hear his victim scream, could be saved by Christ and become a global evangelist, winning millions of souls for Christ. I believe that.</p><p>But I also believe you don’t get to take innocent lives, reduce them to statistics, and later parade that evil as your testimony, talk about: “I killed many, but now I’m saved.” Meanwhile, their names are erased into numbers. What if they weren’t even saved when he killed them? Did he rob them of eternity while he got to repent and preach? I wrestle with that. I love what Jesus did on the cross, I really do, and a lifetime of gratitude isn’t enough for me to express how much I appreciate it, but I am human. And while there probably is a potential future version of that person that goes on to be the Global Evangelist and do a lot of good deeds, the version of the monster that committed those acts, the you in that moment, that’s the version I want punished. <strong>At this particular moment, right here, right now? I don’t care. You deserve to go.</strong></p><h3>To Be Continued…</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fa282b86d17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Students ≠ You: Why Grades Shouldn’t Own Your Identity.]]></title>
            <link>https://oreoluwaisrael.medium.com/students-you-why-grades-shouldnt-own-your-identity-37a9f4a87d9d?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/37a9f4a87d9d</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[depression]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Wed, 13 Aug 2025 23:00:58 GMT</pubDate>
            <atom:updated>2025-08-13T23:27:14.294Z</atom:updated>
            <content:encoded><![CDATA[<h3>Students ≠ You: Why Grades Shouldn’t Own Your Identity</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*-NMXkBE4Usw7F2y6NdCYzQ@2x.jpeg" /></figure><blockquote>“Cogito, ergo sum.”</blockquote><blockquote>“I think, therefore I am.”</blockquote><p>For weeks now, a particular statement has been ringing in my head:</p><p><strong><em>“The activities of a biological agency are inextricable from itself.”</em></strong></p><p>In other words, you can’t fully separate a living being from the things it does. Our habits, thoughts, and patterns of life feed back into who we become. And so if all your daily actions revolve around being a student, over time, that role stops being what you do and becomes who you are.</p><p>There’s a silent trap many of us fall into without even realizing it: we let being a student become our entire identity. We create an almost atomic way of viewing life, as though God created us to be agencies that cannot execute multithreaded operations.</p><p>We start thinking in absolutes:</p><blockquote>“I can’t start a business because I’m a student.”</blockquote><blockquote>“I can’t be in a relationship right now because I’m a student.”</blockquote><blockquote>“I can’t grow closer to God right now, I’ll do that when I’m done with school.”</blockquote><p>It’s as if the title “student” becomes a prison sentence, and every other part of life is on hold until it’s over. For a tiny percentage of people, maybe this works, they excel academically and emerge with good grades and few regrets. But for most of us, this narrow way of living is risky.</p><p>Here’s why: when “student” is your whole identity, you create a <strong>single-point failure system</strong> for your self-worth. A bad grade stops being just a bad grade, it becomes a verdict on you, it affects your entire being</p><p>If there’s a school strike, a delayed semester, or an unexpected life event that turns a 4-year program into 6 or 8, your whole life ends up frozen. And because all your fulfilment and dopamine come from one place which is your grades, you risk an emotional collapse if that one pillar shakes.</p><p>I have a theory; I believe that students who make their entire identity about studenthood and rely exclusively on grades for fulfilment, validation, and self-worth are at a significantly higher risk of emotional collapse and possibly suicidal ideation when their grades drop, especially if they lack alternative sources of meaning, coping skills, or support networks.</p><p>Now, I agree <strong>Correlation != Causation</strong>, but my theory is based on the premise that all other factors such as existing emotional support systems and other sources of meaning remain constant.</p><p>Think of it this way;</p><p>In calculus, the (Epsilon-Delta) <strong>ε – δ definition</strong> of a limit is a way to describe how close we can get to a desired value before we say “this is close enough.”</p><p>If you think of <strong>ε</strong> as your “identity stability margin” and <strong>δ</strong> as the size of a grade disappointment, then as long as <strong>δ</strong> is small enough, you stay within that stability margin. You feel the hit, but you bounce back.</p><p>The danger comes when disappointments keep stacking or when one <strong>δ</strong> is so large it blasts past your <strong>ε</strong>. That’s the breaking point, where the hit to your academic self-esteem starts spilling over into your entire sense of self.</p><p>Or if you want, you could think of it like a stress – strain curve in engineering (examine the graphs below) in the <strong>elastic region</strong>, you can take hits and bounce back. But without extra sources of meaning, every disappointment eats into your resilience until you hit the <strong>yield point</strong>, where the cracks in self-esteem don’t fully heal. Push further into the <strong>plastic region</strong>, and recovery gets harder each time until one more blow becomes the fracture point. Without other supports in place, even resilient people can eventually break.</p><p>The second graph shows that Intervention without solving the underlying issue would only delay the inevitable.🥲</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*mzEFkUWjhesWe6ynNyT3bg@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*ItZTlk7ot4WEJwnjsBklVA@2x.jpeg" /></figure><h3>The Turning Point: My Econometrics Story</h3><p>Last semester, I took Econometrics, and in the buildup to the exam I made sure I didn’t just study it, I immersed myself in it. I understood model building, error minimization, outlier detection, and how to get the “goodness of fit” as close to 1 as possible. I could explain how data scientists think. I could connect it to real-world applications in ways the course outline never hinted at.</p><p>In my head, I thought, “<em>Yup</em>, th<em>is is the one. I’ve nailed it. Pray for the lecturer…”</em></p><p>Then the grades came out… and I wasn’t proud of mine.</p><p>It hurt bro.</p><p>It hurt ‘cause I knew I had put in the work, not just surface-level cramming, but a thorough understanding. And for courses like that, where I know my effort was genuine, where I know I studied and enjoyed the process of studying, the sting is sharper.</p><p>Then I had a conversation that shifted everything.</p><p>My friends, X and Wonder reminded me:</p><p>“Nobody can take knowledge away from you. Grades are just someone’s limited measurement of what they think you know. They don’t see the full picture.”</p><p>Not in those exact words but you get the gist…😂</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/169/1*gaADiGpWG3IZijakYqYPXg@2x.jpeg" /></figure><p>It hit me. The lecturer only saw what fit onto the exam paper. He had no idea how many models I now understood, how many people I’d explained these concepts to, or how the knowledge had already changed the way I think. As a matter of fact, my friend and I built a Machine Learning driven Wallet Profiling Tool (<a href="https://github.com/Haritz07/the_haritz-ml-tool/tree/main/Knight/WalletWatch_HAR_ITZ">https://github.com/Haritz07/the_haritz-ml-tool/tree/main/Knight/WalletWatch_HAR_ITZ</a>)That<em>’s when I r</em>ealized: Grades are important, especially while we’re all still in this shit-hole, but they are only a signal. Like a flag raised when an overflow error triggers in Assembly, they warn you about a specific process, they don’t define the entire program. And in the same way, grades may say something about one moment in your academic life, but they are not your whole identity.</p><p>So here’s how I began approaching studying for exams…</p><h3>The Knowledge-First Mindset</h3><p>From that moment, I decided my approach to any course would be:</p><ul><li>Learn as deeply and meaningfully as possible.</li><li>Apply the knowledge in real ways, even outside the classroom.</li><li>Do my absolute best in the exams.</li><li>Accept the grade as feedback, not a verdict on who I am.</li></ul><p>This mindset doesn’t make you immune to disappointment. Bad grades still sting, because as long as you wear the “student” hat, omo results go touch you. But now, they don’t define you.</p><blockquote>It’s also not foolproof either cause some courses are sent from hell and should just be read once and forgotten about but I’m sure you’d be able to find the best way to navigate those :)</blockquote><p>When you approach school this way, the “cycle” of hard work → bad grade → identity crisis starts to weaken. You stop being hostage to a number printed on a results sheet. And more importantly, you start building other pillars of identity, relationships, skills, faith, creative outlets that make you far more resilient when academic strain piles up.</p><blockquote>Remember, true Intelligence which is the Creative ability to give expression to meaning, can not be computed nor linearized, not now, not ever.</blockquote><h3>Why This Matters</h3><p>Well one day, school will end, either on schedule or after delays you couldn’t control. And when it does, you don’t want to step into the world with nothing but grades. You want skills, relationships, a strong relationship with God, a sense of self, you know those things that no strike, no exam, and no grade can take away.</p><p><strong>You are a person who happens to be a student.</strong></p><p><strong>Not a student who happens to be a person.</strong></p><p><strong>Your worth is bigger than your transcript.</strong></p><p><strong>Your life is bigger than your course outline.</strong></p><p><strong>And your identity is bigger than any role you’ll ever play.</strong></p><p>The bottom line: extract your identity away from being just a student. If you spread your roots into more than one field of fulfilment, academic storms may bend you, but they sure won’t break you.</p><p>Your existence and worth are rooted in your ability to think, learn, and create, not in someone else’s numeric measurement of you.</p><h3>RIP JB!</h3><h3>You deserve every tear shed and I hope it gets better for evryone…</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37a9f4a87d9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Development of an ML-driven Wallet Intelligence & Profiling system to identify Cryptocurrency Token…]]></title>
            <link>https://oreoluwaisrael.medium.com/development-of-an-ml-driven-wallet-intelligence-profiling-system-to-identify-cryptocurrency-token-b8bf0e44b0dd?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8bf0e44b0dd</guid>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Sat, 17 May 2025 03:44:42 GMT</pubDate>
            <atom:updated>2025-05-17T03:44:42.086Z</atom:updated>
            <content:encoded><![CDATA[<h3>Development of an ML-driven Wallet Intelligence &amp; Profiling system to identify Cryptocurrency Token Scams on the Solana Blockchain.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*5n9dyMo90gJMrcuVP36l7A.jpeg" /><figcaption>not again.</figcaption></figure><blockquote>“Fool me once, shame on you; fool me twice, shame on me…”</blockquote><blockquote><em>Anthony Weldon in 1651 in his book titled The Court and Character of King James.</em></blockquote><p>In the age of today’s fast-paced globalised market scenario, headlines — geopolitics to market meltdown — sow seeds of doubt around our economic existence. With traditional markets being pinched, investors turned in record numbers to digital assets, and the world of cryptocurrency teeters on the edge. Fee-less, lightning-fast alternatives such as Solana open their doors to dreamers and scammers attempting to short them.<br>Amidst meme tokens and scams, it is imperative to spot high-risk projects before investing.<br>I’m developing an AI-based wallet intelligence platform that tracks on-chain analysis and returns wallet risk scores. The machine learning and blockchain trend-based tool helps investors identify red flags such as anomalies in abnormal token movement or wallet behaviour.<br>This is my risk indicator design, data collection, and light-weight back-end non-interactive dashboard in Python and Streamlit. I’ll talk about why this tool was needed today and how being data-driven allows the crypto investor to better ride volatility.</p><h3>Market Context and Risk Environment</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*reIjIan7E90GTb-p1XmAOQ.png" /><figcaption>fluctuating market</figcaption></figure><p>In today’s volatile global economic landscape, financial markets experience frequent shifts that drive rapid, sometimes speculative, investment behaviours. Amid increased economic uncertainty — marked by regulatory fluctuations and market volatility — investors often seek opportunities that promise high returns, sometimes at the expense of proper due diligence. This environment can lead to a surge in token scams where malicious developers exploit investor desperation.</p><p>Within the cryptocurrency space, especially on fast-throughput chains such as Solana, such dangers appear as token issuance schemes and scams. Strong, fact-driven risk evaluation tools are imperative; such tools can guide investors through risky markets with the inclusion of clear-cut, real-time feedback regarding wallet activity and the legitimacy of tokens.</p><h4>The Landscape of Cryptocurrency Scams on the Solana Blockchain</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f7xiTRfCFH-KQXdzgAZCFg.jpeg" /><figcaption><a href="https://www.altcoinbuzz.io/cryptocurrency-news/solana-user-activity-plummets-as-memecoin-scams-erode-trust/">https://www.altcoinbuzz.io/cryptocurrency-news/solana-user-activity-plummets-as-memecoin-scams-erode-trust/</a></figcaption></figure><p>Solana blockchain has soon attained an exclusive ranking among blockchains in the cryptocurrency space with a wide range of projects and consumers because of its technical capabilities, such as High throughput and Low transaction costs. But alongside being a successful network, the network is now turning into a hotspot for illegal activity as well, with a surge in cryptocurrency token scams intended to deceive users and steal money. Among the most striking of such weaknesses are rug pulls, as mentioned earlier above, where developers pilfer invested capital; pump-and-dump schemes, which involve artificial inflation followed by sudden collapse; and honeypot contracts, trapping investors’ capital in seemingly genuine tokens. An intimate understanding of such frauds and wallet behaviour patterns contributes to protecting investors and ensuring network integrity of the Solana protocol. Low cost and high volume of transactions of Solana, although best suited to real effort, also make financial risk usage cheaper and increase attempt frequency of mimicry on more expensive operation blockchains. For example, Solana was an in-demand blockchain for issuing meme coins in early 2025. In addition, Solana’s association with high-risk assets that have high returns, which are mostly meme coins, attracts investors who engage in speculative trading and are therefore most susceptible to scams that provide enormous returns. This creates a scam culture in which fraud is rampant because everyone dreams of getting rich quickly.</p><h3><strong>Understanding the Spectrum of Cryptocurrency Token Scams</strong></h3><h4><strong>Rug Pulls Deconstructed</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ran1L6vrXrDCR4q4_xA_kQ.jpeg" /><figcaption><a href="https://hacken.io/discover/rug-pull-explained/">https://hacken.io/discover/rug-pull-explained/</a></figcaption></figure><p>A rug pull is one of the crypto scams where the developers of a project lure investors, typically with high returns or new tech, and then leave the project, taking all the invested funds with them.<br>The result of this is that investors lose everything because the project is now valueless. Scammers will generally sell their tokens to receive a high level of investment. The mechanics of a rug pull are varied but are generally in two camps: injecting malicious code into the token smart contract or bulk marketing the token and then running off with the investments. Common schemes are making tokens with code that makes it impossible for investors to sell, so the developers can mint an unlimited amount of new tokens or allow them to suck all the liquidity out of decentralized exchange (DEX) pools. Rug pulls have been divided into hard and soft.<br>A hard rug pull is a direct and complete removal of liquidity by the developers, leading to an instant and complete loss of token value. A soft rug pull is not so apparent, though, since it is a subtle process where the developers siphon funds incrementally over time, maintaining the facade of an active project before finally abandoning it. There have been several high-profile rug pulls within the crypto space, including OneCoin, a Ponzi scheme that defrauded investors of billions; Squid Game Token, whose value climbed high before sale was suspended by creators and liquidity was taken away; and Thodex, a Turkish crypto exchange that froze trading and disappeared with over $2 billion in investor capital. Rug pulls are well-planned, but warning signals that could serve to tell them apart include some being anonymous development teams, over-promise high returns, no security audits, exchange platform liquidity weakness, excessive marketing and overhyping, unusual tokenomics, and cryptic whitepaper, objective and roadmap. If a project suddenly emerges out of thin air with no development history in advance, this can also be a problem. Rug-pull tactics have developed from simple liquidity drains to sophisticated mechanisms such as the ones described above, reflecting greater demand for investors to remain more vigilant to different lines of attack.<br>Spammers become familiar with ways to evade detection and therefore need a greater awareness of potential tactics. DEXS are some of the most well-known platforms for rug pulls because they are permissionless, and it is easy to list scam tokens without strict vetting processes. This is a balance between decentralisation and investor protection. There is a thread that connects warning signs and red flags, which suggests that scammers tend to employ similar techniques in most types of scams — The hype created and the sense of urgency created around the project to attract investors.</p><h4><strong>Pump-and-Dump Schemes: Spotting the Stages and Characteristics in the Context of Solana</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r8hHtaRC5Wc3sx0jJGruPA.jpeg" /></figure><p>A pump-and-dump scheme is a form of market manipulation where a group of individuals or a single actor artificially inflate the price of an asset, typically a low-value cryptocurrency with low liquidity, through misleading or exaggerated claims and coordinated buying activity. Once the price has been sufficiently “pumped”, the orchestrators sell off their holdings at a profit, leading to a price dump or crash, leaving later investors with significant losses. These schemes often leverage social media platforms and influencers to spread hype and lure in unsuspecting investors, playing on their fear of missing out (FOMO).</p><p>Pump-and-dump schemes typically play out in four phases: pre-launch (hyping up through allowlists or pre-sales), launch (aggressive promoting to attract investors), pump (price manipulation through coordinated buying), and dump (orchestrators sell, price collapse). Pump-and-dump schemes amount to price manipulation by any party or actor, while rug pulls are conducted by token developers who abscond with liquidity. Interestingly, a pump-and-dump can end up as a rug pull when the token developers are manipulators, too.</p><p>Red flags involve sudden price pumping, illogical promises of profits, low-cap coins backed by unknown participants, and erupting volume with no news. They are unacceptable in orthodox finance, and crypto law is catching up on how to avert them. They lead to astronomical losses among investors as well as to injury to market integrity.</p><p>The Solana blockchain is mostly vulnerable to pump-and-dump attacks, mainly due to the ease of creating and promoting new coins, mostly meme coins, via social media outlets. Efficient transaction costs and fast processing enable the rapid creation and exchange of hypothetical coins. Large buying collectively and misleading misinformation are commonly used by scam artists to manipulate sentiment and bring about FOMO. These programs are temporary, and there are quick reversals in prices that largely accrue to the planner and the pioneers, and hence, early warning and timely action are necessary so that losses are prevented.</p><h4><strong>Honeypot Scams: Fake Promises and Deception on Solana</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qinuoK5Brl779TpKaPGhMw.png" /><figcaption><a href="https://immunebytes.com/blog/honeypot-scams/">https://immunebytes.com/blog/honeypot-scams/</a></figcaption></figure><p>A crypto honeypot scam promises users false claims, like high returns or exclusive tokens, but has malicious code in the smart contract that limits selling or withdrawing their funds. The investor can buy the token, but as soon as he tries to sell it, the contract declines or asks absurdly high withdrawal fees. On Solana, honeypots exploit new features like precompiled binaries. Spammers can deploy contracts that:</p><ol><li>Lock funds, making transfers impossible</li></ol><p>2. Hide restrictive logic in obfuscated code</p><p>3. Use fake transactions to pretend legitimacy</p><p>4. Deploy time-based withdrawal locks or meaningless state checks</p><p>A common Solana-type honeypot is when scammers impersonate beginners on social media. They leave wallet private keys, tricking victims into “helping” send unfamiliar tokens. The victims must fund SOL for gas first to send any token, though, but the SOL is instantly drained by automated scripts as soon as it is deposited.<br>Red flags to technically watch out for:</p><p>Token contracts with custom transfer functionality or modified approval logic</p><p>Centralised ownership (i.e., &gt;80% supply in one wallet)</p><p>Contract-level require statements preventing sales under certain conditions</p><p>Hardcoded extreme slippage or sell taxes in the DEX interface</p><p>Asking for your seed phrase or recovery key — always a scam</p><p>They are:</p><ul><li><a href="https://cryptobriefing.com/how-bsc-project-used-netflixs-squid-game-scam-investors/">Squid Game token (on BSC), which prevented selling through a smart contract trap</a></li><li><a href="https://www.binance.com/en-NG/square/post/7471553249466">BONKKILLER</a> and <a href="https://solsniffer.com/scanner/HDdBA7kHSMpSyCJMcr3CWh7a6HU5cgVUpKADKWG71j8w">Xiaopang on Solana, which prevented transfers through internal conditions</a></li><li><a href="https://cointelegraph.com/news/dechat-honeypot-scam-token">Dechat incident, where a honeypot link was sent by mistake</a></li><li><a href="https://medium.com/@cryptosafetyfirst/crypto-sweeper-bots-hacks-and-scams-you-need-to-know-3963499b85ed">Sweeper robots, which automatically sweep wallets linked to honeypots and empty deposits</a></li></ul><p>Each of these tricks is usually indistinguishable from legitimate tricks, and technical fraud is difficult to detect without tooling or code review. On Solana, there is the added complexity of fast, cheap transactions and binary deployments, giving even more room for scammers to set up sophisticated traps. Platform experience and wallet hygiene are thus paramount — never engage with unfamiliar contracts, and never expose your keys.</p><h3>Model Building Process</h3><figure><img alt="https://www.projectpro.io/article/machine-learning-model-deployment/872" src="https://cdn-images-1.medium.com/max/925/1*yco5AZrfcPZS_MJob8DEPg.avif" /><figcaption><a href="https://www.projectpro.io/article/machine-learning-model-deployment/872">https://www.projectpro.io/article/machine-learning-model-deployment/872</a></figcaption></figure><p>Understanding these scams at a narrative and technical level is critical, but we needed to find a way to move from mere anecdotal patterns in order to be able to fight them at scale. For this solution, that meant turning raw on-chain data into structured intelligence. By measuring risky behaviour and patterns across firstly what was a small sample size of wallets, we could train a machine learning model that could classify wallets based on risk.<br>This is where the data work began.</p><h4>Data Collection &amp; Exploratory Data Analysis (EDA)</h4><p>We pulled on-chain behaviour through the Helius API, pulling all Solana transaction history across each wallet. In exact terms, we pulled:</p><ul><li>Native &amp; token transfers (volumes &amp; mints)</li><li>Minting behaviour (when &amp; how many tokens an address minted)</li><li>Interaction timestamps (to calculate active periods)</li><li>Identified suspicious wallet interactions (to round out our early-warning flags)</li></ul><p>We imported into a pandas DataFrame, string timestamps datetime’ed, cleaned up any nulls (zero-filled or skipped over incomplete rows) and conducted some simple exploratory tests — transaction number distribution tests, token balance distribution tests, and mint-time distribution tests. The cleaned-up sample data set formed the foundation for feature engineering.</p><h4>Feature Engineering &amp; Risk Indicators</h4><p>Every wallet was reduced to a fixed vector of nine behavioural features:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*bv3d8yPSEoT3eEBqGtkWVQ.jpeg" /><figcaption>medium needs to give us tables.</figcaption></figure><p>All time deltas and ratios were rounded, and any resulting NaN or infinite values were sanitised to 0. We then scaled features to comparable ranges for modelling.</p><h4>Model Training &amp; Evaluation</h4><p>We trained an <strong>XGBoost classifier</strong> to predict risky vs safe wallets:<br>1. <strong>Labels</strong><br>The plan was to have a 0–5 “risk-score” classification, but that was later collapsed into a binary label such that:</p><ul><li><strong>High risk (1)</strong> if composite score ≥ 3</li><li><strong>Low risk (0)</strong> otherwise</li></ul><p>2. <strong>Training split<br></strong>80% train, 20% test (stratified to preserve class balance)</p><p>3. <strong>Hyperparameters</strong></p><ul><li>objective=&quot;binary:logistic&quot;</li><li>eval_metric=&quot;logloss&quot;</li><li>max_depth=4, learning_rate=0.1, n_estimators=100</li></ul><p>On held-out data, the model achieved:</p><p>An accuracy of ~ 92%, F1 Score of 0.91, Precision of 0.89, and Recall of 0.93. A confusion matrix ([[TN, FP], [FN, TP]]) showed clear separation between safe and risky wallets, with few false positives or false negatives.</p><p>With all of these components put in place, the FastAPI service loads the trained model via jotlib , exposes a /predict-wallet-risk POST endpoint, and on each request, fresh Helius data is fetched, the nine features are computed in real time, and returns the wallet’s risk label and confidence(risk_level). And lastly, the Streamlit dashboard then visualises these results, giving investors an immediate, data-driven snapshot of any Solana address…or at least that was the initial plan.</p><h3>Streamlit Dashboard &amp; Demo</h3><p>To bring the system to life, we built a simple, clean Streamlit dashboard where users can input a Solana wallet address and view the corresponding risk classification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QaUnsTWLpNJFdE3UuQJA-g.png" /><figcaption>dashboard-ui</figcaption></figure><p>When a user submits a wallet:</p><p>• The dashboard checks if the address is in our databaseIf so, it fetches the precomputed behaviour features <br>• Our FastAPI backend loads our trained XGBoost model and returns: Risk label (0 = safe, 1 = risky) Model confidence score, and</p><p>• The entire feature vector used in the prediction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R3oDe0FCseEWCet5klgiLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J89fOouTtLvFeoFN_Hf3oA.png" /><figcaption>dashboard-flow</figcaption></figure><ul><li>The dashboard displays: <br>A Status badge to indicate one of Safe, Medium or High Risk for each wallet address inputted.<br>The percentage confidence score to display Risk Level associated with said wallet,</li><li>A feature summary table with values like inflow_outflow_ratio, transactions_per_day, and whether or not early_pump_and_dump_flag was activated.</li></ul><p>Check out a <a href="https://www.loom.com/share/a227664ee3864971a4c9cc5878182a8b?sid=da667e9f-b559-48d5-b8d7-58a986625546">demo video s</a>howing the system in action, walking through a real wallet address known for being malicious.</p><h4>Shortcomings and Limitations</h4><p>My work as a Blockchain security researcher has exposed me to the cruelty of malicious actors in the industry, and so this project was really important and one that I held so dear. Which is why it hurts that, at present, only existing wallets that are already in our database are currently handled by the system. New address searches can’t be executed in real-time yet because there is very little time for dynamic ingestion and feature calculation additions. Though it limits complete usage, the implementation still demonstrates the essence of real-time wallet risk scoring.</p><h3>Conclusion &amp; Recommendations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*l98_Y6qVYo8jsbK6dxIQIg.jpeg" /></figure><p><strong>THE_Haritz Dashboard</strong> (the name we came up with, please don’t ask why) provides a simple and intuitive system to allow analysts and investors to easily ascertain the risk status of Solana wallet addresses quickly. By utilising machine learning models with behavioural characteristics, the system will be capable of warning potentially high-risk wallets even before users engage with them, thus avoiding fraud and scam exposure.<br>This product enables industry best practice by:</p><ul><li>Promoting proactive risk assessment instead of reactive response.</li><li>Providing explainable, interpretable features alongside risk scores to build user trust.</li><li>Enabling scalable blockchain address monitoring with minimal human intervention.</li></ul><p>Next Steps:</p><ul><li>Make use of real-time ingestion and dynamic feature derivation for new wallet addresses to boost utility.</li><li>Enhance model accuracy through continuous retraining against updated datasets and evolving scam trends.</li><li>Incorporate warning systems or browser add-ons offering live risk alerts on wallet transactions.</li><li>Make the platform available for contribution by communities to boost feature engineering and the accuracy of labels.</li></ul><p>Individual adoption of each of these features can further empower the ecosystem and make sure that <strong>no one is ever fooled twice.</strong></p><h3>References &amp; Further Reading</h3><p><strong>Real-world incidents:</strong></p><ul><li>The infamous <a href="https://www.halborn.com/blog/post/explained-the-wormhole-hack-february-2022">Wormhole Hack (2022)</a></li><li>Examples of pump-and-dump schemes and phishing scams have been documented in various blockchain security reports.</li></ul><p><strong>Libraries and tools used:</strong></p><ul><li><a href="https://streamlit.io/">Streamlit</a> — for rapid interactive dashboard development</li><li>FastAPI — modern, fast backend API framework</li><li><a href="https://xgboost.readthedocs.io/">XGBoost</a> — high-performance gradient boosting library</li><li>Pandas — data manipulation and analysis</li><li>Altair — declarative statistical visualisation</li></ul><p><strong>Further Reading:</strong></p><ul><li><a href="https://www.sentinelone.com/cybersecurity-101/cybersecurity/blockchain-security/">An Introduction to Blockchain Security</a></li><li><a href="https://stripe.com/resources/more/how-machine-learning-works-for-payment-fraud-detection-and-prevention">Machine Learning Applications in Cryptocurrency Fraud Detection</a></li><li><a href="https://docs.solana.com/">Solana Developer Docs</a></li></ul><h3>Try it out &amp; Contribute</h3><p>Curious to see the wallet risk profiler in action?<br> <strong>Try the live dashboard here:</strong><br> <a href="https://ml-wallet-profiling-7yd6b4ah3bsreunbabzulm.streamlit.app/">https://ml-wallet-profiling-7yd6b4ah3bsreunbabzulm.streamlit.app/</a></p><p>Want to explore the code, contribute, or run your own version?<br> <strong>Check out the repositories:</strong></p><ul><li>Backend &amp; Model: <a href="https://github.com/Haritz07/the_haritz-ml-tool/tree/main/Knight/WalletWatch_HAR_ITZ">the_haritz-ml-tool on GitHub</a></li><li>Dashboard: <a href="https://github.com/Haritz07/ML-Wallet-Profiling/tree/main">ML-Wallet-Profiling on GitHub</a></li></ul><p><strong>Backend API (for developers):</strong><br> <a href="https://the-haritz-ml-tool.onrender.com/">https://the-haritz-ml-tool.onrender.com</a></p><p>Feel free to fork, raise issues, or submit pull requests — all contributions are welcome to make this tool better and more useful for the Solana community!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8bf0e44b0dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Indispensable Role of Web2 Security in Defending the Web3 Environment.]]></title>
            <link>https://oreoluwaisrael.medium.com/the-indispensable-role-of-web2-security-in-defending-the-web3-environment-998880815fd1?source=rss-2bfa48710588------2</link>
            <guid isPermaLink="false">https://medium.com/p/998880815fd1</guid>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Oreoluwa Israel]]></dc:creator>
            <pubDate>Fri, 25 Apr 2025 00:57:33 GMT</pubDate>
            <atom:updated>2025-04-25T00:57:33.134Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong><em>“Program testing can be used to show the presence of bugs, but never to show their absence.”</em></strong><em><br> — Edsger W. Dijkstra</em></blockquote><p>This remark, first noted in Dijkstra’s 1969 “Notes on Structured Programming,” highlights that testing alone cannot prove a system is free of defects, explaining why off-chain services must employ strict input validation beyond mere tests. This is a long read, but please walk with me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_B-EDHnWGsH8MLl_nq5N5g.png" /><figcaption>web2 and web 3 image description</figcaption></figure><p><strong>My thoughts…</strong></p><p>While the decentralised web (Web3) is progressing, utilising blockchain technologies and decentralised applications (dApps), it is vital not to disregard the security standards constructed on the conventional Web2 infrastructure. Most Web3 platforms still possess Web2 components — off-chain APIs, user interface, and backend servers — that leave them open to traditional but sometimes undervalued security vulnerabilities. This piece talks about two of the most critical Web2 security weaknesses — Improper Input Validation on Off-Chain Services and Insecure Direct Object References (IDOR) — and illustrates how their exploitation can undermine the integrity of Web3 platforms. Through real-time attack demonstrations and proposing mitigation, we underscore that the Web3 ecosystem must take Web2 security seriously as a top-class priority.</p><h4><strong>Introduction: When Web3 inherits Web3’s weaknesses</strong></h4><p>The internet itself has undergone a dramatic shift, from the read-only Web 1 to the social and interactive Web 2 and now to the decentralised and user-governed Web 3. Web3 is the next generation of the web — a decentralised, blockchain-powered, and user-governed system. From DeFi applications to NFT marketplaces and DAOS, the Web3 ecosystem is growing rapidly. Web3 applications are to be lauded for their immutability and cryptographic guarantees. However, although the technology is built on decentralisation, trustless transactions, and smart contracts, most Web3 applications heavily rely on Web2 infrastructure such as web servers, REST APIs, off-chain storage, authentication systems, etc.</p><p>This Web2/Web3 hybrid has introduced with it a dangerous complacency. Developers and security experts alike tend to ignore the Web2 elements, thinking that blockchain’s transparency and immutability will suffice. However, as recent history has shown, Web2 weaknesses in Web3 systems can and do lead to catastrophic losses.</p><p>This article emphasises the importance of web2 security principles in the web3 environment. It discusses how web2 vulnerabilities are exploited in web3 attacks, explores two specific web2 vulnerabilities and their solutions<strong> </strong>in a web3 context, and concludes with guidance for the industry on addressing these legacy threats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*UKwznxVsBr_VTBSrER2pGA.jpeg" /><figcaption>a man at his desk.</figcaption></figure><h3><strong>Web2 Vulnerability Trends in Web3</strong></h3><p>One of the biggest security challenges in Web3 is its reliance on centralised components that mirror traditional web infrastructure. While the ethos of decentralisation prevails, many valuable assets and activities depend on centralised entities, such as <a href="https://koinly.io/crypto-glossary/centralized-exchange/">centralised cryptocurrency exchanges (CEXS)</a>. These platforms, as gateways to the crypto universe, manage vast repositories of digital assets, making them attractive targets for attackers. Their security architecture often follows traditional Web2 patterns, rendering them susceptible to familiar attack vectors highlighted in <a href="https://immunefi.com/research/">Immunefi’s annual loss analysis</a>.</p><p>A widespread trend exacerbating this risk is the exploitation of compromised API (Application Programming Interface) keys, a well-known Web2 weakness now weaponised against Web3 platforms. Exchanges and trading services rely heavily on APIs for user interfaces and automated execution, and attackers understand the enormous financial leverage that stolen API keys can provide.</p><p>The <a href="https://www.binance.com/pl/square/post/13730">FTX/3Commas API</a> incident is a textbook example: in late 2022, hackers phished users’ API keys by spoofing the <a href="https://support.3commas.io/en/articles/6839235-response-to-api-key-leak-claims">3Commas trading bot</a> interface. These keys were then used to execute unauthorised trades on FTX accounts, siphoning off millions in cryptocurrency. This breach starkly illustrates how failing to protect API keys — a core Web2 vulnerability — can result in devastating losses in Web3, where APIs grant direct control over valuable assets.</p><p>Further underscoring Web3’s dependence on Web2 infrastructure is the <a href="https://www.bankinfosecurity.com/crypto-hackers-exploit-ronin-network-for-615-million-a-18810">Ronin Bridge hack </a>in March 2022, which saw $625 M stolen. Attackers bypassed smart contract security by compromising the private keys of five of nine validator nodes through sophisticated social engineering — a fake LinkedIn job offer that delivered malware. Detailed post-mortems by <a href="https://www.theblock.co/post/156038/how-a-fake-job-offer-took-down-the-worlds-most-popular-crypto-game">The Block</a> attributed the attack to the Lazarus Group. Despite multi-signature schemes, weaknesses in centralised operations and infrastructure led to one of the largest losses in Web3 history.</p><h3><strong>Deep Dive into Vulnerability 1: Insecure Direct Object References (IDOR).</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Wz0lK2K-BF-atBoNU2Sxw.jpeg" /><figcaption>IDOR!!</figcaption></figure><p><strong>Defining Insecure Direct Object References (IDOR)</strong><br>Insecure Direct Object Reference, or IDOR, is a web application vulnerability when the application permits direct access to the internal implementation objects using user-controlled input without adequate authorisation checks (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). This vulnerability would expose internal object identifiers, such as database primary keys or particular file names, to users so that they may utilise resources specified by such identifiers without ensuring that they possess the right permissions for these precise resources (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</p><p>Malicious parties can manipulate these identifiers within their requests in order to access unauthorised sensitive information or perform operations outside their stated permissions (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>).</p><p>The root cause of IDOR vulnerabilities lies in broken or missing authorisation checks imposed on user requests pointing to objects internal to the system. IDOR is fundamentally an access control issue (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>) at its base. The “insecure direct object reference” is the term used to describe the fact that the web application references internal objects directly by handles (e.g., a user ID, transaction id, or file name) which are likely to be predictable or user-accessible and do not properly verify whether the user is allowed to see the <em>individual object</em> being requested (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>, <a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>).</p><p>For instance, there is a vulnerability of IDOR when a user is allowed to retrieve their transactions via a link e.ghttps://example.com/transactions?id=12345 can modify the id parameter to 12346 and retrieve someone else&#39;s history of transactions (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). The attackers use this vulnerability to bypass intentional access controls by simply changing the value of a parameter directly referencing a resource object (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Such objects can be other users&#39; database records or server filesystem files (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). It&#39;s done this way because the application blindly accepts the identifier supplied by the user and doesn&#39;t perform any server-side check to determine whether the <em>currently authenticated user</em> even has permission to display the requested object, revealing a flaw in authorisation logic.</p><p>Reliance on an identifier being present for authorisation breaks the principle of least privilege and is easier to exploit by an attacker, thereby making it easy for them to use identifiers on resources to which they have no access (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>, <a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>).</p><h4><strong>Direct Object References Employed in Web Applications</strong></h4><p>Web applications often employ identifiers such as database keys, file names, user IDs, or transaction IDs to refer to particular server-side resources (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). These can normally be posted as parameters of the URL query string (such as ?id=123 or ?user_id=456<a href="https://portswigger.net/web-security/access-control/idor">(PortSwigger</a>). Identifiers may also be passed in the body of an HTTP request, especially for POST or PUT requests that involve data being added as payload content (e.g., in JSON or XML) (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>).</p><p>Object references can also be stored in cookies or JSON Web Tokens (JWTs) used for session state or state tracking (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>).</p><p>References can also be literal references to static files served directly off the server file system, where the application reads and returns files from a name or path in the request (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>).</p><p>The use of direct object references across various components of an HTTP request — URL, body, headers, and cookies — highlights the various possible points of entry through which an evil attacker can attempt to exploit (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). That means an adequate defence mechanism for IDOR vulnerabilities must be installed, such that developers must enter proper authorisation checks wherever user-controllable identifiers are being handled to obtain access to the resources (<a href="https://portswigger.net/web-security/access-control/idor">OWASP ASVS</a>). Sharing any such entry point will create a severe IDOR vulnerability.</p><h4><strong>Common Techniques Adopted by Attackers to Discover Potential IDOR Vulnerabilities.</strong></h4><p>There are a few methods employed by attackers to look for potential IDOR vulnerabilities in web applications (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). One of them involves examining URL patterns for parameters that appear to be pointing to objects directly, i.e., id, user_id, order_id, file, or document_id (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). They also inspect HTTP requests and responses, checking for how identifiers appear in GET and POST requests, cookies, and JSON/XML bodies (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>).</p><p>Fuzzing is also on demand, where the attackers systematically modify identifier values — e.g., increment or decrement numerical IDs (e.g., from id=101 to id=102 or id=100), substitute with predictable values (e.g., try user_id=1 or user_id=admin), or exchange IDs for other IDs of known users—to determine whether unauthorised access can be obtained (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>).</p><p>Having multiple accounts, typically of different privilege levels, is another useful technique. These accounts are abused by intruders to check if a lower-privilege user can be provided access to the resources of another user (perhaps higher-privilege) simply by managing identifiers (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). Content discovery is also present, where intruders experiment with diverse application endpoints and functionality, primarily less common or straightforward ones, for looking for fragments where direct object references are used without validation (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>).</p><p>Some application functionality is generally vulnerable to IDOR testing. Attackers, for instance, scan password reset pages, profile update pages, and account setup endpoints for exposed parameters like userID or account_id (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). They can analyse email unsubscribe links that are likely to contain user-specific IDs or scan in-app share links that inadvertently expose object IDs (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). Public profiles using user IDs and profile image URLs are also favourite targets (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). Attackers can, in some instances, leverage tools like the Wayback Machine to examine older versions of an application that might display previously employed (tactically exploitable) identifier patterns (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). Web search engines Google or Bing, can in some instances display publicly exposed identifiers or URL patterns using advanced search operators (dorking) (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>).</p><p>Attackers who target API-exposing applications usually enumerate API endpoints, systematically testing each path and parameter to find unprotected methods that accept object references (<a href="https://owasp.org/API-Security/editions/2023/en/0x11-t10/">OWASP API Security Top 10</a>).</p><p>Such diverse methods show how attackers use passive reconnaissance (traffic, URL monitoring) coupled with active enumeration (fuzzing, endpoint testing) to find IDOR vulnerabilities (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>, <a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). Understanding these discovery techniques is crucial to carrying out effective prevention strategies. By imitating an attacker’s actions, security test engineers and programmers can search for potential IDOR vulnerabilities ahead of time by attacking them, thereby keeping them from testing seemingly straightforward URL parameters and including less apparent places like request bodies, headers, and API endpoints (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>).</p><h4><strong>IDOR Vulnerability Prevention</strong></h4><p>Multiple measures can be put in place to guard against IDOR vulnerabilities, and good authorisation is the cornerstone. Some of such methods are:</p><ul><li><strong>Input Validation and Sanitisation:</strong> While critical to application security in general, input validation and sanitisation have a small direct role in IDOR prevention (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger IDOR Guide</a>). Input validation against expected types (e.g., integer, UUID) and formats and sanitising to remove potentially malicious characters primarily defends against injection attacks (e.g., SQLi or XSS) (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). For IDOR, the primary issue is typically not the <em>shape</em> of the identifier but whether the user is <em>authorised</em> to view the object the identifier refers to (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). Server-side validation is necessary, as client-side validation is too simple to circumvent. Strong validation (e.g., length, format, type checking) is a good practice, but it is not a substitute for authorisation checks. It can check if an ID is a valid integer, but it will not check if the current user can view the resource that corresponds to that integer ID (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>).</li></ul><p>While input validation is a good layer, it is not the primary defence against IDOR.</p><ul><li><strong>Use Strong Authorisation and Access Control:</strong> This is the only way to prevent IDOR (OWASP IDOR, OWASP ASVS, OWASP Access Control Cheat Sheet). It requires implementing strict access control checks at the object level such that users view only resources they are permitted to read or update (OWASP Access Control Cheat Sheet). Such permission checks <em>must</em> be implemented on the server-side <em>each time</em> an object is accessed via a user-supplied identifier (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Relying on the client to request only permitted identifiers is not secure. Access control checks should be enforced uniformly across all processes that inspect user-specific resources. <strong>Role-Based Access Control (RBAC) or Attribute-Based Access Control (ABAC) models</strong> can be used for the management of the privileges, with ABAC typically providing finer-grained control (<a href="https://cheatsheetseries.owasp.org/cheatsheets/Access_Control_Cheat_Sheet.html">OWASP Access Control Cheat Sheet</a>). The request should validate the user’s authorisation to the <em>target object</em> in question against the session context of the current user and allowed access rules (<a href="https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References">OWASP IDOR</a>). Even a straightforward verification of the user ID of a session against an ID in a request (e.g., session.userID == request.getParameter(&quot;userID&quot;)) is insufficient if users are to gain valid access to other people&#39;s resources (e.g., a manager accessing a subordinate&#39;s records) (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). The mechanism of authorisation must effectively handle all relevant access cases based on previously defined policies.</li></ul><p>All such requests concerning an object directly shall be accompanied by a server-side check that the requesting user has the concerned rights for the concerned resource (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</p><ul><li><strong>Make Indirect Object References:</strong> Another good practice is using indirect object references since direct internal identifiers need not always be revealed to the user (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). Instead, use indirect references, which are surrogates (e.g., random UUIDs, hashed IDs, or session-specific temporary tokens) referring to the internal identifiers on the server side (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). The application keeps this mapping, typically in the user’s session data or a secure lookup table (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). Using random, high-entropy identifiers (like cryptographically secure pseudo-random UUIDs or pseudorandom long strings) makes guessing or enumeration attacks invalid against other users’ resource references (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). Secure hash values of the direct identifier can also be a proxy (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>). This abstraction simplifies manipulation a lot (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>). But it is not possible to remember that, even with indirect references, <strong>authorisation checks are still necessary</strong> (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger Labs</a>).</li></ul><p>While UUIDs make incrementing attacks impossible, when a valid indirect reference of some other user somehow ends up in an attacker’s possession (e.g., through information disclosure, logs, or another weakness), the application still must <em>ensure</em> that the current user is allowed to use that particular reference (<a href="https://portswigger.net/web-security/access-control/idor">PortSwigger</a>).</p><ul><li><strong>Secure coding practices</strong> are essential in reducing the risk of IDOR vulnerabilities. Developers should use parameterised queries or ORMs to safely handle database IDs, ensuring identifiers are treated strictly as data (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Type checking should be enforced server-side to confirm identifiers match expected formats, while output encoding must be applied before rendering any user input to prevent issues like Cross-Site Scripting (XSS). Error handling should be secure, with generic messages that don’t reveal sensitive object details (OWASP), <a href="https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References">(OWASP IDOR)</a>. Regular, in-depth code reviews are important to verify that authorisation checks are correctly implemented wherever user input influences access <a href="https://owasp.org/www-project-top-ten/">(OWASP)</a>, (OWASP ASVS). Finally, tools like Static Application Security Testing (SAST) and Dynamic Application Security Testing (DAST) can be employed to detect IDOR patterns, though manual review is still necessary to catch complex logic flaws <a href="https://owasp.org/www-project-top-ten/">(OWASP)</a>, <a href="https://portswigger.net/web-security/access-control/idor">(PortSwigger)</a>. Collectively, these practices help produce robust and secure applications that are less prone to IDOR vulnerabilities (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li></ul><h4><strong>Specific Considerations for Different Application Architectures</strong></h4><p>The prevention of IDOR must be tackled using application architecture-specific controls, while the underlying principle of authorisation remains unaffected (OWASP), (OWASP API Top 10). In legacy web applications (monolithic), developers should focus on safeguarding server-side code (controllers, routes, handlers) that processes incoming requests with identifiers from URLs, form data, or cookies. Authorisation controls must be implemented before accessing data models or services <a href="https://owasp.org/www-project-top-ten/">(</a><a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). For web APIs (RESTful, GraphQL, etc.), strict authorisation checks should be implemented on each API endpoint that accepts object IDs, whatever they are passed through the URL path (/api/users/{userID}), query parameters (/api/orders?orderID=), or request body (JSON/XML payload) (<a href="https://owasp.org/API-Security/editions/2023/en/0x11-t10/">OWASP API Top 10</a>). Extra caution should be used for GraphQL resolvers as they contain the data-fetching logic where authorisation has to be injected (<a href="https://owasp.org/API-Security/editions/2023/en/0x11-t10/">OWASP API Top 10</a>). IDOR, when talking about APIs, is more commonly known as <a href="https://owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization/"><strong>Broken Object Level Authorisation (BOLA)</strong></a> and was ranked the most critical vulnerability among OWASP API Security Top 10 (<a href="https://owasp.org/API-Security/editions/2023/en/0x11-t10/">OWASP API Top 10</a>). In mobile application backends, just like with web APIs, identifiers passed via API calls or deep links must be validated properly on the backend, along with proper authentication checks. In microservices architecture, it’s difficult to implement consistent authorisation across standalone services. Each service dealing with object references must apply sufficient authorisation checks. Techniques include using a central authorisation service, secure identity and permission propagation (e.g., JWT with adequate claims), or enforcing policies at the API gateway <a href="https://owasp.org/www-project-top-ten/">(</a><a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Secure inter-service communication is also essential. Even though implementation details differ across architectures, the same rule applies, which is that each request accessing a resource through an identifier must be passed through an authorisation check to ensure the requesting user has permission to access the specific resource (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>, <a href="https://owasp.org/API-Security/editions/2023/en/0x11-t10/">OWASP API Top 10</a>).</p><h3><strong>Deep Dive into Vulnerability 2: Improper Input Validation on Off-Chain Services.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*uSltnabWLBsOxSOqgbTjgQ.jpeg" /><figcaption>Understanding Improper Input Validation…image gotten off the web from <a href="https://bit.ly/3YOyrxM">https://bit.ly/3YOyrxM</a> 😶</figcaption></figure><h4><strong>Defining Improper Input Validation in the Context of Off-Chain Services</strong></h4><p>Invalid input validation, during processing of off-chain services that operate on behalf of decentralized systems, occurs when an input data is being submitted to a service but fails to check if such input has the correct properties (e.g., valid format, type, length, range, or consistency) so it could be processed safely and correctly <a href="https://cwe.mitre.org/data/definitions/20.html">(CWE/SANS)</a>. This deficiency is as poor as total absence of validation; broken or ineffective validation logic does not safeguard all regions of possible attacks, and can be worse than no validation at all (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Input validation is primarily syntactic validation or semantic validation (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</p><ul><li><strong>Syntactic validation</strong> ensures that input data is in the correct structure or format expected by the application. This includes validating data types (e.g., integer versus string), length restrictions (e.g., maximum string length), character sets allowed, and compliance with some patterns (e.g., complies with a regular expression for an email address) (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li><li><strong>Semantic checking</strong> is more than format to ensure input data is proper in the context of the application’s business rules. Examples include checking that a start date comes before an end date, that a quantity falls within sane values (i.e., not negative), or if a product ID exists in the database (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li></ul><p>Both syntactic and semantic validation are part of a good security stance (OWASP). Syntactic validation is a first-line defence against bad input, while semantic validation makes sure the data is valid in the meaning of the application’s intended functionality (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Skipping either will leave large openings (<a href="https://cwe.mitre.org/data/definitions/20.html">CWE/SANS)</a>.</p><p>Input validation becomes especially important to off-chain services in the Web3 ecosystem due to their typically critical nature. These services may be able to process sensitive data (e.g., signed messages or user private data) or even affect on-chain states or user assets (e.g., relaying txs, oracle data) <a href="https://cwe.mitre.org/data/definitions/20.html">(CWE/SANS</a>). If not verified with proper inputs, these services, once attacked by attackers, may initiate unintended behaviours, data exfiltration, oracle feed tampering, or even on-chain asset tampering. As off-chain services are bridges or intermediaries to on-chain conduct, input validation vulnerabilities in them have catastrophic implications, undermining the integrity and trustworthiness of the overall decentralised system that they serve to guard.</p><h4><strong>Influence of Poor Input Validation on Off-Chain Services</strong></h4><p>Poor input validation is one of the common root causes for an extremely broad category of security vulnerabilities in off-chain services <a href="https://cwe.mitre.org/data/definitions/20.html">(CWE/SANS)</a>:</p><ul><li><strong>Replay Attacks:</strong> Unless inputs such as nonces (temporary numbers) or timestamps employed for anti-replay are checked as new or unique, the attacker can replay already caught valid messages and perform the same action over and over again (e.g., withdraw money over and over, use the same approval over and over) (Ethereum <a href="https://eips.ethereum.org/EIPS/eip-712">EIP-712</a>).</li><li><strong>Data Corruption and Tampering:</strong> Ill input can infect data processed or stored by the off-chain service and lead to the wrong data being used, stored, or being propagated downstream (possibly smart contracts) <a href="https://cwe.mitre.org/data/definitions/20.html">(CWE/SANS)</a>. Failure to validate the fields of the data can introduce unexpected values, resulting in errors or disrupting the system state <a href="https://cwe.mitre.org/data/definitions/20.html">(CWE/SANS)</a>. Data integrity is critical to the dependability of off-chain services and the systems they are built.</li><li><strong>Bypass Authentication and Authorisation:</strong> Poor input validation can undermine access control <a href="https://cwe.mitre.org/data/definitions/20.html">(CWE/SANS)</a>. When input is used to decide user roles, permissions, or resource identifiers, manipulation can provide attackers with access to information or perform actions to which they are not entitled, possibly allowing them to gain higher privileges in the service <a href="https://cwe.mitre.org/data/definitions/20.html">(CWE/SANS</a>, <a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li><li><strong>Denial of Service (DoS):</strong> Malformed input can cause off-chain services to crash, loop indefinitely, take enormous amounts of resources (CPU, memory, bandwidth), or hang, denying service to legitimate users <a href="https://cwe.mitre.org/data/definitions/20.html">(CWE/SANS)</a>. One such vulnerability is Regular Expression Denial of Service (ReDoS), where poorly written regular expressions employed for validation are exploited by crafted input to produce ghastly processing delays (<a href="https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS">OWASP ReDoS</a>).</li><li><strong>Monetary Loss and Damage to Reputation:</strong> For example, in cases like Decentralized Finance (DeFi), when off-chain services could be at risk for monetary activity, oracle price feeds, or management of precious assets, input validation vulnerability could directly result in theft, unbalanced arbitrage, loss of significant sums to users or protocols, and thereby enormous damage to user reputation and the service’s reputation itself.</li></ul><p>All of these implications are demonstrated in Lab 2 below.</p><h4><strong>Best Practices in Evading Inappropriate Input Validation</strong></h4><p>Preventing invalid input involves a well-structured, multi-level approach implemented throughout the entire software development cycle (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). One of the basic recommendations is to <strong>implement an “assume malicious input” approach</strong> (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>): treat all input data from external or not fully trusted sources (users, other services, APIs) as malicious and validate it as early as possible.</p><p>The most important best practices are:</p><ul><li><strong>Perform Server-Side Validation:</strong> All important validation logic <em>must</em> be performed and executed on the server-side (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Client-side validation (e.g., using JavaScript in a browser) is useful for improving user experience by providing instant feedback, but it does not have any real security, as it can be readily bypassed by hackers (<a href="https://portswigger.net/web-security">PortSwigger)</a>.</li><li><strong>Use Allowlisting (Whitelisting) Where Practical:</strong> Define exactly what is valid input (e.g., accepted characters, specific formats, valid range, known good values) and reject anything else that does not exactly match (<a href="https://portswigger.net/web-security">PortSwigger)</a>. This is generally safer than blocklisting (trying to list all bad patterns), which will be incomplete. Use regular expressions with care for pattern matching, making them effective and ReDoS-resistant (<a href="https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS">OWASP ReDoS</a>).</li><li><strong>Syntactically and Semantically Validate:</strong> Initially, verify input conforms to the anticipated structure and data type (syntactic). Subsequently, verify input values are valid from the business rules’ perspective and the application environment (semantic) (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Well-formed and semantically correct data can be achieved by this layer-by-layer validation.</li><li><strong>Sanitise and Encode Data:</strong> Sanitise user input by removing, filtering, or escaping potential malicious characters <em>before</em> storage or processing, especially if it might be passed to commands, queries, or echoed back to users<a href="https://portswigger.net/web-security">(PortSwigger)</a>. Most crucially, correctly encode any data <em>before</em> being output to another environment (e.g., HTML-encode data before displaying in a web page to prevent XSS, parameterise queries to prevent SQL injection) (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li><li><strong>Employ Safe Frameworks and Libraries:</strong> Leverage mature, standardised validation frameworks and libraries made available by your language or platform (<a href="https://portswigger.net/web-security">PortSwigger)</a>. Refrain from constantly reinventing validation logic wherever possible. Upgrade these libraries to close known issues (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li><li><strong>Use Context-Aware Validation:</strong> Validate rules must be context-aware, wherein the data is employed. Use clear requirements (type, length, range, format) per input parameter or field (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li><li><strong>Check Data Consistency:</strong> Implement controls that prevent critical system data or state variables from being tampered with based on valid input (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS)</a>.</li><li><strong>Check Failure Handling:</strong> Reject the input in its entirety on failure of validation. Log the failure event securely (do not log sensitive data) for auditing (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>). Return generic, non-descriptive error messages to the user that do not reveal internal system information (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li><li><strong>Sanitise All Untrusted Sources of Input:</strong> Keep in mind that input is not just from user forms. Sanitise data from external APIs, network requests, cookies, file uploads, configuration files, and even other internal services if they can’t be fully trusted (<a href="https://portswigger.net/web-security">PortSwigger)</a>. Use extra care at language boundaries or system interfaces (<a href="https://owasp.org/www-project-application-security-verification-standard/">OWASP ASVS</a>).</li></ul><h3>Lab Demonstration of Vulnerabilities.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FFGFrzBxX6HrLhZsAGBpgA.jpeg" /><figcaption>A whitehat…?🙄</figcaption></figure><p>The IDOR and Improper input validation on off-chain services labs are available at: <br><a href="https://github.com/Haritz07/Designing-Secure-Laboratories-for-Demonstrating-Web3-Off-Chain-Vulnerabilities">https://github.com/Haritz07/Designing-Secure-Laboratories-for-Demonstrating-Web3-Off-Chain-Vulnerabilities</a></p><h4>Lab 1: IDOR in a Web3 Relayer API.</h4><p>We establish an Express relayer stub with /api/v1/user/:id/txs exposed. npm install &amp;&amp; npm start and curl /user/2/txs as an authenticated user will expose another user’s transactions, showing a lack of access checks.</p><p>By manipulating the user_id parameter in the relayer’s transaction endpoint, this lab demonstrates how missing object-level authorization checks can be exploited to access other users’ transaction histories—replicating the core issue at heart of IDOR flaws</p><p><a href="https://github.com/Haritz07/Designing-Secure-Laboratories-for-Demonstrating-Web3-Off-Chain-Vulnerabilities/tree/main/lab-one">https://github.com/Haritz07/Designing-Secure-Laboratories-for-Demonstrating-Web3-Off-Chain-Vulnerabilities/tree/main/lab-one</a></p><h4>Lab 2: Abusing Inadequate Input Validation in a Signing Service.</h4><p>Begin the signing service with npm start, then POST bad JSON (e.g. negative gas or bad 0x…) to /wallet/alice/sign. The service keeps “signing” such bad inputs, highlighting the need for rigorous schema validation.</p><p>By manipulating the user_id parameter in the relayer’s transaction endpoint, this lab demonstrates how missing object-level authorisation. checks can be exploited to access other users’ transaction histories—replicating the core issue at the heart of IDOR flaws</p><p><a href="https://github.com/Haritz07/Designing-Secure-Laboratories-for-Demonstrating-Web3-Off-Chain-Vulnerabilities/tree/main/lab_two">https://github.com/Haritz07/Designing-Secure-Laboratories-for-Demonstrating-Web3-Off-Chain-Vulnerabilities/tree/main/lab_two</a></p><h3><strong>Conclusion: Bridging the Security Gap — Recommendations for a More Resilient Web3.</strong></h3><p>Web3 cannot ignore the security risks inherited from its Web2 foundations. Vulnerabilities in centralised infrastructure, APIs, and services continue to cause tremendous damage. To render Web3 safe, the industry must adopt an approach that combines the best of both worlds. This involves prioritising comprehensive security scans (front-end, back-end, APIs, and smart contracts), leaning towards stronger authentication, enforcing strict API security hygiene, investing in user education, and continuously adapting to remain ahead of new threats. Only by addressing these inherent Web2 vulnerabilities alongside blockchain security can Web3 build a truly strong and secure future.</p><h3>References</h3><ul><li><strong>Koinly.</strong> (n.d.). <em>What is a Centralised Exchange?</em> Koinly. Gotten from <a href="https://koinly.io/crypto-glossary/centralized-exchange/">https://koinly.io/crypto-glossary/centralized-exchange/</a> <a href="https://koinly.io/crypto-glossary/centralized-exchange/?utm_source=chatgpt.com">Koinly</a></li><li><strong>Immunefi.</strong> (n.d.). <em>Research.</em> Immunefi. Found at <a href="https://immunefi.com/research/">https://immunefi.com/research/</a></li><li><strong>Binance.</strong> (2023). <em>Square: The world’s largest crypto cyber heist — Ronin Bridge hack.</em> Binance Blog. Retrieved from <a href="https://www.binance.com/pl/square/post/13730">https://www.binance.com/pl/square/post/13730</a></li><li><strong>3Commas.</strong> (n.d.). <em>Help Centre.</em> 3Commas. Retrieved from <a href="https://help.3commas.io/en">https://help.3commas.io/en</a></li><li><strong>Information Security Media Group.</strong> (2022). <em>Crypto Hackers Exploit Ronin Network for $615 Million.</em> BankInfoSecurity. Retrieved from <a href="https://www.bankinfosecurity.com/crypto-hackers-exploit-ronin-network-for-615-million-a-18810">https://www.bankinfosecurity.com/crypto-hackers-exploit-ronin-network-for-615-million-a-18810</a></li><li><strong>The Block. (2022). </strong><em>How a fake job offer took down the world’s most popular crypto game.</em> The Block Crypto. Retrieved from <a href="https://www.theblock.co/post/156038/how-a-fake-job-offer-took-down-the-worlds-most-popular-crypto-game">https://www.theblock.co/post/156038/how-a-fake-job-offer-took-down-the-worlds-most-popular-crypto-game</a></li><li><strong>OWASP Foundation (2017). <em>Testing for Insecure Direct Object References (IDOR).</em></strong><em> </em>Part of the OWASP Web Security Testing Guide v4.2.<br> Available at: <a href="https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References/">https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References/</a><br> <em>(Note: the earlier “latest/…” URL returned a 404, so I decided to point to the v4.2 path instead.)</em></li><li><strong>OWASP Foundation. (2017). </strong>OWASP Top 10 — A5: Broken Access Control. Retrieved from <a href="https://owasp.org/www-project-top-ten/2017/">https://owasp.org/www-project-top-ten/2017/</a></li><li><strong>PortSwigger. (n.d.). IDOR — Insecure Direct Object Reference</strong>. Retrieved from <a href="https://portswigger.net/web-security/access-control/idor">https://portswigger.net/web-security/access-control/idor</a></li><li><strong>Imperva. (n.d.). Insecure Direct Object Reference (IDOR)</strong>. Retrieved from <a href="https://www.imperva.com/learn/application-security/insecure-direct-object-reference-idor/">https://www.imperva.com/learn/application-security/insecure-direct-object-reference-idor/</a></li><li><strong>The Hackerish. (2021)</strong>. IDOR Explained — OWASP Top 10 Vulnerabilities. Retrieved from <a href="https://thehackerish.com/idor-explained-owasp-top-10-vulnerabilities/">https://thehackerish.com/idor-explained-owasp-top-10-vulnerabilities/</a></li><li><strong>Varonis. (2021)</strong>. What is IDOR (Insecure Direct Object Reference)? Retrieved from <a href="https://www.varonis.com/blog/what-is-idor-insecure-direct-object-reference">https://www.varonis.com/blog/what-is-idor-insecure-direct-object-reference</a></li><li><strong>OWASP Foundation. (2024)</strong>. Input Validation Cheat Sheet. Retrieved from <a href="https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html">https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html</a></li><li><strong>MITRE/CWE. (2010)</strong>. CWE-20: Improper Input Validation. Retrieved from <a href="https://cwe.mitre.org/data/definitions/20.html">https://cwe.mitre.org/data/definitions/20.html</a></li><li><strong>OWASP Foundation. (2024)</strong>. Application Security Verification Standard (ASVS). Retrieved from <a href="https://owasp.org/www-project-application-security-verification-standard/">https://owasp.org/www-project-application-security-verification-standard/</a></li><li><strong>PortSwigger. (n.d.). Input Validation Testing Workflow</strong>. Retrieved from <a href="https://portswigger.net/burp/documentation/desktop/testing-workflow/input-validation">https://portswigger.net/burp/documentation/desktop/testing-workflow/input-validation</a></li><li><strong>OWASP Community. (n.d.). Regular Expression Denial of Service (ReDoS).</strong> Retrieved from <a href="https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS">https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS</a></li><li><strong>Ethereum. (2019). EIP-712:</strong> Typed Structured Data Hashing and Signing. Retrieved from <a href="https://eips.ethereum.org/EIPS/eip-712">https://eips.ethereum.org/EIPS/eip-712</a></li><li><strong>OWASP Foundation (2023)</strong>. OWASP API Security Top 10. Retrieved from <a href="https://owasp.org/www-project-api-security/">https://owasp.org/www-project-api-security/</a></li><li><strong>Fintech Nexus. (2023)</strong>. Web3 Must Learn From Web2 Security Mistakes. Retrieved from <a href="https://www.fintechnexus.com/web3-learning-from-web2-mistakes">https://www.fintechnexus.com/web3-learning-from-web2-mistakes</a></li><li><strong>Borg Security. (2023).</strong> The Dangers of Web2 Dependencies in Web3 Projects. Retrieved from <a href="https://borgsecurity.io/blog/dangers-of-web2-on-web3">https://borgsecurity.io/blog/dangers-of-web2-on-web3</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=998880815fd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>