PuffinSwap Rug Pull

Reported loss Not disclosed
BNB Chain
Rugpull

What happened

PuffinSwap's yield-farming contract takes more of a depositor's LP tokens than it credits, never gives LP tokens back on withdrawal, and lets its owner sweep every pool's LP balance to a developer address. De.Fi's REKT database lists PuffinSwap (PUFFIN) as an Exit Scam/Rugpull dated 2021-08-31 on BNB Chain, with no loss figure. The verified farm contract is at 0x387ab2f2…991C0D, deployed on 2021-07-15 by 0x0b03db60…57F3e5, which is also the address in De.Fi's proof link.

The code shows what the contract allows; no transaction was opened that shows the sweep function being called.

How it happened

  1. A user approves the farm and calls deposit(_pid, _amount, _referrer). The function reads the caller's whole LP balance with uint256 balLp = pool.lpToken.balanceOf(address(msg.sender)); and pulls all of it with pool.lpToken.safeTransferFrom(address(msg.sender), address(this), balLp);, regardless of _amount.
  2. Only _amount (minus any deposit fee) is written to the user's record: user.amount = user.amount.add(_amount);. Any LP tokens held beyond _amount are transferred into the contract without being credited to anyone.
  3. The user then earns PUFFIN rewards as usual. payOrLockupPendingPuffin pays rewards through safePuffinTransfer, so the farm appears to work and PUFFIN is minted to depositors.
  4. withdraw(_pid, _amount) only lowers the bookkeeping: user.amount = user.amount.sub(_amount);. The function contains no token transfer, and emergencyWithdraw only sets user.amount = 0;. The only safeTransfer calls on LP tokens in the contract send to feeAddress (deposit fee) and to devAddress (dynamic()), so no code path returns LP tokens to a depositor.
  5. The owner can call dynamic(): it loops over every pool and runs lpToken.safeTransfer(devAddress, balLp); for the contract's entire LP balance. The owner can also make this call at any time, and renounceOwnership() exists but would only matter if it had been called.
  6. What happened: De.Fi's REKT database lists the project as an Exit Scam/Rugpull on 2021-08-31. The BscScan proof link could not be opened, so the amount and the transactions involved are not established here.

Protocol details

Classification Exchange (DEX)
Protocol Type Exit Scam/Rugpull
Affected asset / contract PUFFIN
Protocol links Website

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.