Skip to content
Business logic Audit finding Intermediate

PendleConnector incorrectly sends the redeemed PT tokens to the market

The PendleConnector's burnLP function passes the market address as the receiver of PT tokens when burning LP tokens, instead of the connector itself. This causes the redeemed PT tokens to be donated to the market, resulting in a loss of funds for the connector.

alexxander Follow with ArsenLupin, WinSec and 1 other

Originally disclosed on Code4rena

Submitted by alexxander, also found by ArsenLupin, WinSec, and 0xAlix2

Impact

Burning a Pendle LP will donate the PT tokens to the market instead of withdrawing them to the PendleConnector which leads to a loss of funds for the Connector.

Proof of Concept

The Pendle Market burn() function accepts as the first address parameter the receiver of the SY tokens and a second address parameter that is the receiver of the PT tokens. The issue is that in PendleConnecotr.burnLP(), the function market.burn()  selects the market as the receiver of the PT tokens, where it should be the PendleConnector i.e., address(this):

function burnLP(IPMarket market, uint256 amount) external onlyManager nonReentrant {
	IERC20(address(market)).safeTransfer(address(market), amount);
	// @audit -> address(market) should be address(this)
	market.burn(address(this), address(market), amount);
	market.skim();
	emit BurnLP(address(market), amount);
}
// PendleMarket.burn()
function burn(
	address receiverSy,
	address receiverPt,
	uint256 netLpToBurn
) external nonReentrant returns (uint256 netSyOut, uint256 netPtOut) {

Recommended Mitigation Steps

    function burnLP(IPMarket market, uint256 amount) external onlyManager nonReentrant {
        IERC20(address(market)).safeTransfer(address(market), amount);
-       market.burn(address(this), address(market), amount);
+       market.burn(address(this), address(this), amount);
        market.skim();
        emit BurnLP(address(market), amount);
    }

HadiEsna (NOYA) confirmed


The original report as published on Code4rena, by alexxander. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The burnLP function passes address(market) as the receiverPt parameter to market.burn, instead of address(this).

Impact

The connector loses the PT tokens that should have been returned to it, causing a direct loss of funds.

What the attacker needed

Manager role; Pendle LP tokens held by connector

The fix

The burnLP function should pass address(this) as the receiverPt parameter to market.burn.

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 report has not been written yet. The Original tab links to the source.

When you burn a liquidity provider (LP) token, you should get back two types of tokens: SY and PT. The code mistakenly tells the market to keep the PT tokens for itself rather than sending them to the connector's own address. As a result, the connector loses those PT tokens.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by alexxander

View all

10 more disclosed reports, best first.

More from NOYA

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.