<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://quadrigainitiative.com/cryptocurrencyhackscamfraudwiki/index.php?action=history&amp;feed=atom&amp;title=Missing_Access_Control_in_uniswapV3SwapCallback_Function</id>
	<title>Missing Access Control in uniswapV3SwapCallback Function - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://quadrigainitiative.com/cryptocurrencyhackscamfraudwiki/index.php?action=history&amp;feed=atom&amp;title=Missing_Access_Control_in_uniswapV3SwapCallback_Function"/>
	<link rel="alternate" type="text/html" href="https://quadrigainitiative.com/cryptocurrencyhackscamfraudwiki/index.php?title=Missing_Access_Control_in_uniswapV3SwapCallback_Function&amp;action=history"/>
	<updated>2026-05-30T09:57:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://quadrigainitiative.com/cryptocurrencyhackscamfraudwiki/index.php?title=Missing_Access_Control_in_uniswapV3SwapCallback_Function&amp;diff=6876&amp;oldid=prev</id>
		<title>Azoundria: Created page with &quot;{{Imported Case Study With About|source=https://www.quadrigainitiative.com/casestudy/missingaccesscontrolinuniswapv3swapcallbackfunction.php}} {{Unattributed Sources}}  Analysis Of Malicious TransactionA recent exploit on the Base chain targeted a smart contract at address 0x8d2e, resulting in a $40,000 loss in USDC due to improper access control on the uniswapV3SwapCallback function. This function is a core part of Uniswap V...&quot;</title>
		<link rel="alternate" type="text/html" href="https://quadrigainitiative.com/cryptocurrencyhackscamfraudwiki/index.php?title=Missing_Access_Control_in_uniswapV3SwapCallback_Function&amp;diff=6876&amp;oldid=prev"/>
		<updated>2025-08-27T20:38:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Imported Case Study With About|source=https://www.quadrigainitiative.com/casestudy/missingaccesscontrolinuniswapv3swapcallbackfunction.php}} {{Unattributed Sources}}  &lt;a href=&quot;/cryptocurrencyhackscamfraudwiki/index.php?title=File:Uniswapv3weakaccesscontrol.jpg&quot; title=&quot;File:Uniswapv3weakaccesscontrol.jpg&quot;&gt;thumb|Analysis Of Malicious Transaction&lt;/a&gt;A recent exploit on the Base chain targeted a smart contract at address 0x8d2e, resulting in a $40,000 loss in USDC due to improper access control on the uniswapV3SwapCallback function. This function is a core part of Uniswap V...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Imported Case Study With About|source=https://www.quadrigainitiative.com/casestudy/missingaccesscontrolinuniswapv3swapcallbackfunction.php}}&lt;br /&gt;
{{Unattributed Sources}}&lt;br /&gt;
&lt;br /&gt;
[[File:Uniswapv3weakaccesscontrol.jpg|thumb|Analysis Of Malicious Transaction]]A recent exploit on the Base chain targeted a smart contract at address 0x8d2e, resulting in a $40,000 loss in USDC due to improper access control on the uniswapV3SwapCallback function. This function is a core part of Uniswap V3’s architecture and must be secured to ensure only trusted Uniswap pools can invoke it. In this case, the attacker exploited weak validation logic—likely simulating a valid callback—to trick the contract into releasing funds. Although some protections may have been in place, they were ineffective, reflecting a broader trend of inadequate safeguards around Uniswap V3 integrations. The exploit was confirmed by multiple security firms and reported by SuplabsYi. There’s currently no evidence of recovery or formal investigation, and the contract’s owner remains unknown.&amp;lt;ref name=&amp;quot;tenarmortweet-21047&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;hklst4rtweet-21048&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;suplabsyitweet-21049&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;uniswapdocs1-21050&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;uniswapdocs2-21051&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;uniswapdocs3-21052&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;uniswapdocs4-21053&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;uniswapwhitepaper-21054&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== About Uniswap ==&lt;br /&gt;
Uniswap is a decentralized exchange (DEX) protocol built on Ethereum and other EVM-compatible blockchains that enables users to trade cryptocurrencies directly from their wallets without the need for intermediaries. It uses a unique automated market maker (AMM) model, where liquidity providers deposit token pairs into liquidity pools, and traders interact with those pools to execute swaps. Instead of relying on a traditional order book, Uniswap determines pricing through a mathematical formula that balances the ratio of tokens in the pool. This allows for continuous, permissionless trading and deep liquidity across a wide range of token pairs.&lt;br /&gt;
&lt;br /&gt;
Uniswap V3, the third major version of the protocol, introduced several advanced features, including concentrated liquidity and multiple fee tiers. Concentrated liquidity allows liquidity providers to allocate their capital within specific price ranges, increasing capital efficiency and improving returns. Additionally, the protocol is modular, with a core set of smart contracts that handle pool logic and a periphery set that manages user-friendly routing and interface functions. Uniswap is widely used across DeFi for swaps, arbitrage, liquidity provision, and integration into other DeFi platforms, making it one of the most influential protocols in the ecosystem.&lt;br /&gt;
== About uniswapV3SwapCallback ==&lt;br /&gt;
The uniswapV3SwapCallback is a critical function in the Uniswap V3 protocol that facilitates token swaps by ensuring the correct token amounts are transferred during a swap operation. Specifically, it's a callback function that must be implemented by any contract that initiates a swap via the Uniswap V3 pool’s swap function. When a swap is executed, the Uniswap V3 pool contract calls uniswapV3SwapCallback on the calling contract, providing it with the exact amounts of tokens that must be paid back to the pool in order to complete the swap.&lt;br /&gt;
&lt;br /&gt;
The callback function receives three parameters: int256 amount0Delta, int256 amount1Delta, and bytes calldata data. The amount0Delta and amount1Delta indicate the net token amounts that must be returned to the pool — a positive value means that the token must be sent to the pool, while a negative value indicates an amount received from the pool. The data parameter is passed through from the original swap call and can be used to decode custom data required for processing the swap. Importantly, this callback mechanism allows for powerful features like flash swaps, composable DeFi operations, and on-the-fly pricing logic, making Uniswap V3 highly flexible and programmable. Implementing this callback correctly is essential for any smart contract interacting directly with Uniswap V3 pools.&lt;br /&gt;
&lt;br /&gt;
== The Reality ==&lt;br /&gt;
Unfortunately, any smart contract with insecure access restrictions can be vulnerable to be exploited.&lt;br /&gt;
&lt;br /&gt;
== What Happened ==&lt;br /&gt;
A smart contract on Base chain was exploited for $40,000 in USDC due to weak access control on the uniswapV3SwapCallback function, allowing an attacker to simulate a legitimate callback and drain funds.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Key Event Timeline - Missing Access Control in uniswapV3SwapCallback Function&lt;br /&gt;
!Date&lt;br /&gt;
!Event&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|August 20th, 2025 10:42:55 AM MDT&lt;br /&gt;
|Attack Transaction On Base&lt;br /&gt;
|The attack transaction is processed and incorporated into the history of the Base blockchain.&lt;br /&gt;
|-&lt;br /&gt;
|August 20th, 2025 10:46:00 AM MDT&lt;br /&gt;
|Weilin Analysis&lt;br /&gt;
|Weilin (@hklst4r) posts about the attack transaction with a high level description.&lt;br /&gt;
|-&lt;br /&gt;
|August 20th, 2025 12:16:00 PM MDT&lt;br /&gt;
|SupLabsYi Analysis&lt;br /&gt;
|Yi (@SupLabsYi) posts a more detailed analysis of the exploit transaction with further details.&lt;br /&gt;
|-&lt;br /&gt;
|August 20th, 2025 8:26:00 PM MDT&lt;br /&gt;
|TenArmor Posts Tweet&lt;br /&gt;
|TenArmor posts a tweet which features details of the attack, along with another attack which occurred recently.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical Details ==&lt;br /&gt;
The exploit of contract 0x8d2e on Base chain highlights a recurring security flaw in Uniswap V3 integrations—improper or missing access control on the uniswapV3SwapCallback function. This callback is a required part of the Uniswap V3 protocol; it gets called by the pool after a swap() function is invoked, expecting the calling contract to transfer the owed token amounts. However, because this function can be externally triggered, failing to restrict who can call it opens the door to direct manipulation. In this case, the attacker likely invoked uniswapV3SwapCallback with carefully crafted calldata, simulating a legitimate swap to trick the victim contract into transferring funds.&lt;br /&gt;
&lt;br /&gt;
Historically, developers attempted to secure uniswapV3SwapCallback by hardcoding known Uniswap V3 pool addresses and checking that only these pools could invoke the callback. But that approach is fragile: pools can be forked, misconfigured, or spoofed, and hardcoding values doesn't scale or adapt well to ecosystem changes. Worse, it gives a false sense of security. In the 0x8d2e case, the contract included some form of validation, but the logic was either flawed or insufficiently enforced, allowing the attacker to simulate a valid call and drain around $40,000.&lt;br /&gt;
&lt;br /&gt;
The broader issue here is a design pattern that fails to account for the trust boundaries in DeFi. While Uniswap V3 gives developers flexibility, it assumes implementers will enforce strict controls in their uniswapV3SwapCallback logic. When they don't—whether due to oversight or incorrect assumptions—the results are catastrophic. In this instance, what may have seemed like a reasonable design backfired entirely. The attacker didn’t break the rules—they simply played by the ones left exposed. Going forward, developers must validate the msg.sender as a known, trusted pool created by the Uniswap V3 factory and rigorously verify swap parameters to ensure they match expectations. Anything less is an open invitation for exploits.&lt;br /&gt;
&lt;br /&gt;
== Total Amount Lost ==&lt;br /&gt;
Losses were analyzed as $40k by SuplabsYi. This matches with the blockchain transaction indicating that $40k worth of USDC were transfered.&lt;br /&gt;
&lt;br /&gt;
The total amount lost has been estimated at $40,000 USD.&lt;br /&gt;
&lt;br /&gt;
== Immediate Reactions ==&lt;br /&gt;
It is unclear who runs this smart contract. The incident was reported on by at least 3 separate security firms.&lt;br /&gt;
&lt;br /&gt;
== Ultimate Outcome ==&lt;br /&gt;
There does not appear to be any formal investigation underway.&lt;br /&gt;
&lt;br /&gt;
== Total Amount Recovered ==&lt;br /&gt;
There is no evidence that any recovery is possible.&lt;br /&gt;
&lt;br /&gt;
There do not appear to have been any funds recovered in this case.&lt;br /&gt;
&lt;br /&gt;
== Ongoing Developments ==&lt;br /&gt;
This situation could develop further if the perpetrator is identified.&lt;br /&gt;
== Individual Prevention Policies ==&lt;br /&gt;
{{Prevention:Individuals:Placeholder}}&lt;br /&gt;
&lt;br /&gt;
{{Prevention:Individuals:End}}&lt;br /&gt;
&lt;br /&gt;
== Platform Prevention Policies ==&lt;br /&gt;
{{Prevention:Platforms:Placeholder}}&lt;br /&gt;
&lt;br /&gt;
{{Prevention:Platforms:End}}&lt;br /&gt;
&lt;br /&gt;
== Regulatory Prevention Policies ==&lt;br /&gt;
{{Prevention:Regulators:Placeholder}}&lt;br /&gt;
&lt;br /&gt;
{{Prevention:Regulators:End}}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references&amp;gt;&amp;lt;ref name=&amp;quot;tenarmortweet-21047&amp;quot;&amp;gt;[https://twitter.com/TenArmorAlert/status/1958354933247590450 TenArmor - &amp;quot;Another two hacks: The victim contract 0x8d2e was exploited due to missing access control in the uniswapV3SwapCallback function. Someone approved tokens to the Multicall3 contract, resulting in the tokens being drained.&amp;quot; - Twitter/X] (Accessed Aug 21, 2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hklst4rtweet-21048&amp;quot;&amp;gt;[https://twitter.com/hklst4r/status/1958209131753406751 Hklst4r - &amp;quot;Another uniswap V3 unprotected callback hack. base chain&amp;quot; - Twitter/X] (Accessed Aug 21, 2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;suplabsyitweet-21049&amp;quot;&amp;gt;[https://twitter.com/SuplabsYi/status/1958231644659478619 SuplabsYi - &amp;quot;Looks like another uniswapV3SwapCallback-related hack, with a total loss of $40,000. The root cause? The access control mechanism for uniswapV3SwapCallback is pretty weak, letting malicious actors manipulate data and bypass the controls.&amp;quot; - Twitter/X] (Accessed Aug 21, 2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;uniswapdocs1-21050&amp;quot;&amp;gt;[https://docs.uniswap.org/contracts/v3/reference/core/interfaces/callback/IUniswapV3SwapCallback IUniswapV3SwapCallback — Uniswap Docs] (Accessed Aug 21, 2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;uniswapdocs2-21051&amp;quot;&amp;gt;[https://docs.uniswap.org/contracts/v3/reference/core/interfaces/pool/IUniswapV3PoolActions IUniswapV3PoolActions - Uniswap Docs] (Accessed Aug 21, 2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;uniswapdocs3-21052&amp;quot;&amp;gt;[https://docs.uniswap.org/contracts/v3/reference/periphery/SwapRouter SwapRouter Interface - Uniswap Docs] (Accessed Aug 21, 2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;uniswapdocs4-21053&amp;quot;&amp;gt;[https://docs.uniswap.org/concepts/protocol/introduction Introduction to the Uniswap Protocol - Uniswap Docs] (Accessed Aug 21, 2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;uniswapwhitepaper-21054&amp;quot;&amp;gt;[https://uniswap.org/whitepaper-v3.pdf Uniswap V3 Core Whitepaper] (Accessed Aug 21, 2025)&amp;lt;/ref&amp;gt;&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Azoundria</name></author>
	</entry>
</feed>