PendlePowerManager is incompatible with PendleRouterV3
The PendlePowerManager contract calls Pendle router functions using signatures from an older router version, but the latest PendleRouterV3 added a new parameter, causing those calls to revert. An attacker could not exploit this directly, but it prevents users from opening farm positions.
Will cause revert when attempting to open a farm position.
Proof of Concept
The latest deployment of the Pendle router, PendleRouterV3, is incompatible with the PendlePowerManager contract. The sponsor is expecting full compatibility with both but this is not the case here. The problem stems from the calls made to PENDLE_ROUTER.removeLiquiditySingleSy() and PENDLE_ROUTER.addLiquiditySingleSy():
There’s a new parameter called limit that’s not accounted for in the calls in the PendlePowerFarmLeverageLogic helper contract. This will lead to calls always reverting with RouterInvalidAction due to Pendle’s proxy not being able to locate the selector used.
By definition a codebase can never be guaranteed to be compatible with the latest version. Requesting warden to provide evidence lack of integration with V3 achieves M+ severity.
@Trust - The reason why I reported this was because the sponsor told me they expect compatibility with both. The problem is that an older version of pendle router is used here and the calls for addLiquiditySingleSy() and removeLiquiditySingleSy() are basically incompatible with the new one and will revert because of a missing parameter. To understand the rationale behind this submission, let’s examine the deployed contracts:
readState() on all markets reaches out to the factory contract it was deployed with to grab the market configuration. And there are two versions: MarketFactory and MarketFactoryV3. Again, both can be found in the docs but here are the links:
You can take a market from the docs and query Market::isValidMarket(). Using the first one, the old factory will return true whereas the new one, false.
So basically what this all means is that the protocol won’t be able to use new markets. Pendle can start phasing out the old ones and migrating them over. The fix is rather easy on the protocol’s end, they just need to account for the newly added parameter and can support both, if they wish, using a conditional check.
The original report as published on Code4rena, by NentoR. 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.
Generating the AI write-up for this report.
This usually takes about a minute. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
How it worked
Root cause
The contract calls Pendle router functions with an outdated signature that lacks the new `limit` parameter introduced in PendleRouterV3.
Impact
Opening a farm position reverts, preventing users from using the protocol with the latest Pendle router; the text does not claim any direct loss of funds.
What the attacker needed
PendleRouterV3 deployed; PendlePowerManager uses old router calls
The fix
The issue was mitigated by updating the contract to account for the new parameter, as indicated by the sponsor's comment.
How it was found
Deploy or use the PendlePowerManager with the PendleRouterV3 address.
Attempt to open a farm position, which triggers a call to addLiquiditySingleSy or removeLiquiditySingleSy.
The call reverts with RouterInvalidAction because the function selector is not found.
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.
Generating the AI write-up for this report.
This usually takes about a minute. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
Smart contracts often call functions on other contracts. If the other contract changes its function signature (the list of inputs it expects), old calls will fail. Here, the Pendle router was updated to require an extra input, so the Wise Lending contract's calls no longer work and transactions revert.
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.