Smart contract vulnerabilities often come from simple logic mistakes rather than complicated technical failures.
The Order Factory incident is a good example. The protocol allowed anyone to create an order on behalf of another buyer without verifying authorization. By controlling the seller field during order creation, an attacker was able to become the privileged seller and later withdraw the buyer’s ETH.
According to the available analysis, the attack transaction drained 20.247 ETH from five buyers, with the total reported incident loss around 24.7 ETH.
At PandaSecurity, we frequently see similar patterns during smart contract reviews: a function appears convenient for users, but missing authorization checks can turn it into a critical attack surface.
The affected component was an Ethereum Order Factory contract.
The vulnerable flow involved:
The security assumption was that only an authorized party should be able to create an order for a buyer.
However, the implementation did not enforce this assumption.
Key information:
Chain: Ethereum
Vulnerability Type:
Missing authorization / access control
Impact:
Approximately 20.247 ETH drained in the reproduced attack transaction
Root Cause:
Anyone could call createOrderForBuyer() with an arbitrary buyer and attacker-controlled seller
The vulnerable function was identified by selector:
0xbde886fc
The factory contract was not verified, but analysis of transaction traces and function selectors reconstructed the following logic:
function createOrderForBuyer(
address buyer,
address seller,
...
) external {
require(getState(buyer) == 1);
// create order
// move buyer funds
// assign seller
}
The critical problem was the authorization logic.
The contract only checked:
getState(buyer) == 1
This confirmed that the buyer had an active request, but it did not verify:
As a result, any external account could create an order for another user.
The attack consisted of several steps.
The attacker searched for buyers whose state was active:
getState(buyer) == 1
These users also had ETH stored in the account system.
Instead of the buyer creating the order, the attacker called:
createOrderForBuyer(
buyer,
attackerAddress,
...
)
The attacker supplied their own address as the seller.
Because the contract only checked the buyer state, the transaction succeeded.
During order initialization, the attacker-controlled seller address was stored.
The order contract effectively recorded:
seller = attacker
This gave the attacker access to seller-only functionality.
The order contract contained an abort function:
function abort(address to) external {
require(msg.sender == seller);
payable(to).transfer(address(this).balance);
}
Since the attacker was now the seller, the authorization check passed.
The attacker could then transfer the entire ETH balance of the order to themselves.
The main issue was not a complicated Solidity bug.
It was a missing authorization design.
The protocol trusted user-controlled input:
seller = caller provided address
without verifying whether the buyer agreed to that seller.
The contract assumed:
“Someone creating an order for a buyer must be authorized.”
But the code only checked:
“Does this buyer currently have an active request?”
Those are completely different security assumptions.
This vulnerability affected user funds because the factory performed several sensitive actions:
Any one of these operations requires strict authorization.
Combining them created a direct fund-loss path.
A check like:
require(userExists);
does not prove:
require(msg.sender == user);
Developers should clearly separate:
Both checks may be required.
If a protocol wants someone else to create an order on behalf of a user, it should require explicit authorization.
Common solutions include:
Example:
verifySignature(
buyer,
seller,
amount,
nonce
);
The buyer should approve the exact action being executed.
Any parameter that affects permissions should receive extra scrutiny.
Dangerous examples:
owner = userInput;
seller = userInput;
admin = userInput;
If a user-controlled value becomes a privileged identity, the entire security model may fail.
At PandaSecurity, we analyze smart contracts by looking beyond individual functions.
Our review process focuses on:
Many critical vulnerabilities come from differences between protocol design intentions and actual execution paths.
The Order Factory exploit demonstrates an important lesson in smart contract security:
Authorization must be enforced by code, not assumptions.
A function that allows “creating an order for a buyer” sounds useful, but without proper verification it becomes a powerful attack primitive.
For DeFi protocols managing user assets, every action involving ownership, permissions, and fund movement should be reviewed from an attacker’s perspective.
PandaSecurity helps Web3 teams identify smart contract vulnerabilities through manual security research, protocol analysis, and comprehensive smart contract audits.
On 4 December 2026, an attacker flash-borrowed 50 million USDC from Morpho, deposited it into the PeakDeFiFund contract through depositUSDC() while registering their own referrer contract, and captured 99.9692% of the current referral cycle's commission weight in the same block — because the fund paid referral commissions based on the balance at redemption time rather than deposits that persisted across a cycle. The fund paid out 33,819.89 USDC, the attacker burned the temporary shares, withdrew the principal, repaid the flash loan, and kept ~15,219 USDC plus ~1.07 ETH.
On 5 December 2026, an attacker used the buyTargetNFT() function in TokenWorks' NFTStrategy contracts to point a strategy vault at Seaport, list the vault's entire NFT inventory as its own seller at 1 wei each — skipping the marketplace signature check because the offerer was the caller — and drain ~418 NFTs across Chimpers, Quirkies and Sweeps in a single block; 343 Chimpers were recovered to the treasury within four hours via an ERC721C blacklist.
On 3 December 2026, an unauthorized Wormhole price message published from the attacker's own Base wallet set SPY's price to $2 billion on Hydration, turning a 0.01 SPY deposit into roughly $20 million of paper collateral and enabling 19 borrows across 17 assets in about 90 seconds; approximately 1,421 ETH (~$2.23M) left the protocol.
On 2 December 2026, an attacker turned 1 APE into 268,435,456 book APE in a single transaction by abusing ApeChain's native yield accounting during SELFDESTRUCT reverts, then bridged 138 million of them through the official LayerZero route and released 138 million real APE from the ApeCoin Staking contract on Ethereum — about $9.87M.