{"id":483,"date":"2025-06-13T08:00:00","date_gmt":"2025-06-13T00:00:00","guid":{"rendered":"https:\/\/chainvestigate.com\/kiloex-hack-analysis\/"},"modified":"2025-09-22T12:54:59","modified_gmt":"2025-09-22T04:54:59","slug":"kiloex-hack-analysis","status":"publish","type":"post","link":"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/","title":{"rendered":"KiloEx Hack Analysis"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#1_TLDR_%E2%80%93_What_Happened_in_the_KiloEx_Hack\" >1. TL;DR \u2013 What Happened in the KiloEx Hack?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#2_Introduction\" >2. Introduction<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#Attack_Transactions\" >Attack Transactions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#Addresses\" >Addresses<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#3_The_Core_Vulnerability\" >3. The Core Vulnerability<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#4_Attack_Flow\" >4. Attack Flow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#5_Impact_of_the_Attack\" >5. Impact of the Attack<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#Before_attack\" >Before attack<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#After_attack\" >After attack<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#6_How_the_Protocol_Responded\" >6. How the Protocol Responded<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#7_How_the_Attack_Could_Have_Been_Prevented\" >7. How the Attack Could Have Been Prevented<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/chainvestigate.com\/en\/kiloex-hack-analysis\/#8_Conclusion\" >8. Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 dir=\"auto\"><span class=\"ez-toc-section\" id=\"1_TLDR_%E2%80%93_What_Happened_in_the_KiloEx_Hack\"><\/span>1. TL;DR \u2013 What Happened in the KiloEx Hack?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"body-large\" dir=\"auto\">On April 14, 2025, a crypto trading platform called <u><a href=\"https:\/\/www.kiloex.io\/\" target=\"_blank\" rel=\"nofollow noopener\" data-page-id=\"\">KiloEx<\/a><\/u> was hacked, and over $7.4 million was stolen across multiple blockchains (Base, BNB Chain, opBNB, etc.). This platform allows people to trade cryptocurrency using leverage, meaning they can borrow money to potentially generate larger profits.<\/p>\n<p class=\"body-large\" dir=\"auto\">The attacker found a security weakness in a part of KiloEx\u2019s system that was supposed to control who was allowed to do what. That system failed to properly check whether the person giving an order was actually allowed to do so, and so the hacker pretended to be a trusted system admin.<\/p>\n<p class=\"body-large\" dir=\"auto\">Using this fake identity, the hacker tricked the system into accepting fake price updates for crypto assets like ETH. They set the price low, bought in, and then raised the price way up and sold, pocketing millions. It\u2019s like faking the price of a stock, buying it cheap, and selling it at a fake high price, all without anyone stopping you.<\/p>\n<p class=\"body-large\" dir=\"auto\">The weakness was in the protocol\u2019s <strong>MinimalForwarder<\/strong> contract, which was supposed to safely forward users&#8217; transactions, but it didn\u2019t check identities correctly. That opened the door for the hacker to impersonate a system admin (called a &#8220;<strong>Keeper<\/strong>&#8220;) who was supposed to set prices.<\/p>\n<p class=\"body-large\" dir=\"auto\">The system assumed that messages coming through the forwarding tool were always from trusted entities, and that assumption was wrong. In the end, the hacker abused the trust built into the system&#8217;s code and drained millions from the platform.<\/p>\n<p dir=\"auto\">\n<h2 dir=\"auto\"><span class=\"ez-toc-section\" id=\"2_Introduction\"><\/span>2. Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"body-large\" dir=\"auto\">On April 14, 2025, KiloEx, a decentralized perpetual trading platform on BNB Chain, Base, and Taiko networks, suffered a major exploit that led to the loss of over $7.4 million. The breakdown of the losses included approximately $3.3 million on Base, $1 million on BSC, and $3.1 million on opBNB. The root cause was traced to a <strong>critical access control vulnerability<\/strong> in the <strong>MinimalForwarder<\/strong> contract, which failed to adequately verify the legitimacy of forwarded calls. This enabled the attacker to initiate transactions that appeared authorized, despite being forged.<\/p>\n<p class=\"body-large\" dir=\"auto\">KiloEx enables leverage trading on various crypto assets through perpetual contracts. Its trading infrastructure relies on smart contracts to manage risk, execute trades, and maintain up-to-date pricing via oracle feeds. Liquidity pools provide the capital for traders to open positions, and these mechanisms require strong access controls to prevent abuse. Given the complexity and the value at stake, such systems are often targeted by malicious actors who seek to exploit overlooked permission settings or flawed trust assumptions in contract logic.<\/p>\n<p class=\"body-large\" dir=\"auto\">In this case, the attacker exploited the <strong>MinimalForwarder<\/strong> by forging a signature and injecting a spoofed <strong>from<\/strong> address, allowing them to impersonate trusted <strong>Keeper<\/strong> roles. This unauthorized access granted them control over the <strong>setPrices()<\/strong> function in the <strong>KiloPriceFeed<\/strong> contract. By artificially lowering and later inflating the oracle price of an asset like ETH, the attacker opened a leveraged long position at a deflated price and closed it at a heavily inflated one. This price manipulation loop allowed them to extract substantial profits from the liquidity pools, resulting in a multi-chain drain of protocol funds.<\/p>\n<p dir=\"auto\">\n<h3 dir=\"auto\"><span class=\"ez-toc-section\" id=\"Attack_Transactions\"><\/span>Attack Transactions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"body-large\" dir=\"auto\"><strong>Base<\/strong>:<\/p>\n<ul dir=\"auto\">\n<li>\n<p class=\"body\" dir=\"auto\">Transaction 1 ($3.13M): <a href=\"https:\/\/basescan.org\/tx\/0x6b378c84aa57097fb5845f285476e33d6832b8090d36d02fe0e1aed909228edd\" target=\"_blank\" rel=\"noopener\">0x6b378c84aa57097fb5845f285476e33d6832b8090d36d02fe0e1aed909228edd<\/a><\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\">Transaction 2 ($187k): <a href=\"https:\/\/basescan.org\/tx\/0xde7f5e78ea63cbdcd199f4b109db2a551b4462dec79e4dba37711f6c814b26e6\" target=\"_blank\" rel=\"noopener\">0xde7f5e78ea63cbdcd199f4b109db2a551b4462dec79e4dba37711f6c814b26e6<\/a><\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\">Transaction 3 ($11k): <a href=\"https:\/\/basescan.org\/tx\/0xf0fcce0807a82041d050a60461e187f0e81a6f7fbda69bb600c04049d924e138\" target=\"_blank\" rel=\"noopener\">0xf0fcce0807a82041d050a60461e187f0e81a6f7fbda69bb600c04049d924e138<\/a><\/p>\n<p class=\"body\" dir=\"auto\">\n<\/li>\n<\/ul>\n<p class=\"body-large\" dir=\"auto\"><strong>BNB<\/strong>:<\/p>\n<ul dir=\"auto\">\n<li>\n<p class=\"body\" dir=\"auto\">Transaction ($893k): <a href=\"https:\/\/bscscan.com\/tx\/0x1aaf5d1dc3cd07feb5530fbd6aa09d48b02cbd232f78a40c6ce8e12c55927d03\" target=\"_blank\" rel=\"noopener\">0x1aaf5d1dc3cd07feb5530fbd6aa09d48b02cbd232f78a40c6ce8e12c55927d03<\/a><\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\">Transaction 2 ($10k): <a href=\"https:\/\/bscscan.com\/tx\/0x38b25be14b83fd549d5e0b29ba962db83d41f5f9072d0eac4f692fa8e7110bc0\" target=\"_blank\" rel=\"noopener\">0x38b25be14b83fd549d5e0b29ba962db83d41f5f9072d0eac4f692fa8e7110bc0<\/a><\/p>\n<p class=\"body\" dir=\"auto\">\n<\/li>\n<\/ul>\n<p class=\"body-large\" dir=\"auto\"><strong>opBNB<\/strong>:<\/p>\n<ul dir=\"auto\">\n<li>\n<p class=\"body\" dir=\"auto\">Transaction 1 ($2.9M): <a href=\"https:\/\/opbnbscan.com\/tx\/0x79eb28ae21698733048e2dae9f9fe3d913396dc9d93a0e30d659df6065127964\" target=\"_blank\" rel=\"noopener\">0x79eb28ae21698733048e2dae9f9fe3d913396dc9d93a0e30d659df6065127964<\/a><\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\">Transaction 2 ($205.5k): <a href=\"https:\/\/opbnbscan.com\/tx\/0xcfc679a66f1d2966dbe83bb827409c40f29f881c20128107ae73e93ab55c65e4\" target=\"_blank\" rel=\"noopener\">0xcfc679a66f1d2966dbe83bb827409c40f29f881c20128107ae73e93ab55c65e4<\/a><\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\">Transaction 3 ($14k): <a href=\"https:\/\/opbnbscan.com\/tx\/0x783d56ce53af6d59c7c4be374ff48a66257733fadf5905526b5862a54917889f\" target=\"_blank\" rel=\"noopener\">0x783d56ce53af6d59c7c4be374ff48a66257733fadf5905526b5862a54917889f<\/a><\/p>\n<p class=\"body\" dir=\"auto\">\n<\/li>\n<\/ul>\n<p class=\"body-large\" dir=\"auto\"><strong>Taiko<\/strong>:<\/p>\n<ul dir=\"auto\">\n<li>\n<p class=\"body\" dir=\"auto\">Transaction ($41k): <a href=\"https:\/\/taikoscan.io\/tx\/0x9bce6e105cea138fe9fb1e4bfb63fe90d21817db9d2cc6d1bf7697317430215b\" target=\"_blank\" rel=\"noopener\">0x9bce6e105cea138fe9fb1e4bfb63fe90d21817db9d2cc6d1bf7697317430215b<\/a><\/p>\n<p class=\"body\" dir=\"auto\">\n<\/li>\n<\/ul>\n<p class=\"body-large\" dir=\"auto\"><strong>Manta<\/strong>:<\/p>\n<ul dir=\"auto\">\n<li>\n<p class=\"body\" dir=\"auto\">Transaction ($100k): <a href=\"https:\/\/pacific-explorer.manta.network\/tx\/0x06074831103a1e91c7b6dcb3b641cf4b79bfa208ea75e99cf9b5100d60a82df5\" target=\"_blank\" rel=\"noopener\">0x06074831103a1e91c7b6dcb3b641cf4b79bfa208ea75e99cf9b5100d60a82df5<\/a><\/p>\n<\/li>\n<\/ul>\n<h3 dir=\"auto\"><span class=\"ez-toc-section\" id=\"Addresses\"><\/span>Addresses<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"body-large\" dir=\"auto\"><strong>Attacker Address<\/strong>:<\/p>\n<ul dir=\"auto\">\n<li>\n<p class=\"body\" dir=\"auto\"><a href=\"https:\/\/etherscan.io\/address\/0x00fac92881556a90fdb19eae9f23640b95b4bcbd\" target=\"_blank\" rel=\"noopener\">0x00faC92881556A90FdB19eAe9F23640B95B4bcBd<\/a> &#8211; Ethereum<\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\"><a href=\"https:\/\/basescan.org\/address\/0x00fac92881556a90fdb19eae9f23640b95b4bcbd\" target=\"_blank\" rel=\"noopener\">0x00faC92881556A90FdB19eAe9F23640B95B4bcBd<\/a> &#8211; Base<\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\"><a href=\"https:\/\/bscscan.com\/address\/0x00fac92881556a90fdb19eae9f23640b95b4bcbd\" target=\"_blank\" rel=\"noopener\">0x00faC92881556A90FdB19eAe9F23640B95B4bcBd<\/a> &#8211; BNB<\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\"><a href=\"https:\/\/opbnbscan.com\/address\/0x00fac92881556a90fdb19eae9f23640b95b4bcbd\" target=\"_blank\" rel=\"noopener\">0x00faC92881556A90FdB19eAe9F23640B95B4bcBd<\/a> &#8211; opBNB<\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\"><a href=\"https:\/\/taikoscan.io\/address\/0x00fac92881556a90fdb19eae9f23640b95b4bcbd#asset-multichain\" target=\"_blank\" rel=\"noopener\">0x00faC92881556A90FdB19eAe9F23640B95B4bcBd<\/a> &#8211; Taiko<\/p>\n<\/li>\n<li>\n<p class=\"body\" dir=\"auto\"><a href=\"https:\/\/pacific-explorer.manta.network\/address\/0x551f3110f12c763D1611d5A63B5F015d1c1a954C\" target=\"_blank\" rel=\"noopener\">0xd43b395efad4877e94e06b980f4ed05367484bf3<\/a> &#8211; Manta<\/p>\n<p class=\"body\" dir=\"auto\">\n<\/li>\n<\/ul>\n<p class=\"body-large\" dir=\"auto\"><strong>Victim\u2019s Address<\/strong>:<\/p>\n<ul dir=\"auto\">\n<li>\n<p class=\"body\" dir=\"auto\">0xdf5ACC616cD3ea9556EC340a11B54859a393ebBB<\/p>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgZpWEtj.webp\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgDZZMWJ.webp\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/assets.zyrosite.com\/AQEVnlbQNkTp1wk6\/image-A85VyynrgJhP86Jr.png\" alt=\"\" \/><\/p>\n<h2 dir=\"auto\"><span class=\"ez-toc-section\" id=\"3_The_Core_Vulnerability\"><\/span>3. The Core Vulnerability<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"body-large\" dir=\"auto\">The root cause of the KiloEx exploit was a flaw in the access control mechanism implemented within the <strong>MinimalForwarder<\/strong> contract \u2014 a contract intended to facilitate meta-transactions, allowing users to interact with the protocol by relaying signed messages without directly paying gas. However, the design lacked critical verification logic, particularly around identity enforcement and signature validation.<\/p>\n<p class=\"body-large\" dir=\"auto\">At the center of the vulnerability was the <strong>execute()<\/strong> function of the <strong>MinimalForwarder<\/strong> contract. While this function correctly decoded the provided ECDSA signature parameters (<strong>v, r, s<\/strong>) and used <strong>ecrecover<\/strong> to reconstruct the signer\u2019s address, it failed to enforce that the recovered signer matched the <strong>from<\/strong> address specified in the transaction payload. In doing so, it allowed any entity to:<\/p>\n<ul dir=\"auto\">\n<li>\n<p class=\"body-large\" dir=\"auto\">Forge a valid-looking signature using their own private key.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Specify an arbitrary address in the <strong>from<\/strong> field, including that of a trusted Keeper.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Relay transactions as though they originated from that trusted address, effectively bypassing authentication and role-based access control.<\/p>\n<p class=\"body-large\" dir=\"auto\">\n<\/li>\n<\/ul>\n<p class=\"body-large\" dir=\"auto\">This allowed the attacker to take on the role of a <strong>Keeper<\/strong> (a role trusted to feed external price data into KiloEx\u2019s oracle system) without possessing the actual <strong>Keeper&#8217;s<\/strong> private key or credentials.<\/p>\n<p class=\"body-large\" dir=\"auto\">Once the attacker had assumed this role, they were able to invoke privileged functions downstream, particularly the <strong>setPrices()<\/strong> function exposed by the <strong>KiloPriceFeed<\/strong> contract, and manipulate oracle prices to their advantage during trading operations.<\/p>\n<p class=\"body-large\" dir=\"auto\">The exploit unfolded across multiple interlinked smart contracts, each of which played a role in enabling the unauthorized action:<\/p>\n<ol dir=\"auto\">\n<li>\n<p class=\"body-large\" dir=\"auto\"><strong>MinimalForwarder Contract:<\/strong><\/p>\n<\/li>\n<\/ol>\n<ul dir=\"auto\">\n<li>\n<p class=\"body-large\" dir=\"auto\">Designed to relay user-signed transactions using meta-transactions.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Lacked enforcement to confirm that the signer of the transaction (via ecrecover) matched the from address.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Allowed an attacker to send a transaction that appeared to come from a legitimate <strong>Keeper<\/strong> address, though it was actually signed by the attacker.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Became a vulnerability gateway, forwarding malicious calls to other protocol components under the guise of trusted identities<strong>.<\/strong><\/p>\n<\/li>\n<\/ul>\n<ol dir=\"auto\" start=\"2\">\n<li>\n<p class=\"body-large\" dir=\"auto\"><strong>PositionKeeper Contract:<\/strong><\/p>\n<\/li>\n<\/ol>\n<ul dir=\"auto\">\n<li>\n<p class=\"body-large\" dir=\"auto\">Managed user trading positions, including opening and closing long\/short positions.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Exposed functions that could be invoked through forwarded calls from MinimalForwarder.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Contained function selector <strong>0xac9fd279<\/strong>, which acted as a passthrough to the <strong>Keeper<\/strong> system, this allowed the maliciously forwarded request to reach the oracle update layer.<\/p>\n<\/li>\n<\/ul>\n<ol dir=\"auto\" start=\"3\">\n<li>\n<p class=\"body-large\" dir=\"auto\"><strong>PositionKeeper Contract:<\/strong><\/p>\n<\/li>\n<\/ol>\n<ul dir=\"auto\">\n<li>\n<p class=\"body-large\" dir=\"auto\">Tasked with feeding real-time price data into the protocol\u2019s oracle.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Interfaced with the <strong>setPrices()<\/strong> function to update asset pricing.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Relied on the assumption that only authorized <strong>Keeper<\/strong> addresses could invoke its logic \u2014 an assumption invalidated by the <strong>MinimalForwarder<\/strong> flaw.<\/p>\n<\/li>\n<\/ul>\n<ol dir=\"auto\" start=\"4\">\n<li>\n<p class=\"body-large\" dir=\"auto\"><strong>KiloPriceFeed Contract:<\/strong><\/p>\n<\/li>\n<\/ol>\n<ul dir=\"auto\">\n<li>\n<p class=\"body-large\" dir=\"auto\">Oracle contract responsible for maintaining and distributing token price data across the platform.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Hosted the <strong>setPrices()<\/strong> function, which was manipulated repeatedly by the attacker.<\/p>\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\">Price updates were blindly trusted by the protocol once submitted by what appeared to be a valid Keeper, leading to malicious price feeds being accepted and acted upon.<\/p>\n<p class=\"body-large\" dir=\"auto\">\n<\/li>\n<\/ul>\n<p class=\"body-large\" dir=\"auto\">Through this multi-contract interaction, the attacker conducted a series of trades that profited from manipulated oracle data, repeatedly setting prices via fake <strong>Keeper<\/strong> calls and executing trades on artificially inflated or deflated prices.<\/p>\n<h2 dir=\"auto\"><span class=\"ez-toc-section\" id=\"4_Attack_Flow\"><\/span>4. Attack Flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgmPp2YM.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">The attacker self-funded their address through Tornado Cash, commonly used to obscure the origin of funds. This initial step allowed them to hide their on-chain identity before executing the exploit.<\/p>\n<p dir=\"auto\"><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgz5No0d.webp\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgNXq130.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">The attack chain then began with the attacker using the flawed forwarder to call a function in the <strong>PositionKeeper<\/strong> contract. This function (identified by selector <strong>0xac9fd279<\/strong>) is designed to handle position and price operations by communicating with the Keeper contract.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgxjzc5X.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">The forwarder met the only access control in place\u2014<strong>require(msg.sender == trustedForwarder)<\/strong>\u2014and so the call proceeded. Internally, <strong>PositionKeeper<\/strong> then invoked a privileged function on the <strong>Keeper<\/strong> contract (selector <strong>0x7a498a61<\/strong>), believing that the request originated from a legitimate keeper via the trusted forwarder. This assumption was false, but due to the flawed call chain validation, the protocol treated the request as valid.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgVr7tae.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">The <strong>Keeper<\/strong> contract then subsequently called the <strong>KiloPriceFeed::setPrices()<\/strong> function, which is only callable by the Keeper. This function is responsible for updating the oracle\u2019s recorded asset prices and is gated by the onlyKeeper modifier, which checks that <strong>msg.sender<\/strong> is the <strong>Keeper<\/strong> contract. Since this condition was satisfied, the attacker\u2019s rogue price values were accepted without further validation.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgX6x8GU.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">Through this multi-step chain, the attacker effectively gained the ability to update KiloEx\u2019s oracle prices at will. They called the <strong>execute()<\/strong> function of the <strong>MinimalForwarder<\/strong> contract to submit a forged request targeting the <strong>PositionKeeper<\/strong> contract, which accepted artificially lowered price data. This manipulation set the price of ETH to an extremely low level, around $100, allowing the attacker to open a large leveraged long position at this depressed price. By doing so, the attacker positioned themselves to gain significantly from any subsequent price increase.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgObwGAZ.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">With the low price locked in as the entry point, the attacker then executed a second <strong>setPrices()<\/strong> call, this time inflating ETH\u2019s price to approximately $10,000. This artificial price spike caused the attacker\u2019s position to become highly profitable on paper.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimg4PgzmY.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">Immediately afterward, the attacker closed the long position, locking in profits derived from the manipulated spread. On the Base chain alone, this sequence of events allowed the attacker to drain around $3.3 million from the protocol. The core mechanism relied entirely on impersonating a trusted keeper and abusing the trust assumptions embedded within each contract.<\/p>\n<p class=\"body-large\" dir=\"auto\">The vulnerability was not isolated to a single deployment. KiloEx had been deployed on multiple chains, including Base, BSC, and opBNB, and each of these instances relied on the same flawed meta-transaction forwarder and permission model. The attacker repeated the exploit across these chains using the same forged call path, which consistently bypassed access controls by exploiting the spoofed <strong>from<\/strong> field in the meta-transactions. The result was a cross-chain extraction of funds that totalled approximately $7.5 million in losses.<\/p>\n<h2 dir=\"auto\"><span class=\"ez-toc-section\" id=\"5_Impact_of_the_Attack\"><\/span>5. Impact of the Attack<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"body-large\" dir=\"auto\"><strong>Total Loss:<\/strong> ~$7.4 million<\/p>\n<p class=\"body-large\" dir=\"auto\"><strong>Impact by Chain:<\/strong><\/p>\n<p class=\"body-large\" dir=\"auto\"><strong>Base:<\/strong> ~$3.3M<\/p>\n<p class=\"body-large\" dir=\"auto\"><strong>BSC:<\/strong> ~$1M<\/p>\n<p class=\"body-large\" dir=\"auto\"><strong>opBNB: <\/strong>~$3.1M<\/p>\n<ul dir=\"auto\">\n<li>\n<h3 dir=\"auto\"><span class=\"ez-toc-section\" id=\"Before_attack\"><\/span>Before attack<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgrUASXz.webp\" alt=\"\" \/><\/p>\n<ul dir=\"auto\">\n<li>\n<h3 dir=\"auto\"><span class=\"ez-toc-section\" id=\"After_attack\"><\/span>After attack<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgESV17E.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">Also, the TVL in the KiloEx protocol fell by approximately 21.53%, reflecting a sharp reduction in the amount of capital held within the protocol, likely due to a combination of direct fund losses from the attack and subsequent user withdrawals driven by a loss of confidence in the platform\u2019s security.<\/p>\n<h2 dir=\"auto\"><span class=\"ez-toc-section\" id=\"6_How_the_Protocol_Responded\"><\/span>6. How the Protocol Responded<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"body-large\" dir=\"auto\">Following the exploit, KiloEx responded swiftly with a series of actions aimed at damage control and transparency. On April 15, 2025, the team publicly acknowledged the incident through a Security Incident Announcement shared on X (formerly Twitter). In the statement, they confirmed the vault exploit and shared the attacker\u2019s wallet address to maintain transparency with the community. Users were warned not to interact with the affected contracts until further notice.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgu8c2n1.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">In the aftermath, KiloEx engaged multiple security and blockchain investigation partners to aid in tracing and recovering the stolen funds. These partners are assisting with transaction tracing, forensic analysis, and intelligence gathering to help identify the attacker and potentially retrieve lost assets.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimgu3cn5k.webp\" alt=\"\" \/><\/p>\n<p class=\"body-large\" dir=\"auto\">In addition to working with external partners, KiloEx also issued a public bounty to the attacker. They offered 10% of the stolen funds as a reward for the safe return of the remainder, with a promise of no legal action if the attacker complied. This form of ultimatum is becoming increasingly common in defi, where traditional legal recourse can be slow or ineffective. By offering a bounty, KiloEx hopes to incentivize partial recovery while maintaining open channels of communication with the attacker, if only temporarily.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/chainvestigate.com\/wp-content\/uploads\/2025\/09\/scimg0vmFjS.webp\" alt=\"\" \/><\/p>\n<h2 dir=\"auto\"><span class=\"ez-toc-section\" id=\"7_How_the_Attack_Could_Have_Been_Prevented\"><\/span>7. How the Attack Could Have Been Prevented<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"body-large\" dir=\"auto\">Below are key security practices and design principles that, if implemented, would likely have prevented the exploit:<\/p>\n<ol dir=\"auto\">\n<li>\n<p class=\"body-large\" dir=\"auto\"><strong>Enforce Signature Ownership Validation<\/strong>: While the <strong>MinimalForwarder.execute()<\/strong> function used <strong>ecrecover<\/strong> to extract the signer from a signature, it did not check whether the recovered address matched the <strong>from<\/strong> field in the meta-transaction. This missing <strong>require(recovered == from)<\/strong> check enabled the attacker to impersonate the identity of a trusted <strong>keeper<\/strong>. Adding this simple condition would have ensured that only the rightful signer could execute forwarded calls on their behalf, rendering the forged requests invalid.<\/p>\n<p class=\"body-large\" dir=\"auto\">\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\"><strong>Add Price Sanity Checks and Rate Limiting:<\/strong> The <strong>setPrices()<\/strong> function in the <strong>PriceFeed<\/strong> contract accepted arbitrary price inputs without any sanity checks or rate-limiting mechanisms. It trusted that the <strong>Keeper<\/strong> would always provide accurate data. Instead, the function should have included protections such as:<\/p>\n<p class=\"body-large\" dir=\"auto\">\u2b62Rejecting new prices that deviate significantly from previous values (e.g., &gt;10% in a short time).<\/p>\n<p class=\"body-large\" dir=\"auto\">\u2b62Preventing rapid successive updates to the same asset.<\/p>\n<p class=\"body-large\" dir=\"auto\">\u2b62Requiring multiple trusted sources to agree on price data before updating.<\/p>\n<p class=\"body-large\" dir=\"auto\">\n<\/li>\n<li>\n<p class=\"body-large\" dir=\"auto\"><strong>Thorough Audits, Testing, and Forensic Preparedness:<\/strong> A comprehensive audit would have flagged the missing signature verification in <strong>MinimalForwarder<\/strong>, improper reliance on fields that can be impersonated, and the lack of validation in <strong>setPrices()<\/strong>.<\/p>\n<\/li>\n<\/ol>\n<p class=\"body-large\" dir=\"auto\">Additionally, in cases where breaches occur despite precautions, timely and professional post-incident analysis is essential. Chainvestigate offers critical value, providing clear, courtroom-ready investigation reports, decoding complex on-chain behavior, and collaborating with legal firms to support recovery and enforcement.<\/p>\n<p dir=\"auto\">\n<h2 dir=\"auto\"><span class=\"ez-toc-section\" id=\"8_Conclusion\"><\/span>8. Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"body-large\" dir=\"auto\">The KiloEx exploit highlights how a single point of failure in access control can compromise an entire protocol\u2019s integrity. The attacker took advantage of weak signature verification to pose as an authorized Keeper, manipulating oracle prices to extract millions in profit across several chains.<\/p>\n<p class=\"body-large\" dir=\"auto\">Incidents like this underscore the importance of rigorous smart contract design, layered permission checks, and continuous monitoring of meta-transaction components.<\/p>\n<p class=\"body-large\" dir=\"auto\">At Chainvestigate, we specialize in uncovering complex exploit chains like this by combining on-chain forensics with protocol-level analysis. Our tools and expertise help teams identify critical vulnerabilities, trace stolen funds, and stay ahead of emerging threats in the evolving DeFi space.<\/p>","protected":false},"excerpt":{"rendered":"<p>In April 2025, KiloEx, a decentralized trading platform, was hacked for over $7.4 million across Base, BNB Chain, opBNB, and other chains. This in-depth analysis uncovers how an attacker bypassed access controls, impersonated a trusted Keeper, and manipulated oracle pricing to drain funds through leveraged trades.<\/p>","protected":false},"author":1,"featured_media":807,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[24,23],"tags":[28,29],"class_list":["post-483","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-case-studies","category-expert-insights","tag-hacks-exploits","tag-incident-analysis"],"blocksy_meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/posts\/483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/comments?post=483"}],"version-history":[{"count":0,"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/posts\/483\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/media\/807"}],"wp:attachment":[{"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/media?parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/categories?post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chainvestigate.com\/en\/wp-json\/wp\/v2\/tags?post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}