HYPE Price: $32.48 (-5.47%)
 

Overview

HYPE Balance

HyperEVM LogoHyperEVM LogoHyperEVM Logo0 HYPE

HYPE Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
192858762025-11-15 16:11:0074 days ago1763223060  Contract Creation0 HYPE
Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x385cE59D...2132C6a11
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
PendleSparkLinearDiscountOracle

Compiler Version
v0.8.29+commit.ab55807c

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
shanghai EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: SEE LICENSE IN LICENSE
pragma solidity ^0.8.19;

import {IPChainlinkOracleEssential} from "../../interfaces/IPChainlinkOracleEssential.sol";

contract PendleSparkLinearDiscountOracle is IPChainlinkOracleEssential {
    uint256 private constant SECONDS_PER_YEAR = 365 days;
    uint256 private constant ONE = 1e18;

    address public immutable PT;
    uint256 public immutable maturity;
    uint256 public immutable baseDiscountPerYear; // 100% = 1e18

    constructor(address _pt, uint256 _baseDiscountPerYear) {
        require(_baseDiscountPerYear <= 1e18, "invalid discount");
        require(_pt != address(0), "zero address");

        PT = _pt;
        maturity = PTExpiry(PT).expiry();
        baseDiscountPerYear = _baseDiscountPerYear;
    }

    function latestRoundData()
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
    {
        uint256 timeLeft = (maturity > block.timestamp) ? maturity - block.timestamp : 0;
        uint256 discount = getDiscount(timeLeft);

        require(discount <= ONE, "discount overflow");

        return (0, int256(ONE - discount), 0, 0, 0);
    }

    function decimals() external pure returns (uint8) {
        return 18;
    }

    function getDiscount(uint256 timeLeft) public view returns (uint256) {
        return (timeLeft * baseDiscountPerYear) / SECONDS_PER_YEAR;
    }
}

interface PTExpiry {
    function expiry() external view returns (uint256);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IPChainlinkOracleEssential {
    function decimals() external view returns (uint8);

    function latestRoundData()
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

Settings
{
  "remappings": [
    "node_modules/@layerzerolabs/test-devtools-evm-foundry/:forge-std/=node_modules/forge-std/src/",
    "node_modules/@layerzerolabs/oapp-evm/:@openzeppelin/=node_modules/@openzeppelin/",
    "node_modules/@layerzerolabs/oft-evm/:@openzeppelin/=node_modules/@openzeppelin/",
    "node_modules/@layerzerolabs/:@openzeppelin/=node_modules/@openzeppelin-v5/",
    "@axelar-network/=node_modules/@axelar-network/",
    "@chainlink/=node_modules/@chainlink/",
    "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
    "@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",
    "@openzeppelin-v5/contracts/=node_modules/@openzeppelin-v5/contracts/",
    "@openzeppelin-v5/contracts-upgradeable/=node_modules/@openzeppelin-v5/contracts-upgradeable/",
    "@prb/test/=node_modules/@prb/test/",
    "forge-std/=node_modules/forge-std/",
    "@eth-optimism/=node_modules/@eth-optimism/",
    "@layerzerolabs/=node_modules/@layerzerolabs/",
    "ds-test/=lib/surl/lib/forge-std/lib/ds-test/src/",
    "@pendle/core-v2/=lib/pendle-core-v2/",
    "pendle-sy/=lib/pendle-sy/contracts/",
    "hardhat-deploy/=node_modules/hardhat-deploy/",
    "solidity-bytes-utils/=node_modules/solidity-bytes-utils/",
    "solidity-stringutils/=lib/surl/lib/solidity-stringutils/src/",
    "surl/=lib/surl/src/",
    "pendle-core-v2/=lib/pendle-core-v2/contracts/",
    "pendle-core-v3/=lib/pendle-core-v3/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_pt","type":"address"},{"internalType":"uint256","name":"_baseDiscountPerYear","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"PT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseDiscountPerYear","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"timeLeft","type":"uint256"}],"name":"getDiscount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maturity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

0x60e080604052346100eb5760408161055d803803809161001f828561016e565b8339810103126100eb578051906001600160a01b038216908183036100eb576020015191670de0b6b3a76400008311610136578115610102576080526040516370c264df60e11b815290602090829060049082905afa9081156100f7575f916100c1575b5060a05260c0526040516103b790816101a68239608051816101f6015260a051818181608e0152610322015260c05181818161024f01526103470152f35b90506020813d6020116100ef575b816100dc6020938361016e565b810103126100eb57515f610083565b5f80fd5b3d91506100cf565b6040513d5f823e3d90fd5b60405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a5908191a5cd8dbdd5b9d60821b6044820152606490fd5b601f909101601f19168101906001600160401b0382119082101761019157604052565b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f3560e01c908163204f83f9146102ef575080632336dbe4146102ab578063313ce56714610272578063598e54511461021a578063d94073d4146101ac5763feaf968c1461005e575f80fd5b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a8577f00000000000000000000000000000000000000000000000000000000000000004281111561019e57428103908111610113576100c890610345565b670de0b6b3a7640000811161014057670de0b6b3a764000003670de0b6b3a764000081116101135760a090604051905f825260208201525f60408201525f60608201525f6080820152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f646973636f756e74206f766572666c6f770000000000000000000000000000006044820152fd5b506100c85f610345565b5f80fd5b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a857602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a85760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a857602060405160128152f35b346101a85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a85760206102e7600435610345565b604051908152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a8576020907f00000000000000000000000000000000000000000000000000000000000000008152f35b7f000000000000000000000000000000000000000000000000000000000000000090818102918183041490151715610113576301e1338090049056fea26469706673582212201cd8ffc92fecb5270418dee3f4267badcdba667b925c8423dc249be02c63808d64736f6c634300081d0033000000000000000000000000ea84ca9849d9e76a78b91f221f84e9ca065fc9f500000000000000000000000000000000000000000000000002a303fe4b530000

Deployed Bytecode

0x6080806040526004361015610012575f80fd5b5f3560e01c908163204f83f9146102ef575080632336dbe4146102ab578063313ce56714610272578063598e54511461021a578063d94073d4146101ac5763feaf968c1461005e575f80fd5b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a8577f0000000000000000000000000000000000000000000000000000000069bb3c804281111561019e57428103908111610113576100c890610345565b670de0b6b3a7640000811161014057670de0b6b3a764000003670de0b6b3a764000081116101135760a090604051905f825260208201525f60408201525f60608201525f6080820152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f646973636f756e74206f766572666c6f770000000000000000000000000000006044820152fd5b506100c85f610345565b5f80fd5b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a857602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ea84ca9849d9e76a78b91f221f84e9ca065fc9f5168152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a85760206040517f00000000000000000000000000000000000000000000000002a303fe4b5300008152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a857602060405160128152f35b346101a85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a85760206102e7600435610345565b604051908152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a8576020907f0000000000000000000000000000000000000000000000000000000069bb3c808152f35b7f00000000000000000000000000000000000000000000000002a303fe4b53000090818102918183041490151715610113576301e1338090049056fea26469706673582212201cd8ffc92fecb5270418dee3f4267badcdba667b925c8423dc249be02c63808d64736f6c634300081d0033

Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.