Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
CompoundV3Helper
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
// Based on https://github.com/compound-developers/compound-3-developer-faq
pragma solidity 0.8.28;
library CometStructs {
struct AssetInfo {
uint8 offset;
address asset;
address priceFeed;
uint64 scale;
uint64 borrowCollateralFactor;
uint64 liquidateCollateralFactor;
uint64 liquidationFactor;
uint128 supplyCap;
}
struct UserBasic {
int104 principal;
uint64 baseTrackingIndex;
uint64 baseTrackingAccrued;
uint16 assetsIn;
uint8 _reserved;
}
struct TotalsBasic {
uint64 baseSupplyIndex;
uint64 baseBorrowIndex;
uint64 trackingSupplyIndex;
uint64 trackingBorrowIndex;
uint104 totalSupplyBase;
uint104 totalBorrowBase;
uint40 lastAccrualTime;
uint8 pauseFlags;
}
struct UserCollateral {
uint128 balance;
uint128 _reserved;
}
struct RewardOwed {
address token;
uint owed;
}
struct TotalsCollateral {
uint128 totalSupplyAsset;
uint128 _reserved;
}
}
interface Comet {
function baseScale() external view returns (uint);
function supply(address asset, uint amount) external;
function withdraw(address asset, uint amount) external;
function getSupplyRate(uint utilization) external view returns (uint);
function getBorrowRate(uint utilization) external view returns (uint);
function getAssetInfoByAddress(address asset) external view returns (CometStructs.AssetInfo memory);
function getAssetInfo(uint8 i) external view returns (CometStructs.AssetInfo memory);
function getPrice(address priceFeed) external view returns (uint128);
function userBasic(address) external view returns (CometStructs.UserBasic memory);
function totalsBasic() external view returns (CometStructs.TotalsBasic memory);
function userCollateral(address, address) external view returns (CometStructs.UserCollateral memory);
function baseTokenPriceFeed() external view returns (address);
function numAssets() external view returns (uint8);
function getUtilization() external view returns (uint);
function baseTrackingSupplySpeed() external view returns (uint);
function baseTrackingBorrowSpeed() external view returns (uint);
function totalSupply() external view returns (uint256);
function totalBorrow() external view returns (uint256);
function baseIndexScale() external pure returns (uint64);
function totalsCollateral(address asset) external view returns (CometStructs.TotalsCollateral memory);
function baseMinForRewards() external view returns (uint256);
function baseToken() external view returns (address);
}
interface CometRewards {
function getRewardOwed(address comet, address account) external returns (CometStructs.RewardOwed memory);
function claim(address comet, address src, bool shouldAccrue) external;
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function decimals() external view returns(uint8);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
contract CompoundV3Helper {
struct SupplyRate {
uint256 baseAPR;
uint256 rewardAPR;
uint256 blockHeight;
}
//address public cometAddress;
uint constant public DAYS_PER_YEAR = 365;
uint constant public SECONDS_PER_DAY = 60 * 60 * 24;
uint constant public SECONDS_PER_YEAR = SECONDS_PER_DAY * DAYS_PER_YEAR;
//uint public BASE_MANTISSA;
//uint public BASE_INDEX_SCALE;
uint constant public MAX_UINT = type(uint).max;
address immutable public REWARD_PRICE_FEED;
constructor(address _rewardPriceFeed) {
REWARD_PRICE_FEED = _rewardPriceFeed;
}
function BASE_MANTISSA(address _cometAddress) public view returns(uint256) {
return Comet(_cometAddress).baseScale();
}
function BASE_INDEX_SCALE(address _cometAddress) public view returns(uint256) {
return Comet(_cometAddress).baseIndexScale();
}
/*
* Get the current borrow APR in Compound III
*/
function getBorrowApr(address _cometAddress) public view returns (uint) {
Comet comet = Comet(_cometAddress);
uint utilization = comet.getUtilization();
return comet.getBorrowRate(utilization) * SECONDS_PER_YEAR * 100;
}
function getSupplyRateAndTvl(address _cometAddress)
external
view
returns(
SupplyRate memory rate,
uint256 baseTokenTvl,
uint256 blockUnixTimestamp
)
{
rate.blockHeight = block.number;
rate.baseAPR = getSupplyApr(_cometAddress);
rate.rewardAPR = getRewardAprForSupplyBase(_cometAddress, REWARD_PRICE_FEED);
baseTokenTvl = getBaseTokenTvl(_cometAddress);
blockUnixTimestamp = block.timestamp;
}
/*
* Get the current supply APR in Compound III
*/
function getSupplyApr(address _cometAddress) public view returns (uint) {
Comet comet = Comet(_cometAddress);
uint utilization = comet.getUtilization();
return comet.getSupplyRate(utilization) * SECONDS_PER_YEAR * 100;
}
/*
* Get the current reward for supplying APR in Compound III
* @param rewardTokenPriceFeed The address of the reward token (e.g. COMP) price feed
* @return The reward APR in USD as a decimal scaled up by 1e18
*/
function getRewardAprForSupplyBase(address _cometAddress, address rewardTokenPriceFeed) public view returns (uint) {
Comet comet = Comet(_cometAddress);
uint rewardTokenPriceInUsd = getCompoundPrice(_cometAddress, rewardTokenPriceFeed);
uint usdcPriceInUsd = getCompoundPrice(_cometAddress, comet.baseTokenPriceFeed());
uint usdcTotalSupply = comet.totalSupply();
uint baseTrackingSupplySpeed = comet.baseTrackingSupplySpeed();
uint rewardToSuppliersPerDay = baseTrackingSupplySpeed * SECONDS_PER_DAY * BASE_INDEX_SCALE(_cometAddress) / BASE_MANTISSA(_cometAddress);
// this is tech multiplyer
uint256 scale;
if (comet.baseScale() == 1e18 ) {
scale = 24;
}
uint supplyBaseRewardApr = rewardTokenPriceInUsd * rewardToSuppliersPerDay * DAYS_PER_YEAR * 10**scale
/ (usdcTotalSupply * usdcPriceInUsd);
return supplyBaseRewardApr;
}
/*
* Get the current reward for borrowing APR in Compound III
* @param rewardTokenPriceFeed The address of the reward token (e.g. COMP) price feed
* @return The reward APR in USD as a decimal scaled up by 1e18
*/
function getRewardAprForBorrowBase(address _cometAddress, address rewardTokenPriceFeed) public view returns (uint) {
Comet comet = Comet(_cometAddress);
uint rewardTokenPriceInUsd = getCompoundPrice(_cometAddress, rewardTokenPriceFeed);
uint usdcPriceInUsd = getCompoundPrice(_cometAddress, comet.baseTokenPriceFeed());
uint usdcTotalBorrow = comet.totalBorrow();
uint baseTrackingBorrowSpeed = comet.baseTrackingBorrowSpeed();
uint rewardToSuppliersPerDay = baseTrackingBorrowSpeed * SECONDS_PER_DAY * (BASE_INDEX_SCALE(_cometAddress) / BASE_MANTISSA(_cometAddress));
uint borrowBaseRewardApr = (rewardTokenPriceInUsd * rewardToSuppliersPerDay / (usdcTotalBorrow * usdcPriceInUsd)) * DAYS_PER_YEAR;
return borrowBaseRewardApr;
}
/*
* Get the price feed address for an asset
*/
function getPriceFeedAddress(address _cometAddress, address asset) public view returns (address) {
Comet comet = Comet(_cometAddress);
return comet.getAssetInfoByAddress(asset).priceFeed;
}
/*
* Get the price feed address for the base token
*/
function getBaseTokenPriceFeed(address _cometAddress) public view returns (address) {
Comet comet = Comet(_cometAddress);
return comet.baseTokenPriceFeed();
}
/*
* Get the current price of an asset from the protocol's persepctive
*/
function getCompoundPrice(address _cometAddress, address singleAssetPriceFeed) public view returns (uint) {
Comet comet = Comet(_cometAddress);
return comet.getPrice(singleAssetPriceFeed);
}
/*
* Gets the amount of reward tokens due to this contract address
*/
function getRewardsOwed(address _cometAddress, address rewardsContract) public returns (uint) {
return CometRewards(rewardsContract).getRewardOwed(_cometAddress, address(this)).owed;
}
/*
* Gets the Compound III TVL in USD scaled up by 1e8
*/
function getTvl(address _cometAddress) public view returns (uint) {
Comet comet = Comet(_cometAddress);
uint baseScale = 10 ** ERC20(_cometAddress).decimals();
uint basePrice = getCompoundPrice(_cometAddress, comet.baseTokenPriceFeed());
uint totalSupplyBase = comet.totalSupply();
uint tvlUsd = totalSupplyBase * basePrice / baseScale;
uint8 numAssets = comet.numAssets();
for (uint8 i = 0; i < numAssets; i++) {
CometStructs.AssetInfo memory asset = comet.getAssetInfo(i);
CometStructs.TotalsCollateral memory tc = comet.totalsCollateral(asset.asset);
uint price = getCompoundPrice(_cometAddress, asset.priceFeed);
uint scale = 10 ** ERC20(asset.asset).decimals();
tvlUsd += tc.totalSupplyAsset * price / scale;
}
return tvlUsd;
}
/*
* Gets the Compound III TVL of Base market token in USD scaled up by 1e8
*/
function getBaseTokenTvl(address _cometAddress) public view returns (uint tvlUsd) {
Comet comet = Comet(_cometAddress);
//address baseTokenAddress = comet.baseToken();
uint baseScale = 10 ** ERC20(_cometAddress).decimals();
uint basePrice = getCompoundPrice(_cometAddress, comet.baseTokenPriceFeed());
uint totalSupplyBase = comet.totalSupply();
//uint256 totalSupplyBase = ERC20(baseTokenAddress).balanceOf(_cometAddress);
tvlUsd = totalSupplyBase * basePrice / baseScale;
}
}{
"remappings": [
"@openzeppelin/=lib/openzeppelin-contracts/",
"@Uopenzeppelin/=lib/openzeppelin-contracts-upgradeable.git/",
"forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_rewardPriceFeed","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"}],"name":"BASE_INDEX_SCALE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"}],"name":"BASE_MANTISSA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DAYS_PER_YEAR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_UINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_PRICE_FEED","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_PER_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_PER_YEAR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"}],"name":"getBaseTokenPriceFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"}],"name":"getBaseTokenTvl","outputs":[{"internalType":"uint256","name":"tvlUsd","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"}],"name":"getBorrowApr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"},{"internalType":"address","name":"singleAssetPriceFeed","type":"address"}],"name":"getCompoundPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"},{"internalType":"address","name":"asset","type":"address"}],"name":"getPriceFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"},{"internalType":"address","name":"rewardTokenPriceFeed","type":"address"}],"name":"getRewardAprForBorrowBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"},{"internalType":"address","name":"rewardTokenPriceFeed","type":"address"}],"name":"getRewardAprForSupplyBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"},{"internalType":"address","name":"rewardsContract","type":"address"}],"name":"getRewardsOwed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"}],"name":"getSupplyApr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"}],"name":"getSupplyRateAndTvl","outputs":[{"components":[{"internalType":"uint256","name":"baseAPR","type":"uint256"},{"internalType":"uint256","name":"rewardAPR","type":"uint256"},{"internalType":"uint256","name":"blockHeight","type":"uint256"}],"internalType":"struct CompoundV3Helper.SupplyRate","name":"rate","type":"tuple"},{"internalType":"uint256","name":"baseTokenTvl","type":"uint256"},{"internalType":"uint256","name":"blockUnixTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cometAddress","type":"address"}],"name":"getTvl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a0604052348015600e575f5ffd5b5060405161149d38038061149d833981016040819052602b91603b565b6001600160a01b03166080526066565b5f60208284031215604a575f5ffd5b81516001600160a01b0381168114605f575f5ffd5b9392505050565b6080516114186100855f395f818161020d0152610f2301526114185ff3fe608060405234801561000f575f5ffd5b5060043610610111575f3560e01c8063907d12c51161009e578063c705ae561161006e578063c705ae5614610238578063c9d0a8331461024b578063d7ed0dd31461028d578063e5b5019a146102a0578063e6a69ab8146102a8575f5ffd5b8063907d12c5146101e2578063b4624fcd146101f5578063bc34821f14610208578063c6846ef81461022f575f5ffd5b80633872bbd1116100e45780633872bbd11461018c57806349ea88671461019f57806359010421146101b25780635dbe45ea146101c557806374f0314f146101d8575f5ffd5b8063132249f1146101155780631ae061381461013b5780632a7c716c14610166578063361fd5ff14610179575b5f5ffd5b610128610123366004610feb565b6102b0565b6040519081526020015b60405180910390f35b61014e610149366004610feb565b6104e7565b6040516001600160a01b039091168152602001610132565b610128610174366004611022565b610560565b610128610187366004611022565b61065c565b61012861019a366004610feb565b610700565b6101286101ad366004611022565b61077d565b6101286101c0366004611022565b610ad0565b6101286101d3366004610feb565b610c08565b6101286201518081565b6101286101f0366004611022565b610d90565b610128610203366004610feb565b610e01565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b61012861016d81565b61014e610246366004611022565b610e7d565b61025e610259366004611022565b610ee9565b60408051845181526020808601519082015293810151908401526060830191909152608082015260a001610132565b61012861029b366004611022565b610f61565b6101285f1981565b610128610fc2565b5f82816102bd8285610700565b90505f61032486846001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061019a919061104d565b90505f836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103879190611068565b90505f846001600160a01b031663189bb2f16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103c6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ea9190611068565b90505f6103f689610f61565b6103ff8a610d90565b61040c6201518085611093565b6104169190611093565b61042091906110aa565b90505f866001600160a01b03166344c1e5eb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561045f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104839190611068565b670de0b6b3a764000003610495575060185b5f6104a08686611093565b6104ab83600a6111ac565b61016d6104b8868b611093565b6104c29190611093565b6104cc9190611093565b6104d691906110aa565b985050505050505050505b92915050565b604051631d9df61760e11b81526001600160a01b0382811660048301525f918491821690633b3bec2e9060240161010060405180830381865afa158015610530573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105549190611259565b60400151949350505050565b5f5f8290505f816001600160a01b0316637eb711316040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105a2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105c69190611068565b90506105d761016d62015180611093565b604051634fd41dad60e11b8152600481018390526001600160a01b03841690639fa83b5a906024015b602060405180830381865afa15801561061b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061063f9190611068565b6106499190611093565b610654906064611093565b949350505050565b5f5f8290505f816001600160a01b0316637eb711316040518163ffffffff1660e01b8152600401602060405180830381865afa15801561069e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106c29190611068565b90506106d361016d62015180611093565b60405163d955759d60e01b8152600481018390526001600160a01b0384169063d955759d90602401610600565b6040516341976e0960e01b81526001600160a01b0382811660048301525f9184918216906341976e0990602401602060405180830381865afa158015610748573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061076c91906112ff565b6001600160801b0316949350505050565b5f5f8290505f836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190611318565b6107ee90600a611331565b90505f61083185846001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b90505f836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610870573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108949190611068565b90505f836108a28484611093565b6108ac91906110aa565b90505f856001600160a01b031663a46fe83b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061090f9190611318565b90505f5b8160ff168160ff161015610ac35760405163c8c7fe6b60e01b815260ff821660048201525f906001600160a01b0389169063c8c7fe6b9060240161010060405180830381865afa158015610969573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061098d9190611259565b60208101516040516359e017bd60e01b81526001600160a01b0391821660048201529192505f91908a16906359e017bd906024016040805180830381865afa1580156109db573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109ff919061133f565b90505f610a108c8460400151610700565b90505f83602001516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a53573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a779190611318565b610a8290600a611331565b90508082845f01516001600160801b0316610a9d9190611093565b610aa791906110aa565b610ab1908861137c565b96505060019093019250610913915050565b5090979650505050505050565b5f5f8290505f836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b12573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b369190611318565b610b4190600a611331565b90505f610b8485846001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b90505f836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bc3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610be79190611068565b905082610bf48383611093565b610bfe91906110aa565b9695505050505050565b5f8281610c158285610700565b90505f610c5886846001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b90505f836001600160a01b0316638285ef406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cbb9190611068565b90505f846001600160a01b0316639ea99a5a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfa573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d1e9190611068565b90505f610d2a89610f61565b610d338a610d90565b610d3d91906110aa565b610d4a6201518084611093565b610d549190611093565b90505f61016d610d648686611093565b610d6e8489611093565b610d7891906110aa565b610d829190611093565b9a9950505050505050505050565b5f816001600160a01b03166396e7a9c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610df1919061138f565b67ffffffffffffffff1692915050565b6040516320f0656b60e11b81526001600160a01b0383811660048301523060248301525f91908316906341e0cad69060440160408051808303815f875af1158015610e4e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e7291906113a8565b602001519392505050565b5f5f829050806001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ebe573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ee2919061104d565b9392505050565b610f0a60405180606001604052805f81526020015f81526020015f81525090565b4360408201525f80610f1b8461065c565b8352610f47847f00000000000000000000000000000000000000000000000000000000000000006102b0565b6020840152610f5584610ad0565b91504290509193909250565b5f816001600160a01b03166344c1e5eb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f9e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104e19190611068565b610fd161016d62015180611093565b81565b6001600160a01b0381168114610fe8575f5ffd5b50565b5f5f60408385031215610ffc575f5ffd5b823561100781610fd4565b9150602083013561101781610fd4565b809150509250929050565b5f60208284031215611032575f5ffd5b8135610ee281610fd4565b805161104881610fd4565b919050565b5f6020828403121561105d575f5ffd5b8151610ee281610fd4565b5f60208284031215611078575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176104e1576104e161107f565b5f826110c457634e487b7160e01b5f52601260045260245ffd5b500490565b6001815b6001841115611104578085048111156110e8576110e861107f565b60018416156110f657908102905b60019390931c9280026110cd565b935093915050565b5f8261111a575060016104e1565b8161112657505f6104e1565b816001811461113c576002811461114657611162565b60019150506104e1565b60ff8411156111575761115761107f565b50506001821b6104e1565b5060208310610133831016604e8410600b8410161715611185575081810a6104e1565b6111915f1984846110c9565b805f19048211156111a4576111a461107f565b029392505050565b5f610ee2838361110c565b604051610100810167ffffffffffffffff811182821017156111e757634e487b7160e01b5f52604160045260245ffd5b60405290565b6040805190810167ffffffffffffffff811182821017156111e757634e487b7160e01b5f52604160045260245ffd5b805160ff81168114611048575f5ffd5b805167ffffffffffffffff81168114611048575f5ffd5b80516001600160801b0381168114611048575f5ffd5b5f61010082840312801561126b575f5ffd5b506112746111b7565b61127d8361121c565b8152602083015161128d81610fd4565b602082015261129e6040840161103d565b60408201526112af6060840161122c565b60608201526112c06080840161122c565b60808201526112d160a0840161122c565b60a08201526112e260c0840161122c565b60c08201526112f360e08401611243565b60e08201529392505050565b5f6020828403121561130f575f5ffd5b610ee282611243565b5f60208284031215611328575f5ffd5b610ee28261121c565b5f610ee260ff84168361110c565b5f6040828403128015611350575f5ffd5b506113596111ed565b61136283611243565b815261137060208401611243565b60208201529392505050565b808201808211156104e1576104e161107f565b5f6020828403121561139f575f5ffd5b610ee28261122c565b5f60408284031280156113b9575f5ffd5b506113c26111ed565b82516113cd81610fd4565b8152602092830151928101929092525091905056fea2646970667358221220c32c78b920eed4fa7e13a1fa26c3e459db3377cf199f74c8da1e98a747affd5164736f6c634300081c0033000000000000000000000000dbd020caef83efd542f4de03e3cf0c28a4428bd5
Deployed Bytecode
0x608060405234801561000f575f5ffd5b5060043610610111575f3560e01c8063907d12c51161009e578063c705ae561161006e578063c705ae5614610238578063c9d0a8331461024b578063d7ed0dd31461028d578063e5b5019a146102a0578063e6a69ab8146102a8575f5ffd5b8063907d12c5146101e2578063b4624fcd146101f5578063bc34821f14610208578063c6846ef81461022f575f5ffd5b80633872bbd1116100e45780633872bbd11461018c57806349ea88671461019f57806359010421146101b25780635dbe45ea146101c557806374f0314f146101d8575f5ffd5b8063132249f1146101155780631ae061381461013b5780632a7c716c14610166578063361fd5ff14610179575b5f5ffd5b610128610123366004610feb565b6102b0565b6040519081526020015b60405180910390f35b61014e610149366004610feb565b6104e7565b6040516001600160a01b039091168152602001610132565b610128610174366004611022565b610560565b610128610187366004611022565b61065c565b61012861019a366004610feb565b610700565b6101286101ad366004611022565b61077d565b6101286101c0366004611022565b610ad0565b6101286101d3366004610feb565b610c08565b6101286201518081565b6101286101f0366004611022565b610d90565b610128610203366004610feb565b610e01565b61014e7f000000000000000000000000dbd020caef83efd542f4de03e3cf0c28a4428bd581565b61012861016d81565b61014e610246366004611022565b610e7d565b61025e610259366004611022565b610ee9565b60408051845181526020808601519082015293810151908401526060830191909152608082015260a001610132565b61012861029b366004611022565b610f61565b6101285f1981565b610128610fc2565b5f82816102bd8285610700565b90505f61032486846001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061019a919061104d565b90505f836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103879190611068565b90505f846001600160a01b031663189bb2f16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103c6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ea9190611068565b90505f6103f689610f61565b6103ff8a610d90565b61040c6201518085611093565b6104169190611093565b61042091906110aa565b90505f866001600160a01b03166344c1e5eb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561045f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104839190611068565b670de0b6b3a764000003610495575060185b5f6104a08686611093565b6104ab83600a6111ac565b61016d6104b8868b611093565b6104c29190611093565b6104cc9190611093565b6104d691906110aa565b985050505050505050505b92915050565b604051631d9df61760e11b81526001600160a01b0382811660048301525f918491821690633b3bec2e9060240161010060405180830381865afa158015610530573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105549190611259565b60400151949350505050565b5f5f8290505f816001600160a01b0316637eb711316040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105a2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105c69190611068565b90506105d761016d62015180611093565b604051634fd41dad60e11b8152600481018390526001600160a01b03841690639fa83b5a906024015b602060405180830381865afa15801561061b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061063f9190611068565b6106499190611093565b610654906064611093565b949350505050565b5f5f8290505f816001600160a01b0316637eb711316040518163ffffffff1660e01b8152600401602060405180830381865afa15801561069e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106c29190611068565b90506106d361016d62015180611093565b60405163d955759d60e01b8152600481018390526001600160a01b0384169063d955759d90602401610600565b6040516341976e0960e01b81526001600160a01b0382811660048301525f9184918216906341976e0990602401602060405180830381865afa158015610748573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061076c91906112ff565b6001600160801b0316949350505050565b5f5f8290505f836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190611318565b6107ee90600a611331565b90505f61083185846001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b90505f836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610870573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108949190611068565b90505f836108a28484611093565b6108ac91906110aa565b90505f856001600160a01b031663a46fe83b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061090f9190611318565b90505f5b8160ff168160ff161015610ac35760405163c8c7fe6b60e01b815260ff821660048201525f906001600160a01b0389169063c8c7fe6b9060240161010060405180830381865afa158015610969573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061098d9190611259565b60208101516040516359e017bd60e01b81526001600160a01b0391821660048201529192505f91908a16906359e017bd906024016040805180830381865afa1580156109db573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109ff919061133f565b90505f610a108c8460400151610700565b90505f83602001516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a53573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a779190611318565b610a8290600a611331565b90508082845f01516001600160801b0316610a9d9190611093565b610aa791906110aa565b610ab1908861137c565b96505060019093019250610913915050565b5090979650505050505050565b5f5f8290505f836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b12573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b369190611318565b610b4190600a611331565b90505f610b8485846001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b90505f836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bc3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610be79190611068565b905082610bf48383611093565b610bfe91906110aa565b9695505050505050565b5f8281610c158285610700565b90505f610c5886846001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b90505f836001600160a01b0316638285ef406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cbb9190611068565b90505f846001600160a01b0316639ea99a5a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfa573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d1e9190611068565b90505f610d2a89610f61565b610d338a610d90565b610d3d91906110aa565b610d4a6201518084611093565b610d549190611093565b90505f61016d610d648686611093565b610d6e8489611093565b610d7891906110aa565b610d829190611093565b9a9950505050505050505050565b5f816001600160a01b03166396e7a9c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610df1919061138f565b67ffffffffffffffff1692915050565b6040516320f0656b60e11b81526001600160a01b0383811660048301523060248301525f91908316906341e0cad69060440160408051808303815f875af1158015610e4e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e7291906113a8565b602001519392505050565b5f5f829050806001600160a01b031663e7dad6bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ebe573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ee2919061104d565b9392505050565b610f0a60405180606001604052805f81526020015f81526020015f81525090565b4360408201525f80610f1b8461065c565b8352610f47847f000000000000000000000000dbd020caef83efd542f4de03e3cf0c28a4428bd56102b0565b6020840152610f5584610ad0565b91504290509193909250565b5f816001600160a01b03166344c1e5eb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f9e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104e19190611068565b610fd161016d62015180611093565b81565b6001600160a01b0381168114610fe8575f5ffd5b50565b5f5f60408385031215610ffc575f5ffd5b823561100781610fd4565b9150602083013561101781610fd4565b809150509250929050565b5f60208284031215611032575f5ffd5b8135610ee281610fd4565b805161104881610fd4565b919050565b5f6020828403121561105d575f5ffd5b8151610ee281610fd4565b5f60208284031215611078575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176104e1576104e161107f565b5f826110c457634e487b7160e01b5f52601260045260245ffd5b500490565b6001815b6001841115611104578085048111156110e8576110e861107f565b60018416156110f657908102905b60019390931c9280026110cd565b935093915050565b5f8261111a575060016104e1565b8161112657505f6104e1565b816001811461113c576002811461114657611162565b60019150506104e1565b60ff8411156111575761115761107f565b50506001821b6104e1565b5060208310610133831016604e8410600b8410161715611185575081810a6104e1565b6111915f1984846110c9565b805f19048211156111a4576111a461107f565b029392505050565b5f610ee2838361110c565b604051610100810167ffffffffffffffff811182821017156111e757634e487b7160e01b5f52604160045260245ffd5b60405290565b6040805190810167ffffffffffffffff811182821017156111e757634e487b7160e01b5f52604160045260245ffd5b805160ff81168114611048575f5ffd5b805167ffffffffffffffff81168114611048575f5ffd5b80516001600160801b0381168114611048575f5ffd5b5f61010082840312801561126b575f5ffd5b506112746111b7565b61127d8361121c565b8152602083015161128d81610fd4565b602082015261129e6040840161103d565b60408201526112af6060840161122c565b60608201526112c06080840161122c565b60808201526112d160a0840161122c565b60a08201526112e260c0840161122c565b60c08201526112f360e08401611243565b60e08201529392505050565b5f6020828403121561130f575f5ffd5b610ee282611243565b5f60208284031215611328575f5ffd5b610ee28261121c565b5f610ee260ff84168361110c565b5f6040828403128015611350575f5ffd5b506113596111ed565b61136283611243565b815261137060208401611243565b60208201529392505050565b808201808211156104e1576104e161107f565b5f6020828403121561139f575f5ffd5b610ee28261122c565b5f60408284031280156113b9575f5ffd5b506113c26111ed565b82516113cd81610fd4565b8152602092830151928101929092525091905056fea2646970667358221220c32c78b920eed4fa7e13a1fa26c3e459db3377cf199f74c8da1e98a747affd5164736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000dbd020caef83efd542f4de03e3cf0c28a4428bd5
-----Decoded View---------------
Arg [0] : _rewardPriceFeed (address): 0xdbd020CAeF83eFd542f4De03e3cF0C28A4428bd5
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000dbd020caef83efd542f4de03e3cf0c28a4428bd5
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.