Skip to content
Audit finding Intermediate

`PendlePTOracle._getPTRate` isn't correct for some market

The PendlePTOracle._getPTRate function assumes the ptRate returned by Pendle's oracle is always in 1e18 decimals, but for some markets the getPtToSyRate function returns a rate with more decimals. This causes the oracle to return an incorrect price for those markets.

jasonxiale Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/623

Found by

jasonxiale

Summary

Quoting from the comment

ptRate is always returned in 1e18 decimals

The PendlePTOracle._getPTRate function assumes ptRate is always in 1e18 decimals, which isn't correct for some market.

Root Cause

In function PendlePTOracle._getPTRate, two AIP will be called: PENDLE_ORACLE.getPtToSyRate and PENDLE_ORACLE.getPtToAssetRate.

Solidity
 60     /// @dev ptRate is always returned in 1e18 decimals
 61     function _getPTRate() internal view returns (int256) {
 62         uint256 ptRate = useSyOracleRate ?
 63             PENDLE_ORACLE.getPtToSyRate(pendleMarket, twapDuration) :
 64             PENDLE_ORACLE.getPtToAssetRate(pendleMarket, twapDuration);
 65         return ptRate.toInt();
 66     }
  1. function PENDLE_ORACLE.getPtToAssetRate will always return ptRate in 1e18 decimals
  2. function PENDLE_ORACLE.getPtToSyRate will return ptRate in larger decimals for some markets.

For example: market 0x83916356556f51dcBcB226202c3efeEfc88d5eaA, 0x9471d9c5B57b59d42B739b00389a6d520c33A7a9, 0x08946D1070bab757931d39285C12FEf4313b667B, 0x1C3bA40210fa290de13c62Fe1a9EfcB694725D10, 0x0271A803f0d3Dec9cCd105A4A4d41e6Ee1458765, 0xEDda7526EC81055F2af99d51D968FC2FBca9Ee96, 0xE4AF6375F4424b61B91A1E96b9dE6ff8E842AA3A Becase PENDLE_ORACLE is defined as 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8, we can query those market direct from the cast.

Bash
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x83916356556f51dcBcB226202c3efeEfc88d5eaA 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x9471d9c5B57b59d42B739b00389a6d520c33A7a9 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x08946D1070bab757931d39285C12FEf4313b667B 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x1C3bA40210fa290de13c62Fe1a9EfcB694725D10 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x0271A803f0d3Dec9cCd105A4A4d41e6Ee1458765 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0xEDda7526EC81055F2af99d51D968FC2FBca9Ee96 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0xE4AF6375F4424b61B91A1E96b9dE6ff8E842AA3A 3600;

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

For example: market 0x83916356556f51dcBcB226202c3efeEfc88d5eaA, 0x9471d9c5B57b59d42B739b00389a6d520c33A7a9, 0x08946D1070bab757931d39285C12FEf4313b667B, 0x1C3bA40210fa290de13c62Fe1a9EfcB694725D10, 0x0271A803f0d3Dec9cCd105A4A4d41e6Ee1458765, 0xEDda7526EC81055F2af99d51D968FC2FBca9Ee96, 0xE4AF6375F4424b61B91A1E96b9dE6ff8E842AA3A Becase PENDLE_ORACLE is defined as 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8, we can query those market direct from the cast.

Bash
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x83916356556f51dcBcB226202c3efeEfc88d5eaA 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x9471d9c5B57b59d42B739b00389a6d520c33A7a9 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x08946D1070bab757931d39285C12FEf4313b667B 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x1C3bA40210fa290de13c62Fe1a9EfcB694725D10 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0x0271A803f0d3Dec9cCd105A4A4d41e6Ee1458765 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0xEDda7526EC81055F2af99d51D968FC2FBca9Ee96 3600;
cast call -r https://eth-mainnet.public.blastapi.io 0x66a1096C6366b2529274dF4f5D8247827fe4CEA8 "getPtToSyRate(address,uint32)(uint256)"  0xE4AF6375F4424b61B91A1E96b9dE6ff8E842AA3A 3600;

Impact

Incorrect ptRate will cause the incrrect price returned by the oracle.

PoC

No response

Mitigation

No response

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/notional-finance/notional-v4/pull/29

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

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

Impact

Incorrect ptRate will cause the incorrect price returned by the oracle.

What the attacker needed

None

The fix

The protocol team fixed this issue in the following PRs/commits: https://github.com/notional-finance/notional-v4/pull/29

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.

This is a smart contract bug where a price oracle (a service that provides asset prices) incorrectly assumes all prices have the same number of decimal places. Some markets return prices with more decimals, so the oracle's calculation is wrong, leading to incorrect pricing.

More by jasonxiale

View all

25 more disclosed reports, best first.

More from Notional Exponent

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.