Skip to content
Verified contractPartialGPL-3.0-or-later

PendleMarketV3

Address0x977ebf77581f94de969349549ab2108a681e8f4c
Balance

0 ETH

 

Transactions

236

 

Compiler

solc 0.8.24

 

Same code

272 more contracts

 

Details

Compiler
solc 0.8.24+commit.e11b9ed9
Language
solidity
Optimization
Yes, 1,000,000 runs
EVM version
paris
Via IR
yes
License
GPL-3.0-or-later
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
20,920,258
Creation transaction
0x3bfa3a5ea4…5f4343bfb0
Main copy (most transactions)
0x85667e48…ccf46e97
Libraries
contracts/pendle/contracts/core/Market/OracleLib.sol:OracleLib0x83d6…ffba57

Read21

  • _storage() → (int128,int128,uint96,uint16,uint16,uint16)
  • activeBalance(address) → (uint256)
  • allowance(address,address) → (uint256)
  • balanceOf(address) → (uint256)
  • decimals() → (uint8)
  • expiry() → (uint256)
  • factory() → (address)
  • getNonOverrideLnFeeRateRoot() → (uint80)
  • getRewardTokens() → (address[])
  • isExpired() → (bool)
  • lastRewardBlock() → (uint256)
  • name() → (string)
  • observations(uint256) → (uint32,uint216,bool)
  • observe(uint32[]) → (uint216[])
  • readState(address) → (tuple)
  • readTokens() → (address,address,address)
  • rewardState(address) → (uint128,uint128)
  • symbol() → (string)
  • totalActiveSupply() → (uint256)
  • totalSupply() → (uint256)
  • userReward(address,address) → (uint128,uint128)

Write10

  • approve(address,uint256) → (bool)
  • burn(address,address,uint256) → (uint256,uint256)
  • increaseObservationsCardinalityNext(uint16)
  • mint(address,uint256,uint256) → (uint256,uint256,uint256)
  • redeemRewards(address) → (uint256[])
  • skim()
  • swapExactPtForSy(address,uint256,bytes) → (uint256,uint256)
  • swapSyForExactPt(address,uint256,bytes) → (uint256,uint256)
  • transfer(address,uint256) → (bool)
  • transferFrom(address,address,uint256) → (bool)

Events8

  • Approval(address,address,uint256)
  • Burn(address,address,uint256,uint256,uint256)
  • IncreaseObservationCardinalityNext(uint16,uint16)
  • Mint(address,uint256,uint256,uint256)
  • RedeemRewards(address,uint256[])
  • Swap(address,address,int256,int256,uint256,uint256)
  • Transfer(address,address,uint256)
  • UpdateImpliedRate(uint256,uint256)

Errors13

  • MarketExchangeRateBelowOne(int256)
  • MarketExpired()
  • MarketInsufficientPtForTrade(int256,int256)
  • MarketInsufficientPtReceived(uint256,uint256)
  • MarketInsufficientSyReceived(uint256,uint256)
  • MarketProportionMustNotEqualOne()
  • MarketProportionTooHigh(int256,int256)
  • MarketRateScalarBelowZero(int256)
  • MarketScalarRootBelowZero(int256)
  • MarketZeroAmountsInput()
  • MarketZeroAmountsOutput()
  • MarketZeroLnImpliedRate()
  • MarketZeroTotalPtOrTotalAsset(int256,int256)

