Source Code
Latest 25 from a total of 73 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Create Pair | 43822994 | 20 days ago | IN | 0 ETH | 0.00000585 | ||||
| Create Pair | 43275517 | 32 days ago | IN | 0 ETH | 0.00000382 | ||||
| Create Pair | 43147934 | 35 days ago | IN | 0 ETH | 0.00000438 | ||||
| Create Pair | 42287556 | 55 days ago | IN | 0 ETH | 0.00000295 | ||||
| Create Pair | 42062846 | 60 days ago | IN | 0 ETH | 0.00001623 | ||||
| Create Pair | 42057771 | 60 days ago | IN | 0 ETH | 0.00000921 | ||||
| Create Pair | 42057468 | 60 days ago | IN | 0 ETH | 0.00001016 | ||||
| Create Pair | 42005564 | 62 days ago | IN | 0 ETH | 0.00000451 | ||||
| Create Pair | 40889038 | 87 days ago | IN | 0 ETH | 0.00000594 | ||||
| Create Pair | 40886155 | 88 days ago | IN | 0 ETH | 0.00001037 | ||||
| Create Pair | 36191822 | 196 days ago | IN | 0 ETH | 0.00000501 | ||||
| Create Pair | 36188668 | 196 days ago | IN | 0 ETH | 0.00000299 | ||||
| Create Pair | 35476361 | 213 days ago | IN | 0 ETH | 0.00000067 | ||||
| Create Pair | 35224364 | 219 days ago | IN | 0 ETH | 0.00000304 | ||||
| Create Pair | 34814607 | 228 days ago | IN | 0 ETH | 0.00000017 | ||||
| Create Pair | 34683143 | 231 days ago | IN | 0 ETH | 0.00002304 | ||||
| Create Pair | 34593782 | 233 days ago | IN | 0 ETH | 0.00000014 | ||||
| Create Pair | 31380260 | 308 days ago | IN | 0 ETH | 0.00000883 | ||||
| Create Pair | 28766219 | 368 days ago | IN | 0 ETH | 0.00000133 | ||||
| Create Pair | 28757594 | 368 days ago | IN | 0 ETH | 0.00000315 | ||||
| Create Pair | 28626892 | 371 days ago | IN | 0 ETH | 0.00000272 | ||||
| Create Pair | 28152301 | 382 days ago | IN | 0 ETH | 0.0000022 | ||||
| Create Pair | 27109631 | 406 days ago | IN | 0 ETH | 0.00000542 | ||||
| Create Pair | 26983940 | 409 days ago | IN | 0 ETH | 0.00000467 | ||||
| Create Pair | 26076573 | 430 days ago | IN | 0 ETH | 0.0000118 |
Latest 25 internal transactions (View All)
Cross-Chain Transactions
Loading...
Loading
Contract Name:
TpdaLiquidationPairFactory
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import { ILiquidationSource, TpdaLiquidationPair } from "./TpdaLiquidationPair.sol";
/// @title TpdaLiquidationPairFactory
/// @author G9 Software Inc.
/// @notice Factory contract for deploying TpdaLiquidationPair contracts.
contract TpdaLiquidationPairFactory {
/* ============ Events ============ */
/// @notice Emitted when a new TpdaLiquidationPair is created
/// @param pair The address of the new pair
/// @param source The liquidation source that the pair is using
/// @param tokenIn The input token for the pair
/// @param tokenOut The output token for the pair
/// @param targetAuctionPeriod The duration of auctions
/// @param targetAuctionPrice The minimum auction size in output tokens
/// @param smoothingFactor The 18 decimal smoothing fraction for the liquid balance
event PairCreated(
TpdaLiquidationPair indexed pair,
ILiquidationSource source,
address indexed tokenIn,
address indexed tokenOut,
uint64 targetAuctionPeriod,
uint192 targetAuctionPrice,
uint256 smoothingFactor
);
/* ============ Variables ============ */
/// @notice Tracks an array of all pairs created by this factory
TpdaLiquidationPair[] public allPairs;
/* ============ Mappings ============ */
/// @notice Mapping to verify if a TpdaLiquidationPair has been deployed via this factory.
mapping(address pair => bool wasDeployed) public deployedPairs;
/// @notice Creates a new TpdaLiquidationPair and registers it within the factory
/// @param _source The liquidation source that the pair will use
/// @param _tokenIn The input token for the pair
/// @param _tokenOut The output token for the pair
/// @param _targetAuctionPeriod The duration of auctions
/// @param _targetAuctionPrice The initial auction price
/// @param _smoothingFactor The degree of smoothing to apply to the available token balance
/// @return The new liquidation pair
function createPair(
ILiquidationSource _source,
address _tokenIn,
address _tokenOut,
uint64 _targetAuctionPeriod,
uint192 _targetAuctionPrice,
uint256 _smoothingFactor
) external returns (TpdaLiquidationPair) {
TpdaLiquidationPair _liquidationPair = new TpdaLiquidationPair(
_source,
_tokenIn,
_tokenOut,
_targetAuctionPeriod,
_targetAuctionPrice,
_smoothingFactor
);
allPairs.push(_liquidationPair);
deployedPairs[address(_liquidationPair)] = true;
emit PairCreated(
_liquidationPair,
_source,
_tokenIn,
_tokenOut,
_targetAuctionPeriod,
_targetAuctionPrice,
_smoothingFactor
);
return _liquidationPair;
}
/// @notice Total number of TpdaLiquidationPair deployed by this factory.
/// @return Number of TpdaLiquidationPair deployed by this factory.
function totalPairs() external view returns (uint256) {
return allPairs.length;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import { IERC20 } from "openzeppelin/token/ERC20/IERC20.sol";
import { ILiquidationSource } from "pt-v5-liquidator-interfaces/ILiquidationSource.sol";
import { ILiquidationPair } from "pt-v5-liquidator-interfaces/ILiquidationPair.sol";
import { IFlashSwapCallback } from "pt-v5-liquidator-interfaces/IFlashSwapCallback.sol";
/// @notice Thrown when the actual swap amount in exceeds the user defined maximum amount in
/// @param amountInMax The user-defined max amount in
/// @param amountIn The actual amount in
error SwapExceedsMax(uint256 amountInMax, uint256 amountIn);
/// @notice Thrown when the amount out requested is greater than the available balance
/// @param requested The amount requested to swap
/// @param available The amount available to swap
error InsufficientBalance(uint256 requested, uint256 available);
/// @notice Thrown when the receiver of the swap is the zero address
error ReceiverIsZero();
/// @notice Thrown when the smoothing parameter is 1 or greater
error SmoothingGteOne();
// The minimum auction price. This ensures the auction cannot get bricked to zero.
uint192 constant MIN_PRICE = 100;
/// @title Target Period Dutch Auction Liquidation Pair
/// @author G9 Software Inc.
/// @notice This contract sells one token for another at a target time interval. The pricing algorithm is designed
/// such that the price of the auction is inversely proportional to the time since the last auction.
/// auctionPrice = (targetAuctionPeriod / elapsedTimeSinceLastAuction) * lastAuctionPrice
contract TpdaLiquidationPair is ILiquidationPair {
/// @notice Emitted when a swap is made
/// @param sender The sender of the swap
/// @param receiver The receiver of the swap
/// @param amountOut The amount of tokens out
/// @param amountInMax The maximum amount of tokens in
/// @param amountIn The actual amount of tokens in
/// @param flashSwapData The data used for the flash swap
event SwappedExactAmountOut(
address indexed sender,
address indexed receiver,
uint256 amountOut,
uint256 amountInMax,
uint256 amountIn,
bytes flashSwapData
);
/// @notice The liquidation source
ILiquidationSource public immutable source;
/// @notice The target time interval between auctions
uint256 public immutable targetAuctionPeriod;
/// @notice The token that is being purchased
IERC20 internal immutable _tokenIn;
/// @notice The token that is being sold
IERC20 internal immutable _tokenOut;
/// @notice The degree of smoothing to apply to the available token balance
uint256 public immutable smoothingFactor;
/// @notice The time at which the last auction occurred
uint64 public lastAuctionAt;
/// @notice The price of the last auction
uint192 public lastAuctionPrice;
/// @notice Constructors a new TpdaLiquidationPair
/// @param _source The liquidation source
/// @param __tokenIn The token that is being purchased by the source
/// @param __tokenOut The token that is being sold by the source
/// @param _targetAuctionPeriod The target time interval between auctions
/// @param _targetAuctionPrice The first target price of the auction
/// @param _smoothingFactor The degree of smoothing to apply to the available token balance
constructor (
ILiquidationSource _source,
address __tokenIn,
address __tokenOut,
uint64 _targetAuctionPeriod,
uint192 _targetAuctionPrice,
uint256 _smoothingFactor
) {
if (_smoothingFactor >= 1e18) {
revert SmoothingGteOne();
}
source = _source;
_tokenIn = IERC20(__tokenIn);
_tokenOut = IERC20(__tokenOut);
targetAuctionPeriod = _targetAuctionPeriod;
smoothingFactor = _smoothingFactor;
lastAuctionAt = uint64(block.timestamp);
lastAuctionPrice = _targetAuctionPrice;
}
/// @inheritdoc ILiquidationPair
function tokenIn() external view returns (address) {
return address(_tokenIn);
}
/// @inheritdoc ILiquidationPair
function tokenOut() external view returns (address) {
return address(_tokenOut);
}
/// @inheritdoc ILiquidationPair
function target() external returns (address) {
return source.targetOf(address(_tokenIn));
}
/// @inheritdoc ILiquidationPair
function maxAmountOut() external returns (uint256) {
return _availableBalance();
}
/// @inheritdoc ILiquidationPair
function swapExactAmountOut(
address _receiver,
uint256 _amountOut,
uint256 _amountInMax,
bytes calldata _flashSwapData
) external returns (uint256) {
if (_receiver == address(0)) {
revert ReceiverIsZero();
}
uint192 swapAmountIn = _computePrice();
if (swapAmountIn > _amountInMax) {
revert SwapExceedsMax(_amountInMax, swapAmountIn);
}
lastAuctionAt = uint64(block.timestamp);
lastAuctionPrice = swapAmountIn;
uint256 availableOut = _availableBalance();
if (_amountOut > availableOut) {
revert InsufficientBalance(_amountOut, availableOut);
}
bytes memory transferTokensOutData = source.transferTokensOut(
msg.sender,
_receiver,
address(_tokenOut),
_amountOut
);
if (_flashSwapData.length > 0) {
IFlashSwapCallback(_receiver).flashSwapCallback(
msg.sender,
swapAmountIn,
_amountOut,
_flashSwapData
);
}
source.verifyTokensIn(address(_tokenIn), swapAmountIn, transferTokensOutData);
emit SwappedExactAmountOut(msg.sender, _receiver, _amountOut, _amountInMax, swapAmountIn, _flashSwapData);
return swapAmountIn;
}
/// @inheritdoc ILiquidationPair
function computeExactAmountIn(uint256) external view returns (uint256) {
return _computePrice();
}
/// @notice Computes the time at which the given auction price will occur
/// @param price The price of the auction
/// @return The timestamp at which the given price will occur
function computeTimeForPrice(uint256 price) external view returns (uint256) {
// p2/p1 = t/e => e = (t*p1)/p2
return lastAuctionAt + (targetAuctionPeriod * lastAuctionPrice) / price;
}
/// @notice Computes the available balance of the tokens to be sold
/// @return The available balance of the tokens
function _availableBalance() internal returns (uint256) {
return ((1e18 - smoothingFactor) * source.liquidatableBalanceOf(address(_tokenOut))) / 1e18;
}
/// @notice Computes the current auction price
/// @return The current auction price
function _computePrice() internal view returns (uint192) {
uint256 elapsedTime = block.timestamp - lastAuctionAt;
if (elapsedTime == 0) {
return type(uint192).max;
}
uint192 price = uint192((targetAuctionPeriod * lastAuctionPrice) / elapsedTime);
if (price < MIN_PRICE) {
price = MIN_PRICE;
}
return price;
}
}// 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: MIT
pragma solidity ^0.8.0;
interface ILiquidationSource {
/**
* @notice Emitted when a new liquidation pair is set for the given `tokenOut`.
* @param tokenOut The token being liquidated
* @param liquidationPair The new liquidation pair for the token
*/
event LiquidationPairSet(address indexed tokenOut, address indexed liquidationPair);
/**
* @notice Get the available amount of tokens that can be swapped.
* @param tokenOut Address of the token to get available balance for
* @return uint256 Available amount of `token`
*/
function liquidatableBalanceOf(address tokenOut) external returns (uint256);
/**
* @notice Transfers tokens to the receiver
* @param sender Address that triggered the liquidation
* @param receiver Address of the account that will receive `tokenOut`
* @param tokenOut Address of the token being bought
* @param amountOut Amount of token being bought
*/
function transferTokensOut(
address sender,
address receiver,
address tokenOut,
uint256 amountOut
) external returns (bytes memory);
/**
* @notice Verifies that tokens have been transferred in.
* @param tokenIn Address of the token being sold
* @param amountIn Amount of token being sold
* @param transferTokensOutData Data returned by the corresponding transferTokensOut call
*/
function verifyTokensIn(
address tokenIn,
uint256 amountIn,
bytes calldata transferTokensOutData
) external;
/**
* @notice Get the address that will receive `tokenIn`.
* @param tokenIn Address of the token to get the target address for
* @return address Address of the target
*/
function targetOf(address tokenIn) external returns (address);
/**
* @notice Checks if a liquidation pair can be used to liquidate the given tokenOut from this source.
* @param tokenOut The address of the token to liquidate
* @param liquidationPair The address of the liquidation pair that is being checked
* @return bool True if the liquidation pair can be used, false otherwise
*/
function isLiquidationPair(address tokenOut, address liquidationPair) external returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { ILiquidationSource } from "./ILiquidationSource.sol";
interface ILiquidationPair {
/**
* @notice The liquidation source that the pair is using.
* @dev The source executes the actual token swap, while the pair handles the pricing.
*/
function source() external returns (ILiquidationSource);
/**
* @notice Returns the token that is used to pay for auctions.
* @return address of the token coming in
*/
function tokenIn() external returns (address);
/**
* @notice Returns the token that is being auctioned.
* @return address of the token coming out
*/
function tokenOut() external returns (address);
/**
* @notice Get the address that will receive `tokenIn`.
* @return Address of the target
*/
function target() external returns (address);
/**
* @notice Gets the maximum amount of tokens that can be swapped out from the source.
* @return The maximum amount of tokens that can be swapped out.
*/
function maxAmountOut() external returns (uint256);
/**
* @notice Swaps the given amount of tokens out and ensures the amount of tokens in doesn't exceed the given maximum.
* @dev The amount of tokens being swapped in must be sent to the target before calling this function.
* @param _receiver The address to send the tokens to.
* @param _amountOut The amount of tokens to receive out.
* @param _amountInMax The maximum amount of tokens to send in.
* @param _flashSwapData If non-zero, the _receiver is called with this data prior to
* @return The amount of tokens sent in.
*/
function swapExactAmountOut(
address _receiver,
uint256 _amountOut,
uint256 _amountInMax,
bytes calldata _flashSwapData
) external returns (uint256);
/**
* @notice Computes the exact amount of tokens to send in for the given amount of tokens to receive out.
* @param _amountOut The amount of tokens to receive out.
* @return The amount of tokens to send in.
*/
function computeExactAmountIn(uint256 _amountOut) external returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @notice Interface for the flash swap callback
interface IFlashSwapCallback {
/// @notice Called on the token receiver by the LiquidationPair during a liquidation if the flashSwap data length is non-zero
/// @param _sender The address that triggered the liquidation swap
/// @param _amountOut The amount of tokens that were sent to the receiver
/// @param _amountIn The amount of tokens expected to be sent to the target
/// @param _flashSwapData The flash swap data that was passed into the swap function.
function flashSwapCallback(
address _sender,
uint256 _amountIn,
uint256 _amountOut,
bytes calldata _flashSwapData
) external;
}{
"remappings": [
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
"prb-math/=lib/pt-v5-prize-pool/lib/prb-math/src/",
"pt-v5-claimer/=lib/pt-v5-claimer/src/",
"pt-v5-draw-manager/=lib/pt-v5-draw-manager/src/",
"pt-v5-prize-pool/=lib/pt-v5-prize-pool/src/",
"pt-v5-rng-witnet/=lib/pt-v5-rng-witnet/src/",
"pt-v5-tpda-liquidator/=lib/pt-v5-tpda-liquidator/src/",
"pt-v5-liquidator-interfaces/=lib/pt-v5-tpda-liquidator/lib/pt-v5-liquidator-interfaces/src/interfaces/",
"pt-v5-twab-controller/=lib/pt-v5-twab-controller/src/",
"pt-v5-twab-rewards/=lib/pt-v5-twab-rewards/src/",
"pt-v5-vault/=lib/pt-v5-vault/src/",
"pt-v5-staking-vault/=lib/pt-v5-staking-vault/src/",
"pt-v5-vault-boost/=lib/pt-v5-vault-boost/src/",
"yield-daddy/=lib/yield-daddy/src/",
"solmate/=lib/yield-daddy/lib/solmate/src/",
"@openzeppelin/contracts/=lib/pt-v5-staking-vault/lib/openzeppelin-contracts/contracts/",
"@prb/test/=lib/pt-v5-claimer/lib/prb-math/node_modules/@prb/test/",
"brokentoken/=lib/pt-v5-vault/lib/brokentoken/src/",
"create3-factory/=lib/yield-daddy/lib/create3-factory/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"openzeppelin/=lib/openzeppelin-contracts/contracts/",
"owner-manager-contracts/=lib/pt-v5-prize-pool/lib/owner-manager-contracts/contracts/",
"prb-test/=lib/pt-v5-claimer/lib/prb-math/lib/prb-test/src/",
"pt-v5-claimable-interface/=lib/pt-v5-claimer/lib/pt-v5-claimable-interface/src/",
"ring-buffer-lib/=lib/pt-v5-prize-pool/lib/ring-buffer-lib/src/",
"solady/=lib/pt-v5-rng-witnet/lib/solady/src/",
"uniform-random-number/=lib/pt-v5-prize-pool/lib/uniform-random-number/src/",
"weird-erc20/=lib/pt-v5-vault/lib/brokentoken/lib/weird-erc20/src/",
"witnet-solidity-bridge/=lib/pt-v5-rng-witnet/lib/witnet-solidity-bridge/contracts/",
"witnet/=lib/pt-v5-rng-witnet/lib/witnet-solidity-bridge/contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200,
"details": {
"peephole": true,
"inliner": true,
"deduplicate": true,
"cse": true,
"yul": true
}
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract TpdaLiquidationPair","name":"pair","type":"address"},{"indexed":false,"internalType":"contract ILiquidationSource","name":"source","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":true,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint64","name":"targetAuctionPeriod","type":"uint64"},{"indexed":false,"internalType":"uint192","name":"targetAuctionPrice","type":"uint192"},{"indexed":false,"internalType":"uint256","name":"smoothingFactor","type":"uint256"}],"name":"PairCreated","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allPairs","outputs":[{"internalType":"contract TpdaLiquidationPair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ILiquidationSource","name":"_source","type":"address"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint64","name":"_targetAuctionPeriod","type":"uint64"},{"internalType":"uint192","name":"_targetAuctionPrice","type":"uint192"},{"internalType":"uint256","name":"_smoothingFactor","type":"uint256"}],"name":"createPair","outputs":[{"internalType":"contract TpdaLiquidationPair","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"}],"name":"deployedPairs","outputs":[{"internalType":"bool","name":"wasDeployed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPairs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50611111806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80631e3dd18b146100515780635d8c32a91461008157806383b2422a146100925780639cded5ab146100a5575b600080fd5b61006461005f366004610261565b6100d8565b6040516001600160a01b0390911681526020015b60405180910390f35b600054604051908152602001610078565b6100646100a0366004610292565b610102565b6100c86100b3366004610324565b60016020526000908152604090205460ff1681565b6040519015158152602001610078565b600081815481106100e857600080fd5b6000918252602090912001546001600160a01b0316905081565b60008087878787878760405161011790610254565b6001600160a01b039687168152948616602086015294909216604084015267ffffffffffffffff1660608301526001600160c01b0316608082015260a081019190915260c001604051809103906000f080158015610179573d6000803e3d6000fd5b5060008054600180820183557f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390910180546001600160a01b0319166001600160a01b038581169182179092558084526020838152604094859020805460ff191690941790935583518d8316815267ffffffffffffffff8b16938101939093526001600160c01b0389169383019390935260608201879052929350888316928a1691907f57c71cbcfa37f75c7ca5e8ceac93556a3d5f068376e5257a50127214ea2ed9669060800160405180910390a4979650505050505050565b610d938061034983390190565b60006020828403121561027357600080fd5b5035919050565b6001600160a01b038116811461028f57600080fd5b50565b60008060008060008060c087890312156102ab57600080fd5b86356102b68161027a565b955060208701356102c68161027a565b945060408701356102d68161027a565b9350606087013567ffffffffffffffff811681146102f357600080fd5b925060808701356001600160c01b038116811461030f57600080fd5b8092505060a087013590509295509295509295565b60006020828403121561033657600080fd5b81356103418161027a565b939250505056fe61012060405234801561001157600080fd5b50604051610d93380380610d93833981016040819052610030916100c1565b670de0b6b3a76400008110610058576040516318a7f24560e11b815260040160405180910390fd5b6001600160a01b0395861660805293851660c0529190931660e0526001600160401b0392831660a052610100919091526001600160c01b031668010000000000000000024290911617600055610156565b6001600160a01b03811681146100be57600080fd5b50565b60008060008060008060c087890312156100da57600080fd5b86516100e5816100a9565b60208801519096506100f6816100a9565b6040880151909550610107816100a9565b60608801519094506001600160401b038116811461012457600080fd5b60808801519093506001600160c01b038116811461014157600080fd5b8092505060a087015190509295509295509295565b60805160a05160c05160e05161010051610bad6101e66000396000818160e401526107f3015260008181610221015281816103be015261074c0152600081816101c101528181610516015261060201526000818161015e0152818161028201526106ea015260008181610185015281816103f0015281816104e90152818161062d01526107810152610bad6000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806367e828bf1161007157806367e828bf146101805780636daf390b146101bf5780637a18c1fe146101e55780637ed9038b14610217578063d0202d3b1461021f578063d4b839921461024557600080fd5b80630aa58b21146100b95780630d9c71aa146100df57806313a189fa146101065780631cf8287d1461011957806360ebae1f1461012c578063653180b214610159575b600080fd5b6100cc6100c7366004610834565b61024d565b6040519081526020015b60405180910390f35b6100cc7f000000000000000000000000000000000000000000000000000000000000000081565b6100cc610114366004610834565b610266565b6100cc610127366004610865565b6102cd565b6000546101409067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016100d6565b6100cc7f000000000000000000000000000000000000000000000000000000000000000081565b6101a77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d6565b7f00000000000000000000000000000000000000000000000000000000000000006101a7565b6000546101ff90600160401b90046001600160c01b031681565b6040516001600160c01b0390911681526020016100d6565b6100cc6105dc565b7f00000000000000000000000000000000000000000000000000000000000000006101a7565b6101a76105eb565b600061025761069c565b6001600160c01b031692915050565b6000805482906102a690600160401b90046001600160c01b03167f0000000000000000000000000000000000000000000000000000000000000000610911565b6102b09190610928565b6000546102c7919067ffffffffffffffff1661094a565b92915050565b60006001600160a01b0386166102f65760405163038f175f60e21b815260040160405180910390fd5b600061030061069c565b905084816001600160c01b0316111561034357604051636abde48d60e11b8152600481018690526001600160c01b03821660248201526044015b60405180910390fd5b6001600160c01b038116600160401b0267ffffffffffffffff421617600090815561036c610735565b9050808711156103995760405163cf47918160e01b8152600481018890526024810182905260440161033a565b604051637cc99d3f60e01b81523360048201526001600160a01b0389811660248301527f000000000000000000000000000000000000000000000000000000000000000081166044830152606482018990526000917f000000000000000000000000000000000000000000000000000000000000000090911690637cc99d3f906084016000604051808303816000875af115801561043b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104639190810190610997565b905084156104d25760405163a5a6edad60e01b81526001600160a01b038a169063a5a6edad9061049f90339087908d908c908c90600401610a6d565b600060405180830381600087803b1580156104b957600080fd5b505af11580156104cd573d6000803e3d6000fd5b505050505b60405163c8576e6160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c8576e6190610542907f00000000000000000000000000000000000000000000000000000000000000009087908690600401610aa8565b600060405180830381600087803b15801561055c57600080fd5b505af1158015610570573d6000803e3d6000fd5b50505050886001600160a01b0316336001600160a01b03167f6abc2d6699315cdd965afdaa01e9bfd32b512397f6ed431a17b64af87b2c35558a8a878b8b6040516105bf959493929190610af9565b60405180910390a350506001600160c01b03169695505050505050565b60006105e6610735565b905090565b60405163700f04ef60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063700f04ef906024016020604051808303816000875af1158015610678573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e69190610b27565b6000805481906106b69067ffffffffffffffff1642610b4b565b9050806000036106ce576001600160c01b0391505090565b60008054829061070e90600160401b90046001600160c01b03167f0000000000000000000000000000000000000000000000000000000000000000610911565b6107189190610928565b905060646001600160c01b03821610156102c75750606492915050565b60405163587e7b1360e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600091670de0b6b3a7640000917f0000000000000000000000000000000000000000000000000000000000000000169063b0fcf626906024016020604051808303816000875af11580156107ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ee9190610b5e565b6108207f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a7640000610b4b565b61082a9190610911565b6105e69190610928565b60006020828403121561084657600080fd5b5035919050565b6001600160a01b038116811461086257600080fd5b50565b60008060008060006080868803121561087d57600080fd5b85356108888161084d565b94506020860135935060408601359250606086013567ffffffffffffffff808211156108b357600080fd5b818801915088601f8301126108c757600080fd5b8135818111156108d657600080fd5b8960208285010111156108e857600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102c7576102c76108fb565b60008261094557634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156102c7576102c76108fb565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561098e578181015183820152602001610976565b50506000910152565b6000602082840312156109a957600080fd5b815167ffffffffffffffff808211156109c157600080fd5b818401915084601f8301126109d557600080fd5b8151818111156109e7576109e761095d565b604051601f8201601f19908116603f01168101908382118183101715610a0f57610a0f61095d565b81604052828152876020848701011115610a2857600080fd5b610a39836020830160208801610973565b979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526001600160c01b038516602082015260408101849052608060608201819052600090610a399083018486610a44565b60018060a01b038416815260018060c01b03831660208201526060604082015260008251806060840152610ae3816080850160208701610973565b601f01601f191691909101608001949350505050565b85815284602082015260018060c01b0384166040820152608060608201526000610a39608083018486610a44565b600060208284031215610b3957600080fd5b8151610b448161084d565b9392505050565b818103818111156102c7576102c76108fb565b600060208284031215610b7057600080fd5b505191905056fea2646970667358221220b1f7f2a8d7684fd1b0258e7cf5ec0e4addeb76f22a2d86c05a7beb06ed3f367a64736f6c63430008180033a2646970667358221220f62190830c13381969e014ecc7fdf95d74c87d29e01f08df834ffa96ba95aeb164736f6c63430008180033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80631e3dd18b146100515780635d8c32a91461008157806383b2422a146100925780639cded5ab146100a5575b600080fd5b61006461005f366004610261565b6100d8565b6040516001600160a01b0390911681526020015b60405180910390f35b600054604051908152602001610078565b6100646100a0366004610292565b610102565b6100c86100b3366004610324565b60016020526000908152604090205460ff1681565b6040519015158152602001610078565b600081815481106100e857600080fd5b6000918252602090912001546001600160a01b0316905081565b60008087878787878760405161011790610254565b6001600160a01b039687168152948616602086015294909216604084015267ffffffffffffffff1660608301526001600160c01b0316608082015260a081019190915260c001604051809103906000f080158015610179573d6000803e3d6000fd5b5060008054600180820183557f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390910180546001600160a01b0319166001600160a01b038581169182179092558084526020838152604094859020805460ff191690941790935583518d8316815267ffffffffffffffff8b16938101939093526001600160c01b0389169383019390935260608201879052929350888316928a1691907f57c71cbcfa37f75c7ca5e8ceac93556a3d5f068376e5257a50127214ea2ed9669060800160405180910390a4979650505050505050565b610d938061034983390190565b60006020828403121561027357600080fd5b5035919050565b6001600160a01b038116811461028f57600080fd5b50565b60008060008060008060c087890312156102ab57600080fd5b86356102b68161027a565b955060208701356102c68161027a565b945060408701356102d68161027a565b9350606087013567ffffffffffffffff811681146102f357600080fd5b925060808701356001600160c01b038116811461030f57600080fd5b8092505060a087013590509295509295509295565b60006020828403121561033657600080fd5b81356103418161027a565b939250505056fe61012060405234801561001157600080fd5b50604051610d93380380610d93833981016040819052610030916100c1565b670de0b6b3a76400008110610058576040516318a7f24560e11b815260040160405180910390fd5b6001600160a01b0395861660805293851660c0529190931660e0526001600160401b0392831660a052610100919091526001600160c01b031668010000000000000000024290911617600055610156565b6001600160a01b03811681146100be57600080fd5b50565b60008060008060008060c087890312156100da57600080fd5b86516100e5816100a9565b60208801519096506100f6816100a9565b6040880151909550610107816100a9565b60608801519094506001600160401b038116811461012457600080fd5b60808801519093506001600160c01b038116811461014157600080fd5b8092505060a087015190509295509295509295565b60805160a05160c05160e05161010051610bad6101e66000396000818160e401526107f3015260008181610221015281816103be015261074c0152600081816101c101528181610516015261060201526000818161015e0152818161028201526106ea015260008181610185015281816103f0015281816104e90152818161062d01526107810152610bad6000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806367e828bf1161007157806367e828bf146101805780636daf390b146101bf5780637a18c1fe146101e55780637ed9038b14610217578063d0202d3b1461021f578063d4b839921461024557600080fd5b80630aa58b21146100b95780630d9c71aa146100df57806313a189fa146101065780631cf8287d1461011957806360ebae1f1461012c578063653180b214610159575b600080fd5b6100cc6100c7366004610834565b61024d565b6040519081526020015b60405180910390f35b6100cc7f000000000000000000000000000000000000000000000000000000000000000081565b6100cc610114366004610834565b610266565b6100cc610127366004610865565b6102cd565b6000546101409067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016100d6565b6100cc7f000000000000000000000000000000000000000000000000000000000000000081565b6101a77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d6565b7f00000000000000000000000000000000000000000000000000000000000000006101a7565b6000546101ff90600160401b90046001600160c01b031681565b6040516001600160c01b0390911681526020016100d6565b6100cc6105dc565b7f00000000000000000000000000000000000000000000000000000000000000006101a7565b6101a76105eb565b600061025761069c565b6001600160c01b031692915050565b6000805482906102a690600160401b90046001600160c01b03167f0000000000000000000000000000000000000000000000000000000000000000610911565b6102b09190610928565b6000546102c7919067ffffffffffffffff1661094a565b92915050565b60006001600160a01b0386166102f65760405163038f175f60e21b815260040160405180910390fd5b600061030061069c565b905084816001600160c01b0316111561034357604051636abde48d60e11b8152600481018690526001600160c01b03821660248201526044015b60405180910390fd5b6001600160c01b038116600160401b0267ffffffffffffffff421617600090815561036c610735565b9050808711156103995760405163cf47918160e01b8152600481018890526024810182905260440161033a565b604051637cc99d3f60e01b81523360048201526001600160a01b0389811660248301527f000000000000000000000000000000000000000000000000000000000000000081166044830152606482018990526000917f000000000000000000000000000000000000000000000000000000000000000090911690637cc99d3f906084016000604051808303816000875af115801561043b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104639190810190610997565b905084156104d25760405163a5a6edad60e01b81526001600160a01b038a169063a5a6edad9061049f90339087908d908c908c90600401610a6d565b600060405180830381600087803b1580156104b957600080fd5b505af11580156104cd573d6000803e3d6000fd5b505050505b60405163c8576e6160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c8576e6190610542907f00000000000000000000000000000000000000000000000000000000000000009087908690600401610aa8565b600060405180830381600087803b15801561055c57600080fd5b505af1158015610570573d6000803e3d6000fd5b50505050886001600160a01b0316336001600160a01b03167f6abc2d6699315cdd965afdaa01e9bfd32b512397f6ed431a17b64af87b2c35558a8a878b8b6040516105bf959493929190610af9565b60405180910390a350506001600160c01b03169695505050505050565b60006105e6610735565b905090565b60405163700f04ef60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063700f04ef906024016020604051808303816000875af1158015610678573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e69190610b27565b6000805481906106b69067ffffffffffffffff1642610b4b565b9050806000036106ce576001600160c01b0391505090565b60008054829061070e90600160401b90046001600160c01b03167f0000000000000000000000000000000000000000000000000000000000000000610911565b6107189190610928565b905060646001600160c01b03821610156102c75750606492915050565b60405163587e7b1360e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600091670de0b6b3a7640000917f0000000000000000000000000000000000000000000000000000000000000000169063b0fcf626906024016020604051808303816000875af11580156107ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ee9190610b5e565b6108207f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a7640000610b4b565b61082a9190610911565b6105e69190610928565b60006020828403121561084657600080fd5b5035919050565b6001600160a01b038116811461086257600080fd5b50565b60008060008060006080868803121561087d57600080fd5b85356108888161084d565b94506020860135935060408601359250606086013567ffffffffffffffff808211156108b357600080fd5b818801915088601f8301126108c757600080fd5b8135818111156108d657600080fd5b8960208285010111156108e857600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102c7576102c76108fb565b60008261094557634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156102c7576102c76108fb565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561098e578181015183820152602001610976565b50506000910152565b6000602082840312156109a957600080fd5b815167ffffffffffffffff808211156109c157600080fd5b818401915084601f8301126109d557600080fd5b8151818111156109e7576109e761095d565b604051601f8201601f19908116603f01168101908382118183101715610a0f57610a0f61095d565b81604052828152876020848701011115610a2857600080fd5b610a39836020830160208801610973565b979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526001600160c01b038516602082015260408101849052608060608201819052600090610a399083018486610a44565b60018060a01b038416815260018060c01b03831660208201526060604082015260008251806060840152610ae3816080850160208701610973565b601f01601f191691909101608001949350505050565b85815284602082015260018060c01b0384166040820152608060608201526000610a39608083018486610a44565b600060208284031215610b3957600080fd5b8151610b448161084d565b9392505050565b818103818111156102c7576102c76108fb565b600060208284031215610b7057600080fd5b505191905056fea2646970667358221220b1f7f2a8d7684fd1b0258e7cf5ec0e4addeb76f22a2d86c05a7beb06ed3f367a64736f6c63430008180033a2646970667358221220f62190830c13381969e014ecc7fdf95d74c87d29e01f08df834ffa96ba95aeb164736f6c63430008180033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 32 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.