Wallstreetswap Finance Rug Pull
What happened
WallStreetSwap Finance was a PancakeSwap-style DEX on BNB Chain with swapping, farming and staking, and its WALLST token was deployed on 14 February 2021. The backdoor sat in its pair contract: when the factory 0xd395ce2b…611d6c created a pool, the pool's initialize approved the factory's feeToSetter, the address that deployed the factory, to spend an unlimited amount of both pooled tokens. That address could therefore call transferFrom on any pool and take its reserves without holding LP tokens.
De.Fi's REKT database lists this as a rug pull on 15 February 2021 costing liquidity providers about $2.9 million, names 0xa7524ec3…778304 as the deployer, and cites transactions 0xb8fb142a…c0a5a3 and 0xb0548033…ca6d26 as examples of pools being drained, followed by 0x92d301e0…52d7e7, in which the BNB was sent to another address.
How it happened
- The factory constructor stores its deployer as
feeToSetter = msg.sender. createPairdeploys each pool withcreate2and callsWallStreetSwapPair(pair).initialize(token0, token1, feeToSetter), passingfeeToSetterinto a parameter misleadingly named_factory.initializerunsIBEP20WallStreetSwap(_token0).approve(_factory, uint(-1))and the same for_token1, so each new pool gives the fee setter an unlimited allowance over both of its tokens. The approval is set once per pool and stays even iffeeToSetteris later changed.- With that allowance, the fee setter can call
transferFrom(pair, recipient, amount)on each pooled token and move the reserves out directly. The pair'sswap,mintandburnfunctions never see it, and LP holders are left with claims on an emptied pool. - De.Fi's REKT database cites drain transactions from the deployer and a final transfer of the collected BNB to a separate address, with total losses of about $2.9 million.
Protocol details
Evidence
- report WallStreetSwapFactory verified source on Sourcify (0xd395ce2bbc62eeb612bd4c41d51ef4b6bf611d6c) repo.sourcify.dev
- transaction WALLST token contract creation transaction bscscan.com
- transaction bscscan.com transaction 0x92d3…d7e7 bscscan.com
- transaction bscscan.com transaction 0xb054…6d26 bscscan.com
- transaction bscscan.com transaction 0xb8fb…a5a3 bscscan.com
- address WALLSTToken (WallStreetSwap.Finance, WALLST) verified source code bscscan.com
- address bscscan.com address 0xa752…8304 bscscan.com
- address bscscan.com address 0xd395…code bscscan.com
- analysis DeFi Scams: Rug Pull Analysis, WallStreetSwap Finance (y-pakorn, Medium) y-pakorn.medium.com
- analysis Sourcify match for 0x2dc38868a9215a1347c6fd8480d4a127da4812eb on BNB Chain repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.