ABI as JSON

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_PT",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_scalarRoot",
        "type": "int256",
        "internalType": "int256"
      },
      {
        "name": "_initialAnchor",
        "type": "int256",
        "internalType": "int256"
      },
      {
        "name": "_lnFeeRateRoot",
        "type": "uint80",
        "internalType": "uint80"
      },
      {
        "name": "_vePendle",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_gaugeController",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "MarketExchangeRateBelowOne",
    "type": "error",
    "inputs": [
      {
        "name": "exchangeRate",
        "type": "int256",
        "internalType": "int256"
      }
    ]
  },
  {
    "name": "MarketExpired",
    "type": "error",
    "inputs": []
  },
  {
    "name": "MarketInsufficientPtForTrade",
    "type": "error",
    "inputs": [
      {
        "name": "currentAmount",
        "type": "int256",
        "internalType": "int256"
      },
      {
        "name": "requiredAmount",
        "type": "int256",
        "internalType": "int256"
      }
    ]
  },
  {
    "name": "MarketInsufficientPtReceived",
    "type": "error",
    "inputs": [
      {
        "name": "actualBalance",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "requiredBalance",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "name": "MarketInsufficientSyReceived",
    "type": "error",
    "inputs": [
      {
        "name": "actualBalance",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "requiredBalance",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "name": "MarketProportionMustNotEqualOne",
    "type": "error",
    "inputs": []
  },
  {
    "name": "MarketProportionTooHigh",
    "type": "error",
    "inputs": [
      {
        "name": "proportion",
        "type": "int256",
        "internalType": "int256"
      },
      {
        "name": "maxProportion",
        "type": "int256",
        "internalType": "int256"
      }
    ]
  },
  {
    "name": "MarketRateScalarBelowZero",
    "type": "error",
    "inputs": [
      {
        "name": "rateScalar",
        "type": "int256",
        "internalType": "int256"
      }
    ]
  },
  {
    "name": "MarketScalarRootBelowZero",
    "type": "error",
    "inputs": [
      {
        "name": "scalarRoot",
        "type": "int256",
        "internalType": "int256"
      }
    ]
  },
  {
    "name": "MarketZeroAmountsInput",
    "type": "error",
    "inputs": []
  },
  {
    "name": "MarketZeroAmountsOutput",
    "type": "error",
    "inputs": []
  },
  {
    "name": "MarketZeroLnImpliedRate",
    "type": "error",
    "inputs": []
  },
  {
    "name": "MarketZeroTotalPtOrTotalAsset",
    "type": "error",
    "inputs": [
      {
        "name": "totalPt",
        "type": "int256",
        "internalType": "int256"
      },
      {
        "name": "totalAsset",
        "type": "int256",
        "internalType": "int256"
      }
    ]
  },
  {
    "name": "Approval",
    "type": "event",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "spender",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "value",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Burn",
    "type": "event",
    "inputs": [
      {
        "name": "receiverSy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "receiverPt",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "netLpBurned",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "netSyOut",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "netPtOut",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "IncreaseObservationCardinalityNext",
    "type": "event",
    "inputs": [
      {
        "name": "observationCardinalityNextOld",
        "type": "uint16",
        "indexed": false,
        "internalType": "uint16"
      },
      {
        "name": "observationCardinalityNextNew",
        "type": "uint16",
        "indexed": false,
        "internalType": "uint16"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Mint",
    "type": "event",
    "inputs": [
      {
        "name": "receiver",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "netLpMinted",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "netSyUsed",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "netPtUsed",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "RedeemRewards",
    "type": "event",
    "inputs": [
      {
        "name": "user",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "rewardsOut",
        "type": "uint256[]",
        "indexed": false,
        "internalType": "uint256[]"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Swap",
    "type": "event",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "receiver",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "netPtOut",
        "type": "int256",
        "indexed": false,
        "internalType": "int256"
      },
      {
        "name": "netSyOut",
        "type": "int256",
        "indexed": false,
        "internalType": "int256"
      },
      {
        "name": "netSyFee",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "netSyToReserve",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Transfer",
    "type": "event",
    "inputs": [
      {
        "name": "from",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "to",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "value",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "UpdateImpliedRate",
    "type": "event",
    "inputs": [
      {
        "name": "timestamp",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "lnLastImpliedRate",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "_storage",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "totalPt",
        "type": "int128",
        "internalType": "int128"
      },
      {
        "name": "totalSy",
        "type": "int128",
        "internalType": "int128"
      },
      {
        "name": "lastLnImpliedRate",
        "type": "uint96",
        "internalType": "uint96"
      },
      {
        "name": "observationIndex",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "observationCardinality",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "observationCardinalityNext",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "activeBalance",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "allowance",
    "type": "function",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "spender",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "approve",
    "type": "function",
    "inputs": [
      {
        "name": "spender",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "balanceOf",
    "type": "function",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "burn",
    "type": "function",
    "inputs": [
      {
        "name": "receiverSy",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "receiverPt",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "netLpToBurn",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "netSyOut",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "netPtOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "decimals",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "expiry",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "factory",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getNonOverrideLnFeeRateRoot",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint80",
        "internalType": "uint80"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getRewardTokens",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "increaseObservationsCardinalityNext",
    "type": "function",
    "inputs": [
      {
        "name": "cardinalityNext",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "isExpired",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "lastRewardBlock",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "mint",
    "type": "function",
    "inputs": [
      {
        "name": "receiver",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "netSyDesired",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "netPtDesired",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "netLpOut",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "netSyUsed",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "netPtUsed",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "name",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "observations",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "blockTimestamp",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "lnImpliedRateCumulative",
        "type": "uint216",
        "internalType": "uint216"
      },
      {
        "name": "initialized",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "observe",
    "type": "function",
    "inputs": [
      {
        "name": "secondsAgos",
        "type": "uint32[]",
        "internalType": "uint32[]"
      }
    ],
    "outputs": [
      {
        "name": "lnImpliedRateCumulative",
        "type": "uint216[]",
        "internalType": "uint216[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "readState",
    "type": "function",
    "inputs": [
      {
        "name": "router",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "market",
        "type": "tuple",
        "components": [
          {
            "name": "totalPt",
            "type": "int256",
            "internalType": "int256"
          },
          {
            "name": "totalSy",
            "type": "int256",
            "internalType": "int256"
          },
          {
            "name": "totalLp",
            "type": "int256",
            "internalType": "int256"
          },
          {
            "name": "treasury",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "scalarRoot",
            "type": "int256",
            "internalType": "int256"
          },
          {
            "name": "expiry",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "lnFeeRateRoot",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "reserveFeePercent",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "lastLnImpliedRate",
            "type": "uint256",
            "internalType": "uint256"
          }
        ],
        "internalType": "struct MarketState"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "readTokens",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "_SY",
        "type": "address",
        "internalType": "contract IStandardizedYield"
      },
      {
        "name": "_PT",
        "type": "address",
        "internalType": "contract IPPrincipalToken"
      },
      {
        "name": "_YT",
        "type": "address",
        "internalType": "contract IPYieldToken"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "redeemRewards",
    "type": "function",
    "inputs": [
      {
        "name": "user",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256[]",
        "internalType": "uint256[]"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "rewardState",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "index",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "lastBalance",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "skim",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "swapExactPtForSy",
    "type": "function",
    "inputs": [
      {
        "name": "receiver",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "exactPtIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "data",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [
      {
        "name": "netSyOut",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "netSyFee",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "swapSyForExactPt",
    "type": "function",
    "inputs": [
      {
        "name": "receiver",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "exactPtOut",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "data",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [
      {
        "name": "netSyIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "netSyFee",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "symbol",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "totalActiveSupply",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "totalSupply",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "transfer",
    "type": "function",
    "inputs": [
      {
        "name": "to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "transferFrom",
    "type": "function",
    "inputs": [
      {
        "name": "from",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "userReward",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "index",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "accrued",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "stateMutability": "view"
  }
]

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.