Daughter Doge Revenge Token Rug Pull
What happened
DDR is a BEP20 token whose verified source gives the owner a function that sets any holder's allowance, with no consent from that holder. De.Fi's REKT database lists it as an exit scam / rug pull, describing "hard rug code that can steal staked tokens at any time". The code lets the owner approve itself to spend any address's balance (including a contract that holds staked DDR) and then pull it out with transferFrom, burn any balance, and a minter role can mint without a cap.
No transaction, loss amount or attacker address is established by the sources opened for this record.
How it happened
- The contract
DDRextendsBEP20and adds an owner-only overload ofapprovewith three parameters:function approve(address owner, address spender, uint256 amount) public onlyOwner { _approve(owner, spender, amount); }. Unlike the standardapprove(spender, amount), which sets an allowance from_msgSender(), this one lets the owner write_allowances[owner][spender]for anyowneraddress it names. - With an allowance written over a holder's address (or over a contract that holds staked DDR, which is the case De.Fi's listing describes), the owner as
spendercan call the standardtransferFrom(sender, recipient, amount). That function runs_transfer(sender, recipient, amount)and then reduces_allowances[sender][_msgSender()]byamount, so the holder's balance is debited with no action from the holder. - The transfer tax does not stop this. In
DDR._transfer, a recipient other thanFEE_ADDRESSwith a non-zerotransferTaxRate(default 500, i.e. 5%, capped atMAXIMUM_TRANSFER_TAX_RATE1000) getsamount - taxAmount, andtaxAmountgoes toFEE_ADDRESS; the fullamountleaves the holder either way. - Two further owner-or-minter powers sit beside this:
function burn(address _from, uint256 _amount) public onlyOwner { _burn(_from, _amount); }destroys any address's tokens, andfunction mint(address _to, uint256 _amount) public onlyMinter { _mint(_to, _amount); }has no supply cap.MinterRole's constructor calls_addMinter(msg.sender), so the deployer holds the minter role. - What the code allows is separate from what happened. The code contains
renounceOwnership()andrenounceMinter(), so these powers could be given up, and no opened source shows whether any holder's allowance was written or any balance moved. The contract currently reports owner 0x949adc6e…c5c283, which differs from the deployer 0x4a94ee3A…80E198; the ownership transfer transaction was not examined. De.Fi's REKT database lists the token as an exit scam / rug pull dated 2021-10-12.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.