Dor Rug Pull
What happened
Dor (DOR) was a BEP20 token on BNB Chain (contract 0x66CeFFdd…E8a819) deployed on 2023-11-21 by 0xB62676f1…938a56. The token contract keeps no balances of its own: balanceOf and every transfer are delegated to a separate accounting contract whose address only the owner can set. PeckShield's alert on 2023-11-22 reported DOR down 100% and said the address 0xB626...8a56 had swapped 100,100,100,100,100,100,100.1 DOR for 1,014.39 WBNB (about 258.5K USD); that DOR amount is far larger than the 1,000,000 DOR supply declared in the constructor.
De.Fi's REKT database records a rug pull by the deployer with a loss of 102,731 USD (403.18 WBNB) from the PancakeSwap pool on 2023-11-21: the deployer added liquidity and removed it within a short time, and the funds were moved to another EOA and then distributed among multiple addresses. The listing's liquidity removal transaction is 0x414a25bb…71ee9b.
How it happened
What the verified code of Dor allows:
- Balances live outside the token:
function balanceOf(address who) view public returns (uint256) { return Accounting(accounting).balanceOf(who); }. The token only declares_totalSupply = 1000000 * 10 ** 9;and emits one mint event in the constructor; it stores no balance mapping. - The owner (
address public owner = msg.sender;) can pointaccountingat any contract withfunction setAccountingAddress(address accountingAddress) public { require(msg.sender == owner); accounting = accountingAddress; }. There is no restriction on what that contract does, and the setter works untilrenounceOwnershipis called. transferandtransferFromdoemit Transfer(...)first and then return whateverAccounting(accounting).doTransfer(...)returns, so the logged events do not prove that any balance changed, and the accounting contract can apply any balance, fee or blocking rule to any address.- Because the accounting contract is separate and its code was not examined, the supply cap in the token (1,000,000 DOR) does not bind what balances it reports.
What was reported (separate from what the code allows): PeckShield saw the deployer address swap about 1.001e20 DOR, far above the declared supply, for 1,014.39 WBNB. De.Fi lists the deployer adding and then removing PancakeSwap liquidity and distributing the proceeds, for 102,731 USD (403.18 WBNB). No transaction was opened showing which accounting contract was set or what it did.
Protocol details
Evidence
- report PeckShieldAlert post on Dor, 2023-11-22 twitter.com
- transaction bscscan.com transaction 0x414a…ee9b bscscan.com
- address Dor verified source (BscScan code tab) bscscan.com
- address bscscan.com address 0xB626…8a56 bscscan.com
- analysis Dor Sourcify match repo.sourcify.dev
- analysis De.Fi REKT database entry for DOR de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.