CVL Honeypot
What happened
CARAVEL (CVL) wraps every transfer in a transferMiddleware modifier. While the owner-controlled flag ownerLock is on, the recipient of the first transferFrom is stored as _firstOwner, and every later transfer to that address reverts with "Order Is Pending.". A DEX router sells with transferFrom, so if _firstOwner is the liquidity pair, holders cannot sell.
Only the owner can switch the check off, with setOwnerLock(false). De.Fi's REKT database lists the token as an exit scam/honeypot in which the owner could disable the transfer function and restrict holders from selling; the contract is on BNB Smart Chain at 0xc90d7350…354ea6.
How it happened
- The
Ownableconstructor makes the deployer the owner and turns the check on:ownerLock = true;. TheCARAVELconstructor mints the whole supply to the deployer. transfercalls_transfer(_msgSender(), recipient, amount, true)andtransferFromcalls_transfer(sender, recipient, amount, false), so the last argument (handler) is true only for plain transfers. Both paths run thetransferMiddlewaremodifier.- The first time
transferFromruns whileownerLockis on and_firstOwneris unset, the modifier records the recipient:if(from != address(0) && _firstOwner == address(0) && !handler) _firstOwner = to;. No owner check applies here. The linked pattern write-up on similar tokens describes this first recipient being the liquidity pair. - From then on the modifier takes the other branch for every transfer and transferFrom:
else require(to != _firstOwner, "Order Is Pending.");. Anything sent to_firstOwnerreverts. - A sale through a DEX router calls
transferFrom(holder, pair, amount). If_firstOwneris the pair, the sale reverts. Buys, where the pair sends tokens to the buyer, and transfers to other addresses are not affected. - The flag is controlled by
function setOwnerLock(bool _ownerLock) public onlyOwner { ownerLock = _ownerLock; }. Setting it to false skips the whole check. No function resets_firstOwner, so while the flag is on the block stays on the same address.
The code allows this; no transaction was opened showing the owner changing ownerLock, and no source reports how much holders lost.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.