Palmswap, Biswap, LibertiVault: When Price Curves, Permissions, a
Palmswap's PLP token price calculation used different exchange rates for adding and removing liquidity, allowing an attacker to mint PLP at 1:1 and sell at 1.9:1 for profit. LibertiVault's deposit function lacked a reentrancy check, letting an attacker reenter before totalSupply updated and mint extra coins.
DeFi’s weakest links were on full display: Palmswap mispriced liquidity, letting attackers print money via exchange rate asymmetry. LibertiVault let deposits reenter before supply updates, handing out extra rewards.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the PLP price calculation used inconsistent exchange rates for minting and burning, and the deposit function lacked a reentrancy guard.
Impact
The attacker could profit about $900K from Palmswap and about $450K from LibertiVault; the text does not mention any defence that limited the exploits.
What the attacker needed
Flash loan access; vulnerable contract deployed
How it was found
- Borrow 1M USDT via flash loan.
- Mint 996,324 PLP at a 1:1 rate.
- Sell the PLP at a 1.9:1 rate for a profit of 901,455 USDT.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A smart contract is a program on a blockchain that holds and moves money automatically. In the first bug, the contract valued its own token differently when you put money in versus when you took it out, so someone could put money in cheaply and take it out at a higher value. In the second, a function could be called again before it finished updating its records, so the attacker got credited twice.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.