ETH Price: $1,864.59 (-4.78%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x60e08060232829052025-09-03 13:32:35173 days ago1756906355  Contract Creation0 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x2AD358a2...7C007D08d
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.28+commit.7893614a

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;

contract PendleSparkLinearDiscountOracle {
    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);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "viaIR": true,
  "evmVersion": "shanghai",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "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"}]

0x60e080604052346100eb5760408161055d803803809161001f828561016e565b8339810103126100eb578051906001600160a01b038216908183036100eb576020015191670de0b6b3a76400008311610136578115610102576080526040516370c264df60e11b815290602090829060049082905afa9081156100f7575f916100c1575b5060a05260c0526040516103b790816101a68239608051816101f6015260a051818181608e0152610322015260c05181818161024f01526103470152f35b90506020813d6020116100ef575b816100dc6020938361016e565b810103126100eb57515f610083565b5f80fd5b3d91506100cf565b6040513d5f823e3d90fd5b60405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a5908191a5cd8dbdd5b9d60821b6044820152606490fd5b601f909101601f19168101906001600160401b0382119082101761019157604052565b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f3560e01c908163204f83f9146102ef575080632336dbe4146102ab578063313ce56714610272578063598e54511461021a578063d94073d4146101ac5763feaf968c1461005e575f80fd5b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a8577f00000000000000000000000000000000000000000000000000000000000000004281111561019e57428103908111610113576100c890610345565b670de0b6b3a7640000811161014057670de0b6b3a764000003670de0b6b3a764000081116101135760a090604051905f825260208201525f60408201525f60608201525f6080820152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f646973636f756e74206f766572666c6f770000000000000000000000000000006044820152fd5b506100c85f610345565b5f80fd5b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a857602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a85760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a857602060405160128152f35b346101a85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a85760206102e7600435610345565b604051908152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a8576020907f00000000000000000000000000000000000000000000000000000000000000008152f35b7f000000000000000000000000000000000000000000000000000000000000000090818102918183041490151715610113576301e1338090049056fea264697066735822122093412547ef46717938ff7b757db5c6fea123f297792bbcb6dd83138ac034e7e064736f6c634300081c0033000000000000000000000000711214da1a94f478b96c1ca3d14a750f496f2a8000000000000000000000000000000000000000000000000003e2c284391c0000

Deployed Bytecode

0x6080806040526004361015610012575f80fd5b5f3560e01c908163204f83f9146102ef575080632336dbe4146102ab578063313ce56714610272578063598e54511461021a578063d94073d4146101ac5763feaf968c1461005e575f80fd5b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a8577f0000000000000000000000000000000000000000000000000000000068e6fb004281111561019e57428103908111610113576100c890610345565b670de0b6b3a7640000811161014057670de0b6b3a764000003670de0b6b3a764000081116101135760a090604051905f825260208201525f60408201525f60608201525f6080820152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f646973636f756e74206f766572666c6f770000000000000000000000000000006044820152fd5b506100c85f610345565b5f80fd5b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a857602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000711214da1a94f478b96c1ca3d14a750f496f2a80168152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a85760206040517f00000000000000000000000000000000000000000000000003e2c284391c00008152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a857602060405160128152f35b346101a85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a85760206102e7600435610345565b604051908152f35b346101a8575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a8576020907f0000000000000000000000000000000000000000000000000000000068e6fb008152f35b7f00000000000000000000000000000000000000000000000003e2c284391c000090818102918183041490151715610113576301e1338090049056fea264697066735822122093412547ef46717938ff7b757db5c6fea123f297792bbcb6dd83138ac034e7e064736f6c634300081c0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.