Latest 25 from a total of 262,138 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Multicall | 25417601 | 6 mins ago | IN | 0 HYPE | 0.00010031 | ||||
| Multicall | 25416841 | 18 mins ago | IN | 0 HYPE | 0.00005605 | ||||
| Exit Post Exp To... | 25416727 | 20 mins ago | IN | 0 HYPE | 0.00074582 | ||||
| Multicall | 25416109 | 30 mins ago | IN | 0 HYPE | 0.00004081 | ||||
| Swap Exact Token... | 25415198 | 45 mins ago | IN | 0 HYPE | 0.00004302 | ||||
| Swap Tokens To T... | 25414491 | 57 mins ago | IN | 0 HYPE | 0.00284174 | ||||
| Multicall | 25414445 | 57 mins ago | IN | 0 HYPE | 0.00224312 | ||||
| Swap Exact Token... | 25414396 | 58 mins ago | IN | 1 HYPE | 0.00180254 | ||||
| Swap Exact Token... | 25414390 | 58 mins ago | IN | 0 HYPE | 0.00076679 | ||||
| Multicall | 25413759 | 1 hr ago | IN | 0 HYPE | 0.0003402 | ||||
| Multicall | 25413705 | 1 hr ago | IN | 0 HYPE | 0.00091856 | ||||
| Multicall | 25413650 | 1 hr ago | IN | 0 HYPE | 0.00004917 | ||||
| Add Liquidity Si... | 25413070 | 1 hr ago | IN | 1.1 HYPE | 0.00079848 | ||||
| Swap Exact Pt Fo... | 25412557 | 1 hr ago | IN | 0 HYPE | 0.00005491 | ||||
| Swap Exact Pt Fo... | 25412434 | 1 hr ago | IN | 0 HYPE | 0.00012562 | ||||
| Swap Tokens To T... | 25412324 | 1 hr ago | IN | 0 HYPE | 0.00003515 | ||||
| Multicall | 25412110 | 1 hr ago | IN | 0 HYPE | 0.00006384 | ||||
| Multicall | 25411618 | 1 hr ago | IN | 0 HYPE | 0.00002131 | ||||
| Swap Exact Pt Fo... | 25411463 | 1 hr ago | IN | 0 HYPE | 0.00004833 | ||||
| Swap Exact Pt Fo... | 25411341 | 1 hr ago | IN | 0 HYPE | 0.00004833 | ||||
| Swap Exact Pt Fo... | 25411172 | 1 hr ago | IN | 0 HYPE | 0.00010242 | ||||
| Swap Exact Pt Fo... | 25411062 | 1 hr ago | IN | 0 HYPE | 0.00004829 | ||||
| Swap Exact Pt Fo... | 25410921 | 1 hr ago | IN | 0 HYPE | 0.00006484 | ||||
| Swap Exact Token... | 25410861 | 1 hr ago | IN | 0 HYPE | 0.00156876 | ||||
| Swap Exact Pt Fo... | 25410527 | 2 hrs ago | IN | 0 HYPE | 0.00027837 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 25414491 | 57 mins ago | 3.8092724 HYPE | ||||
| 25414491 | 57 mins ago | 3.8092724 HYPE | ||||
| 25414396 | 58 mins ago | 1 HYPE | ||||
| 25413650 | 1 hr ago | 71.10484913 HYPE | ||||
| 25413650 | 1 hr ago | 71.10484913 HYPE | ||||
| 25413070 | 1 hr ago | 1.1 HYPE | ||||
| 25412557 | 1 hr ago | 11.57693734 HYPE | ||||
| 25412557 | 1 hr ago | 11.57693734 HYPE | ||||
| 25412434 | 1 hr ago | 45.22062466 HYPE | ||||
| 25412434 | 1 hr ago | 45.22062466 HYPE | ||||
| 25412324 | 1 hr ago | 266.47645438 HYPE | ||||
| 25412324 | 1 hr ago | 266.47645438 HYPE | ||||
| 25411463 | 1 hr ago | 33.89488792 HYPE | ||||
| 25411463 | 1 hr ago | 33.89488792 HYPE | ||||
| 25411341 | 1 hr ago | 25.40122565 HYPE | ||||
| 25411341 | 1 hr ago | 25.40122565 HYPE | ||||
| 25411172 | 1 hr ago | 19.03036063 HYPE | ||||
| 25411172 | 1 hr ago | 19.03036063 HYPE | ||||
| 25411062 | 1 hr ago | 14.26184981 HYPE | ||||
| 25411062 | 1 hr ago | 14.26184981 HYPE | ||||
| 25410921 | 1 hr ago | 10.7058323 HYPE | ||||
| 25410921 | 1 hr ago | 10.7058323 HYPE | ||||
| 25409016 | 2 hrs ago | 329.41414095 HYPE | ||||
| 25409016 | 2 hrs ago | 329.41414095 HYPE | ||||
| 25406061 | 3 hrs ago | 0.04342186 HYPE |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PendleRouterV4
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: GPL-3.0-or-later
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/proxy/Proxy.sol";
import "../interfaces/IPActionStorageV4.sol";
import "./RouterStorage.sol";
contract PendleRouterV4 is Proxy, RouterStorage {
constructor(address _owner, address actionStorage) {
RouterStorage.CoreStorage storage $ = _getCoreStorage();
$.owner = _owner;
$.selectorToFacet[IPActionStorageV4.setSelectorToFacets.selector] = actionStorage;
}
function _implementation() internal view override returns (address) {
RouterStorage.CoreStorage storage $ = _getCoreStorage();
address facet = $.selectorToFacet[msg.sig];
require(facet != address(0), "INVALID_SELECTOR");
return facet;
}
receive() external payable override {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)
pragma solidity ^0.8.0;
/**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
* be specified by overriding the virtual {_implementation} function.
*
* Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
* different contract through the {_delegate} function.
*
* The success and return data of the delegated call will be returned back to the caller of the proxy.
*/
abstract contract Proxy {
/**
* @dev Delegates the current call to `implementation`.
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal virtual {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
/**
* @dev This is a virtual function that should be overridden so it returns the address to which the fallback function
* and {_fallback} should delegate.
*/
function _implementation() internal view virtual returns (address);
/**
* @dev Delegates the current call to the address returned by `_implementation()`.
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _fallback() internal virtual {
_beforeFallback();
_delegate(_implementation());
}
/**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
* function in the contract matches the call data.
*/
fallback() external payable virtual {
_fallback();
}
/**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
* is empty.
*/
receive() external payable virtual {
_fallback();
}
/**
* @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
* call, or as part of the Solidity `fallback` or `receive` functions.
*
* If overridden should call `super._beforeFallback()`.
*/
function _beforeFallback() internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
/* solhint-disable private-vars-leading-underscore, reason-string */
library PMath {
uint256 internal constant ONE = 1e18; // 18 decimal places
int256 internal constant IONE = 1e18; // 18 decimal places
function subMax0(uint256 a, uint256 b) internal pure returns (uint256) {
unchecked {
return (a >= b ? a - b : 0);
}
}
function subNoNeg(int256 a, int256 b) internal pure returns (int256) {
require(a >= b, "negative");
return a - b; // no unchecked since if b is very negative, a - b might overflow
}
function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 product = a * b;
unchecked {
return product / ONE;
}
}
function mulDown(int256 a, int256 b) internal pure returns (int256) {
int256 product = a * b;
unchecked {
return product / IONE;
}
}
function divDown(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 aInflated = a * ONE;
unchecked {
return aInflated / b;
}
}
function divDown(int256 a, int256 b) internal pure returns (int256) {
int256 aInflated = a * IONE;
unchecked {
return aInflated / b;
}
}
function rawDivUp(uint256 a, uint256 b) internal pure returns (uint256) {
return (a + b - 1) / b;
}
function rawDivUp(int256 a, int256 b) internal pure returns (int256) {
return (a + b - 1) / b;
}
function tweakUp(uint256 a, uint256 factor) internal pure returns (uint256) {
return mulDown(a, ONE + factor);
}
function tweakDown(uint256 a, uint256 factor) internal pure returns (uint256) {
return mulDown(a, ONE - factor);
}
/// @return res = min(a + b, bound)
/// @dev This function should handle arithmetic operation and bound check without overflow/underflow
function addWithUpperBound(uint256 a, uint256 b, uint256 bound) internal pure returns (uint256 res) {
unchecked {
if (type(uint256).max - b < a) res = bound;
else res = min(bound, a + b);
}
}
/// @return res = max(a - b, bound)
/// @dev This function should handle arithmetic operation and bound check without overflow/underflow
function subWithLowerBound(uint256 a, uint256 b, uint256 bound) internal pure returns (uint256 res) {
unchecked {
if (b > a) res = bound;
else res = max(a - b, bound);
}
}
function clamp(uint256 x, uint256 lower, uint256 upper) internal pure returns (uint256 res) {
res = x;
if (x < lower) res = lower;
else if (x > upper) res = upper;
}
// @author Uniswap
function sqrt(uint256 y) internal pure returns (uint256 z) {
if (y > 3) {
z = y;
uint256 x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
function square(uint256 x) internal pure returns (uint256) {
return x * x;
}
function squareDown(uint256 x) internal pure returns (uint256) {
return mulDown(x, x);
}
function abs(int256 x) internal pure returns (uint256) {
return uint256(x > 0 ? x : -x);
}
function neg(int256 x) internal pure returns (int256) {
return x * (-1);
}
function neg(uint256 x) internal pure returns (int256) {
return Int(x) * (-1);
}
function max(uint256 x, uint256 y) internal pure returns (uint256) {
return (x > y ? x : y);
}
function max(int256 x, int256 y) internal pure returns (int256) {
return (x > y ? x : y);
}
function min(uint256 x, uint256 y) internal pure returns (uint256) {
return (x < y ? x : y);
}
function min(int256 x, int256 y) internal pure returns (int256) {
return (x < y ? x : y);
}
/*///////////////////////////////////////////////////////////////
SIGNED CASTS
//////////////////////////////////////////////////////////////*/
function Int(uint256 x) internal pure returns (int256) {
require(x <= uint256(type(int256).max));
return int256(x);
}
function Int128(int256 x) internal pure returns (int128) {
require(type(int128).min <= x && x <= type(int128).max);
return int128(x);
}
function Int128(uint256 x) internal pure returns (int128) {
return Int128(Int(x));
}
/*///////////////////////////////////////////////////////////////
UNSIGNED CASTS
//////////////////////////////////////////////////////////////*/
function Uint(int256 x) internal pure returns (uint256) {
require(x >= 0);
return uint256(x);
}
function Uint32(uint256 x) internal pure returns (uint32) {
require(x <= type(uint32).max);
return uint32(x);
}
function Uint64(uint256 x) internal pure returns (uint64) {
require(x <= type(uint64).max);
return uint64(x);
}
function Uint112(uint256 x) internal pure returns (uint112) {
require(x <= type(uint112).max);
return uint112(x);
}
function Uint96(uint256 x) internal pure returns (uint96) {
require(x <= type(uint96).max);
return uint96(x);
}
function Uint128(uint256 x) internal pure returns (uint128) {
require(x <= type(uint128).max);
return uint128(x);
}
function Uint192(uint256 x) internal pure returns (uint192) {
require(x <= type(uint192).max);
return uint192(x);
}
function Uint80(uint256 x) internal pure returns (uint80) {
require(x <= type(uint80).max);
return uint80(x);
}
function isAApproxB(uint256 a, uint256 b, uint256 eps) internal pure returns (bool) {
return mulDown(b, ONE - eps) <= a && a <= mulDown(b, ONE + eps);
}
function isAGreaterApproxB(uint256 a, uint256 b, uint256 eps) internal pure returns (bool) {
return a >= b && a <= mulDown(b, ONE + eps);
}
function isASmallerApproxB(uint256 a, uint256 b, uint256 eps) internal pure returns (bool) {
return a <= b && a >= mulDown(b, ONE - eps);
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "../../interfaces/IPYieldToken.sol";
import "../../interfaces/IPPrincipalToken.sol";
import "./SYUtils.sol";
import "../libraries/math/PMath.sol";
type PYIndex is uint256;
library PYIndexLib {
using PMath for uint256;
using PMath for int256;
function newIndex(IPYieldToken YT) internal returns (PYIndex) {
return PYIndex.wrap(YT.pyIndexCurrent());
}
function syToAsset(PYIndex index, uint256 syAmount) internal pure returns (uint256) {
return SYUtils.syToAsset(PYIndex.unwrap(index), syAmount);
}
function assetToSy(PYIndex index, uint256 assetAmount) internal pure returns (uint256) {
return SYUtils.assetToSy(PYIndex.unwrap(index), assetAmount);
}
function assetToSyUp(PYIndex index, uint256 assetAmount) internal pure returns (uint256) {
return SYUtils.assetToSyUp(PYIndex.unwrap(index), assetAmount);
}
function syToAssetUp(PYIndex index, uint256 syAmount) internal pure returns (uint256) {
uint256 _index = PYIndex.unwrap(index);
return SYUtils.syToAssetUp(_index, syAmount);
}
function syToAsset(PYIndex index, int256 syAmount) internal pure returns (int256) {
int256 sign = syAmount < 0 ? int256(-1) : int256(1);
return sign * (SYUtils.syToAsset(PYIndex.unwrap(index), syAmount.abs())).Int();
}
function assetToSy(PYIndex index, int256 assetAmount) internal pure returns (int256) {
int256 sign = assetAmount < 0 ? int256(-1) : int256(1);
return sign * (SYUtils.assetToSy(PYIndex.unwrap(index), assetAmount.abs())).Int();
}
function assetToSyUp(PYIndex index, int256 assetAmount) internal pure returns (int256) {
int256 sign = assetAmount < 0 ? int256(-1) : int256(1);
return sign * (SYUtils.assetToSyUp(PYIndex.unwrap(index), assetAmount.abs())).Int();
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
library SYUtils {
uint256 internal constant ONE = 1e18;
function syToAsset(uint256 exchangeRate, uint256 syAmount) internal pure returns (uint256) {
return (syAmount * exchangeRate) / ONE;
}
function syToAssetUp(uint256 exchangeRate, uint256 syAmount) internal pure returns (uint256) {
return (syAmount * exchangeRate + ONE - 1) / ONE;
}
function assetToSy(uint256 exchangeRate, uint256 assetAmount) internal pure returns (uint256) {
return (assetAmount * ONE) / exchangeRate;
}
function assetToSyUp(uint256 exchangeRate, uint256 assetAmount) internal pure returns (uint256) {
return (assetAmount * ONE + exchangeRate - 1) / exchangeRate;
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import {IPAllEventsV3} from "./IPAllEventsV3.sol";
interface IPActionStorageV4 is IPAllEventsV3 {
struct SelectorsToFacet {
address facet;
bytes4[] selectors;
}
function owner() external view returns (address);
function pendingOwner() external view returns (address);
function transferOwnership(address newOwner, bool direct, bool renounce) external;
function claimOwnership() external;
function setSelectorToFacets(SelectorsToFacet[] calldata arr) external;
function selectorToFacet(bytes4 selector) external view returns (address);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "../router/swap-aggregator/IPSwapAggregator.sol";
import "./IPLimitRouter.sol";
/*
* NOTICE:
* For detailed information on TokenInput, TokenOutput, ApproxParams, and LimitOrderData,
* refer to https://docs.pendle.finance/Developers/Contracts/PendleRouter
*
* It's recommended to use Pendle's Hosted SDK to generate these parameters for:
* 1. Optimal liquidity and gas efficiency
* 2. Access to deeper liquidity via limit orders
* 3. Zapping in/out using any ERC20 token
*
* Else, to generate these parameters fully onchain, use the following functions:
* - For TokenInput: Use createTokenInputSimple
* - For TokenOutput: Use createTokenOutputSimple
* - For ApproxParams: Use createDefaultApproxParams
* - For LimitOrderData: Use createEmptyLimitOrderData
*
* These generated parameters can be directly passed into the respective function calls.
*
* Examples:
*
* addLiquiditySingleToken(
* msg.sender,
* MARKET_ADDRESS,
* minLpOut,
* createDefaultApproxParams(),
* createTokenInputSimple(USDC_ADDRESS, 1000e6),
* createEmptyLimitOrderData()
* )
*
* swapExactTokenForPt(
* msg.sender,
* MARKET_ADDRESS,
* minPtOut,
* createDefaultApproxParams(),
* createTokenInputSimple(USDC_ADDRESS, 1000e6),
* createEmptyLimitOrderData()
* )
*/
/// @dev Creates a TokenInput struct without using any swap aggregator
/// @param tokenIn must be one of the SY's tokens in (obtain via `IStandardizedYield#getTokensIn`)
/// @param netTokenIn amount of token in
function createTokenInputSimple(address tokenIn, uint256 netTokenIn) pure returns (TokenInput memory) {
return
TokenInput({
tokenIn: tokenIn,
netTokenIn: netTokenIn,
tokenMintSy: tokenIn,
pendleSwap: address(0),
swapData: createSwapTypeNoAggregator()
});
}
/// @dev Creates a TokenOutput struct without using any swap aggregator
/// @param tokenOut must be one of the SY's tokens out (obtain via `IStandardizedYield#getTokensOut`)
/// @param minTokenOut minimum amount of token out
function createTokenOutputSimple(address tokenOut, uint256 minTokenOut) pure returns (TokenOutput memory) {
return
TokenOutput({
tokenOut: tokenOut,
minTokenOut: minTokenOut,
tokenRedeemSy: tokenOut,
pendleSwap: address(0),
swapData: createSwapTypeNoAggregator()
});
}
function createEmptyLimitOrderData() pure returns (LimitOrderData memory) {}
/// @dev Creates default ApproxParams for on-chain approximation
function createDefaultApproxParams() pure returns (ApproxParams memory) {
return ApproxParams({guessMin: 0, guessMax: type(uint256).max, guessOffchain: 0, maxIteration: 256, eps: 1e14});
}
function createSwapTypeNoAggregator() pure returns (SwapData memory) {}
struct TokenInput {
address tokenIn;
uint256 netTokenIn;
address tokenMintSy;
address pendleSwap;
SwapData swapData;
}
struct TokenOutput {
address tokenOut;
uint256 minTokenOut;
address tokenRedeemSy;
address pendleSwap;
SwapData swapData;
}
struct LimitOrderData {
address limitRouter;
uint256 epsSkipMarket;
FillOrderParams[] normalFills;
FillOrderParams[] flashFills;
bytes optData;
}
struct ApproxParams {
uint256 guessMin;
uint256 guessMax;
uint256 guessOffchain;
uint256 maxIteration;
uint256 eps;
}
struct ExitPreExpReturnParams {
uint256 netPtFromRemove;
uint256 netSyFromRemove;
uint256 netPyRedeem;
uint256 netSyFromRedeem;
uint256 netPtSwap;
uint256 netYtSwap;
uint256 netSyFromSwap;
uint256 netSyFee;
uint256 totalSyOut;
}
struct ExitPostExpReturnParams {
uint256 netPtFromRemove;
uint256 netSyFromRemove;
uint256 netPtRedeem;
uint256 netSyFromRedeem;
uint256 totalSyOut;
}
struct RedeemYtIncomeToTokenStruct {
IPYieldToken yt;
bool doRedeemInterest;
bool doRedeemRewards;
address tokenRedeemSy;
uint256 minTokenRedeemOut;
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import {ExitPreExpReturnParams, ExitPostExpReturnParams} from "./IPAllActionTypeV3.sol";
interface IPActionAddRemoveLiqV3Events {
event AddLiquidityDualSyAndPt(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netSyUsed,
uint256 netPtUsed,
uint256 netLpOut
);
event AddLiquidityDualTokenAndPt(
address indexed caller,
address indexed market,
address indexed tokenIn,
address receiver,
uint256 netTokenUsed,
uint256 netPtUsed,
uint256 netLpOut,
uint256 netSyInterm
);
event AddLiquiditySinglePt(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netPtIn,
uint256 netLpOut
);
event AddLiquiditySingleSy(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netSyIn,
uint256 netLpOut
);
event AddLiquiditySingleToken(
address indexed caller,
address indexed market,
address indexed token,
address receiver,
uint256 netTokenIn,
uint256 netLpOut,
uint256 netSyInterm
);
event AddLiquiditySingleSyKeepYt(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netSyIn,
uint256 netSyMintPy,
uint256 netLpOut,
uint256 netYtOut
);
event AddLiquiditySingleTokenKeepYt(
address indexed caller,
address indexed market,
address indexed token,
address receiver,
uint256 netTokenIn,
uint256 netLpOut,
uint256 netYtOut,
uint256 netSyMintPy,
uint256 netSyInterm
);
event RemoveLiquidityDualSyAndPt(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netLpToRemove,
uint256 netPtOut,
uint256 netSyOut
);
event RemoveLiquidityDualTokenAndPt(
address indexed caller,
address indexed market,
address indexed tokenOut,
address receiver,
uint256 netLpToRemove,
uint256 netPtOut,
uint256 netTokenOut,
uint256 netSyInterm
);
event RemoveLiquiditySinglePt(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netLpToRemove,
uint256 netPtOut
);
event RemoveLiquiditySingleSy(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netLpToRemove,
uint256 netSyOut
);
event RemoveLiquiditySingleToken(
address indexed caller,
address indexed market,
address indexed token,
address receiver,
uint256 netLpToRemove,
uint256 netTokenOut,
uint256 netSyInterm
);
}
interface IPActionSwapPTV3Events {
event SwapPtAndSy(
address indexed caller,
address indexed market,
address indexed receiver,
int256 netPtToAccount,
int256 netSyToAccount
);
event SwapPtAndToken(
address indexed caller,
address indexed market,
address indexed token,
address receiver,
int256 netPtToAccount,
int256 netTokenToAccount,
uint256 netSyInterm
);
}
interface IPActionSwapYTV3Events {
event SwapYtAndSy(
address indexed caller,
address indexed market,
address indexed receiver,
int256 netYtToAccount,
int256 netSyToAccount
);
event SwapYtAndToken(
address indexed caller,
address indexed market,
address indexed token,
address receiver,
int256 netYtToAccount,
int256 netTokenToAccount,
uint256 netSyInterm
);
}
interface IPActionMiscV3Events {
event MintSyFromToken(
address indexed caller,
address indexed tokenIn,
address indexed SY,
address receiver,
uint256 netTokenIn,
uint256 netSyOut
);
event RedeemSyToToken(
address indexed caller,
address indexed tokenOut,
address indexed SY,
address receiver,
uint256 netSyIn,
uint256 netTokenOut
);
event MintPyFromSy(
address indexed caller,
address indexed receiver,
address indexed YT,
uint256 netSyIn,
uint256 netPyOut
);
event RedeemPyToSy(
address indexed caller,
address indexed receiver,
address indexed YT,
uint256 netPyIn,
uint256 netSyOut
);
event MintPyFromToken(
address indexed caller,
address indexed tokenIn,
address indexed YT,
address receiver,
uint256 netTokenIn,
uint256 netPyOut,
uint256 netSyInterm
);
event RedeemPyToToken(
address indexed caller,
address indexed tokenOut,
address indexed YT,
address receiver,
uint256 netPyIn,
uint256 netTokenOut,
uint256 netSyInterm
);
event ExitPreExpToToken(
address indexed caller,
address indexed market,
address indexed token,
address receiver,
uint256 netLpIn,
uint256 totalTokenOut,
ExitPreExpReturnParams params
);
event ExitPreExpToSy(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netLpIn,
ExitPreExpReturnParams params
);
event ExitPostExpToToken(
address indexed caller,
address indexed market,
address indexed token,
address receiver,
uint256 netLpIn,
uint256 totalTokenOut,
ExitPostExpReturnParams params
);
event ExitPostExpToSy(
address indexed caller,
address indexed market,
address indexed receiver,
uint256 netLpIn,
ExitPostExpReturnParams params
);
}
interface IPActionStorageEvents {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event SelectorToFacetSet(bytes4 indexed selector, address indexed facet);
}
interface IPAllEventsV3 is
IPActionAddRemoveLiqV3Events,
IPActionSwapPTV3Events,
IPActionSwapYTV3Events,
IPActionMiscV3Events,
IPActionStorageEvents
{}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
interface IPInterestManagerYT {
event CollectInterestFee(uint256 amountInterestFee);
function userInterest(address user) external view returns (uint128 lastPYIndex, uint128 accruedInterest);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "../core/StandardizedYield/PYIndex.sol";
interface IPLimitOrderType {
enum OrderType {
SY_FOR_PT,
PT_FOR_SY,
SY_FOR_YT,
YT_FOR_SY
}
// Fixed-size order part with core information
struct StaticOrder {
uint256 salt;
uint256 expiry;
uint256 nonce;
OrderType orderType;
address token;
address YT;
address maker;
address receiver;
uint256 makingAmount;
uint256 lnImpliedRate;
uint256 failSafeRate;
}
struct FillResults {
uint256 totalMaking;
uint256 totalTaking;
uint256 totalFee;
uint256 totalNotionalVolume;
uint256[] netMakings;
uint256[] netTakings;
uint256[] netFees;
uint256[] notionalVolumes;
}
}
struct Order {
uint256 salt;
uint256 expiry;
uint256 nonce;
IPLimitOrderType.OrderType orderType;
address token;
address YT;
address maker;
address receiver;
uint256 makingAmount;
uint256 lnImpliedRate;
uint256 failSafeRate;
bytes permit;
}
struct FillOrderParams {
Order order;
bytes signature;
uint256 makingAmount;
}
interface IPLimitRouterCallback is IPLimitOrderType {
function limitRouterCallback(
uint256 actualMaking,
uint256 actualTaking,
uint256 totalFee,
bytes memory data
) external returns (bytes memory);
}
interface IPLimitRouter is IPLimitOrderType {
struct OrderStatus {
uint128 filledAmount;
uint128 remaining;
}
event OrderCanceled(address indexed maker, bytes32 indexed orderHash);
event OrderFilledV2(
bytes32 indexed orderHash,
OrderType indexed orderType,
address indexed YT,
address token,
uint256 netInputFromMaker,
uint256 netOutputToMaker,
uint256 feeAmount,
uint256 notionalVolume,
address maker,
address taker
);
// event added on 2/1/2025
event LnFeeRateRootsSet(address[] YTs, uint256[] lnFeeRateRoots);
// @dev actualMaking, actualTaking are in the SY form
function fill(
FillOrderParams[] memory params,
address receiver,
uint256 maxTaking,
bytes calldata optData,
bytes calldata callback
) external returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn);
function feeRecipient() external view returns (address);
function hashOrder(Order memory order) external view returns (bytes32);
function cancelSingle(Order calldata order) external;
function cancelBatch(Order[] calldata orders) external;
function orderStatusesRaw(
bytes32[] memory orderHashes
) external view returns (uint256[] memory remainingsRaw, uint256[] memory filledAmounts);
function orderStatuses(
bytes32[] memory orderHashes
) external view returns (uint256[] memory remainings, uint256[] memory filledAmounts);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function simulate(address target, bytes calldata data) external payable;
function WNATIVE() external view returns (address);
function _checkSig(
Order memory order,
bytes memory signature
)
external
view
returns (
bytes32,
/*orderHash*/
uint256,
/*remainingMakerAmount*/
uint256
); /*filledMakerAmount*/
/* --- Deprecated events --- */
// deprecate on 7/1/2024, prior to official launch
event OrderFilled(
bytes32 indexed orderHash,
OrderType indexed orderType,
address indexed YT,
address token,
uint256 netInputFromMaker,
uint256 netOutputToMaker,
uint256 feeAmount,
uint256 notionalVolume
);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
interface IPPrincipalToken is IERC20Metadata {
function burnByYT(address user, uint256 amount) external;
function mintByYT(address user, uint256 amount) external;
function initialize(address _YT) external;
function SY() external view returns (address);
function YT() external view returns (address);
function factory() external view returns (address);
function expiry() external view returns (uint256);
function isExpired() external view returns (bool);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./IRewardManager.sol";
import "./IPInterestManagerYT.sol";
interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
event NewInterestIndex(uint256 indexed newIndex);
event Mint(
address indexed caller,
address indexed receiverPT,
address indexed receiverYT,
uint256 amountSyToMint,
uint256 amountPYOut
);
event Burn(address indexed caller, address indexed receiver, uint256 amountPYToRedeem, uint256 amountSyOut);
event RedeemRewards(address indexed user, uint256[] amountRewardsOut);
event RedeemInterest(address indexed user, uint256 interestOut);
event CollectRewardFee(address indexed rewardToken, uint256 amountRewardFee);
function mintPY(address receiverPT, address receiverYT) external returns (uint256 amountPYOut);
function redeemPY(address receiver) external returns (uint256 amountSyOut);
function redeemPYMulti(
address[] calldata receivers,
uint256[] calldata amountPYToRedeems
) external returns (uint256[] memory amountSyOuts);
function redeemDueInterestAndRewards(
address user,
bool redeemInterest,
bool redeemRewards
) external returns (uint256 interestOut, uint256[] memory rewardsOut);
function rewardIndexesCurrent() external returns (uint256[] memory);
function pyIndexCurrent() external returns (uint256);
function pyIndexStored() external view returns (uint256);
function getRewardTokens() external view returns (address[] memory);
function SY() external view returns (address);
function PT() external view returns (address);
function factory() external view returns (address);
function expiry() external view returns (uint256);
function isExpired() external view returns (bool);
function doCacheIndexSameBlock() external view returns (bool);
function pyIndexLastUpdatedBlock() external view returns (uint128);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
interface IRewardManager {
function userReward(address token, address user) external view returns (uint128 index, uint128 accrued);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.17;
abstract contract RouterStorage {
struct CoreStorage {
address owner;
address pendingOwner;
mapping(bytes4 => address) selectorToFacet;
}
// keccak256(abi.encode(uint256(keccak256("pendle.routerv4.Core")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant CORE_STORAGE_LOCATION = 0xf168c5b0cb4aca9a68f931815c18a144c61ad01d6dd7ca15bd6741672a0ab800;
function _getCoreStorage() internal pure returns (CoreStorage storage $) {
assembly {
$.slot := CORE_STORAGE_LOCATION
}
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
struct SwapData {
SwapType swapType;
address extRouter;
bytes extCalldata;
bool needScale;
}
struct SwapDataExtra {
address tokenIn;
address tokenOut;
uint256 minOut;
SwapData swapData;
}
enum SwapType {
NONE,
KYBERSWAP,
ODOS,
// ETH_WETH not used in Aggregator
ETH_WETH,
OKX,
ONE_INCH,
PARASWAP,
RESERVE_2,
RESERVE_3,
RESERVE_4,
RESERVE_5
}
interface IPSwapAggregator {
event SwapSingle(SwapType indexed swapType, address indexed tokenIn, uint256 amountIn);
function swap(address tokenIn, uint256 amountIn, SwapData calldata swapData) external payable;
}{
"optimizer": {
"enabled": true,
"runs": 1000000
},
"viaIR": true,
"evmVersion": "shanghai",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"actionStorage","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6080346100f957601f61024538819003918201601f19168301916001600160401b038311848410176100fd5780849260409485528339810103126100f957610052602061004b83610111565b9201610111565b7ff168c5b0cb4aca9a68f931815c18a144c61ad01d6dd7ca15bd6741672a0ab80080546001600160a01b039384166001600160a01b03199182161790915563523edfc160e11b5f527ff168c5b0cb4aca9a68f931815c18a144c61ad01d6dd7ca15bd6741672a0ab8026020527f64dcb2031b93f2b828088d68228a52c10b3bf4eb531ee3da663820f1b8fd2a6d805492909316911617905560405161011f90816101268239f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036100f95756fe6080604052361560e7577fffffffff000000000000000000000000000000000000000000000000000000005f35165f527ff168c5b0cb4aca9a68f931815c18a144c61ad01d6dd7ca15bd6741672a0ab80260205273ffffffffffffffffffffffffffffffffffffffff60405f2054168015608f575f8091368280378136915af43d5f803e15608b573d5ff35b3d5ffd5b7f08c379a0000000000000000000000000000000000000000000000000000000006080526020608452601060a4527f494e56414c49445f53454c4543544f520000000000000000000000000000000060c45260646080fd5b00fea26469706673582212204c98cc7cdc22355b055a48076518221ddbf4f2cdb37c0db55bfe1578860e2c1a64736f6c634300081c00330000000000000000000000001fccc097db89a86bfc474a1028f93958295b1fb7000000000000000000000000ded51dca2eced7a0baab3d9711a87f214769da0f
Deployed Bytecode
0x6080604052361560e7577fffffffff000000000000000000000000000000000000000000000000000000005f35165f527ff168c5b0cb4aca9a68f931815c18a144c61ad01d6dd7ca15bd6741672a0ab80260205273ffffffffffffffffffffffffffffffffffffffff60405f2054168015608f575f8091368280378136915af43d5f803e15608b573d5ff35b3d5ffd5b7f08c379a0000000000000000000000000000000000000000000000000000000006080526020608452601060a4527f494e56414c49445f53454c4543544f520000000000000000000000000000000060c45260646080fd5b00fea26469706673582212204c98cc7cdc22355b055a48076518221ddbf4f2cdb37c0db55bfe1578860e2c1a64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001fccc097db89a86bfc474a1028f93958295b1fb7000000000000000000000000ded51dca2eced7a0baab3d9711a87f214769da0f
-----Decoded View---------------
Arg [0] : _owner (address): 0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7
Arg [1] : actionStorage (address): 0xdED51dca2ECED7a0BAab3D9711A87f214769Da0f
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001fccc097db89a86bfc474a1028f93958295b1fb7
Arg [1] : 000000000000000000000000ded51dca2eced7a0baab3d9711a87f214769da0f
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$70.75
Net Worth in HYPE
Token Allocations
ETH
99.66%
USUALX
0.29%
BNB
0.06%
Multichain Portfolio | 35 Chains
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.