Ba5ic finance Rug Pull
What happened
Ba5ic Finance (BASIC) is a fee-token template whose owner-only setFeeTransfer(address _feeDistributor, uint256 feeValue) is a mint in disguise. It assigns feeValue to any address's balance and adds the same amount to _totalSupply, without emitting a Transfer event. The fee settings in the template do nothing, because _transfer never calls the fee calculation.
Per Etherscan, the deployer address 0xE3344CEC…3AfC86 added 20 ETH and 40,000 BASIC to Uniswap V2 on 2020-12-02 (tx 0x789fa9d7…90cdbb), called setFeeTransfer with its own address as the recipient (tx 0xbeeb0966…1855c1), and 52 seconds later swapped 100 million BASIC for 21.76 ETH (tx 0x07f1a03e…ab94b0). De.Fi's REKT database lists the incident as an Exit Scam/Rugpull with a 1,055 USD loss.
How it happened
- The constructor of
Ba5icFinanceonly sets the name and symbol, so no tokens are created at deployment. The only code that raises_totalSupplyissetFeeTransfer. setFeeTransferisownerOnlyand runs_balances[_feeDistributor] = feeValue; _totalSupply = _totalSupply.add(feeValue);. Despite its comment (transfer collected fee value to fee dristributor), it takes no tokens from anyone: it overwrites the recipient's balance with an owner-chosen number and grows the supply by the same amount. It emits no event, so explorers show no token transfer for the call.- The fee machinery cannot be what the name suggests:
_transferis a plain balance move (_balances[sender] = _balances[sender].sub(amount, ...)then_balances[recipient].add(amount)) and never callscalculateAmountsAfterFee, sotxFee,setFeeand the feeless whitelists have no effect on transfers. - On 2020-12-02 at 13:57 UTC the deployer paired 20 ETH and 40,000 BASIC in a new Uniswap V2 pool.
- At 14:43:03 UTC the deployer called
setFeeTransferwith_feeDistributorset to its own address (Etherscan shows the call with no token transfers, consistent with the code above). - At 14:43:55 UTC, 52 seconds later, it called
swapExactTokensForETHon Uniswap V2 Router 2 and sold 100 million BASIC for 21.76 ETH, against 20 ETH it had put into the pool.
Protocol details
Evidence
- report @CaptainJackAPE incident report twitter.com
- transaction Etherscan tx 0x789fa9d7... (addLiquidityETH) etherscan.io
- transaction Etherscan tx 0xbeeb0966... (setFeeTransfer) etherscan.io
- transaction Etherscan tx 0x07f1a03e... (swap BASIC for ETH) etherscan.io
- address Ba5icFinance verified source (Etherscan) etherscan.io
- analysis Web Archive web.archive.org
- analysis Sourcify exact match for 0xcd6C56A778681a969AEd4eA09DCB2Ad8d81d4D36 repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.