ETH Price: $3,442.28 (+3.38%)

Contract

0xa863cE0bCB46fcbA8D3C2874C53e6Fb52f0929eA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake211789382024-11-13 13:01:5910 days ago1731502919IN
0xa863cE0b...52f0929eA
0 ETH0.0032321335.99583924
Unstake211788252024-11-13 12:39:2310 days ago1731501563IN
0xa863cE0b...52f0929eA
0 ETH0.0030867229.83150237
Claim Bonds211788082024-11-13 12:35:5910 days ago1731501359IN
0xa863cE0b...52f0929eA
0 ETH0.0030101529.24129802
Set Epoch Durati...211788052024-11-13 12:35:2310 days ago1731501323IN
0xa863cE0b...52f0929eA
0 ETH0.0008372329.14361423
Claim Bonds211787792024-11-13 12:30:1110 days ago1731501011IN
0xa863cE0b...52f0929eA
0 ETH0.0011079527.95171575
Purchase Bond211787772024-11-13 12:29:4710 days ago1731500987IN
0xa863cE0b...52f0929eA
0 ETH0.0038000128.93620396
Offer Bond211787672024-11-13 12:27:4710 days ago1731500867IN
0xa863cE0b...52f0929eA
0 ETH0.0040997429.54432429
Unstake211787322024-11-13 12:20:4710 days ago1731500447IN
0xa863cE0b...52f0929eA
0 ETH0.0024902727.73382785
Unstake211787312024-11-13 12:20:3510 days ago1731500435IN
0xa863cE0b...52f0929eA
0 ETH0.0025198828.06355281
Claim Rewards211787292024-11-13 12:20:1110 days ago1731500411IN
0xa863cE0b...52f0929eA
0 ETH0.0018233825.43784104
Claim Rewards211787292024-11-13 12:20:1110 days ago1731500411IN
0xa863cE0b...52f0929eA
0 ETH0.0018285925.51059104
Unstake211787282024-11-13 12:19:5910 days ago1731500399IN
0xa863cE0b...52f0929eA
0 ETH0.0023513926.18717985
Set Claim Delay ...211787082024-11-13 12:15:5910 days ago1731500159IN
0xa863cE0b...52f0929eA
0 ETH0.0009366732.68016167
Set Unstake Tax211787002024-11-13 12:14:2310 days ago1731500063IN
0xa863cE0b...52f0929eA
0 ETH0.0009799834.32285002
Compound211776322024-11-13 8:39:3510 days ago1731487175IN
0xa863cE0b...52f0929eA
0 ETH0.001243919.93314411
Claim Rewards211772232024-11-13 7:17:3510 days ago1731482255IN
0xa863cE0b...52f0929eA
0 ETH0.0017621320.64355759
Compound211771192024-11-13 6:56:4710 days ago1731481007IN
0xa863cE0b...52f0929eA
0 ETH0.0009234317.32352429
Compound211771152024-11-13 6:55:5910 days ago1731480959IN
0xa863cE0b...52f0929eA
0 ETH0.0012390719.85571077
Compound211771102024-11-13 6:54:5910 days ago1731480899IN
0xa863cE0b...52f0929eA
0 ETH0.0011840718.97431347
Compound211771052024-11-13 6:53:5910 days ago1731480839IN
0xa863cE0b...52f0929eA
0 ETH0.0012616420.21744823
Stake211755102024-11-13 1:33:4711 days ago1731461627IN
0xa863cE0b...52f0929eA
0 ETH0.0059182237.7
Compound211745702024-11-12 22:24:1111 days ago1731450251IN
0xa863cE0b...52f0929eA
0 ETH0.0022627229.73978005
Compound211744172024-11-12 21:53:3511 days ago1731448415IN
0xa863cE0b...52f0929eA
0 ETH0.0016131131.93978986
Stake211744132024-11-12 21:52:4711 days ago1731448367IN
0xa863cE0b...52f0929eA
0 ETH0.0040175530.86319977
Unstake211741472024-11-12 20:59:3511 days ago1731445175IN
0xa863cE0b...52f0929eA
0 ETH0.0030527336.89548646
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingBondContract

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion, MIT license
File 1 of 9 : Staking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IToken.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

interface IOwnable2Step {
	function acceptOwnership() external;
}

contract StakingBondContract is Ownable, ReentrancyGuard {
	using SafeERC20 for IERC20;

	ICustomToken public token;
	IERC20 public usdcToken;

	struct StakeInfo {
		uint256 amount;
		uint256 pendingRewards;
		uint256 lastUpdated;
		uint256 epoch;
	}

	struct Bond {
		uint256 id;
		uint256 tokenAmount;
		uint256 pricePerToken;
		uint256 closeEpoch;
		bool isActive;
		bool isCanceled;
	}

	struct UserBondInfo {
		uint256 amountPurchased;
		bool claimed;
	}

	struct BondClaimDetails {
		uint256 bondId;
		uint256 amountToClaim;
	}

	mapping(address => StakeInfo) public userStakes;
	mapping(uint256 => Bond) public bonds;
	mapping(address => mapping(uint256 => UserBondInfo)) public userBonds;

	uint256 public constant SECONDS_IN_YEAR = 31536000;
	uint256 public bondCounter;
	uint256 public APR;
	uint256 public UNSTAKE_TAX;
	uint256 public epochDuration;
	uint256 public totalStaked;
	uint256 public totalBurned;
	uint256 public deploymentTime;
	uint256 public CLAIM_DELAY_EPOCHS;

	event Staked(address indexed user, uint256 amount);
	event Unstaked(address indexed user, uint256 amount);
	event RewardsMinted(address indexed user, uint256 amount);
	event BondOffered(
		uint256 bondId,
		uint256 tokenAmount,
		uint256 pricePerToken
	);
	event BondPurchased(
		address indexed buyer,
		uint256 bondId,
		uint256 amount,
		uint256 cost
	);
	event BondOfferCancelled(uint256 bondId, uint256 remainingTokenAmount);
	event BondClaimed(address indexed buyer, uint256 bondId, uint256 amount);
	event BondClosed(uint256 bondId);
	event USDCWithdrawn(uint256 amount);

	constructor(address _tokenAddress, address _usdcTokenAddress) {
		token = ICustomToken(_tokenAddress);
		usdcToken = IERC20(_usdcTokenAddress);
		deploymentTime = block.timestamp;
		epochDuration = 6 hours;
		CLAIM_DELAY_EPOCHS = 12;
		UNSTAKE_TAX = 10;
		APR = 1000;
	}

	function acceptTokenOwnership() external onlyOwner {
		IOwnable2Step(address(token)).acceptOwnership();
	}

	function offerBond(
		uint256 _tokenAmount,
		uint256 _pricePerToken
	) external onlyOwner {
		require(_tokenAmount > 0, "Invalid bond parameters");

		bondCounter += 1;
		bonds[bondCounter] = Bond({
			id: bondCounter,
			tokenAmount: _tokenAmount,
			pricePerToken: _pricePerToken,
			closeEpoch: 0,
			isActive: true,
			isCanceled: false
		});

		emit BondOffered(bondCounter, _tokenAmount, _pricePerToken);
	}

	function purchaseBond(
		uint256 _bondId,
		uint256 amountInUSDC
	) external nonReentrant {
		Bond storage bond = bonds[_bondId];
		require(bond.isActive, "No active bond offer");
		require(amountInUSDC > 0, "Amount must be greater than zero");
		uint256 amountDecimaled = amountInUSDC * 1e6;

		uint256 bondsToPurchase = (amountDecimaled) / bond.pricePerToken;

		require(
			bondsToPurchase <= bond.tokenAmount,
			"Not enough tokens in bond offer"
		);

		usdcToken.safeTransferFrom(msg.sender, address(this), amountDecimaled);

		bond.tokenAmount -= bondsToPurchase;

		if (bond.tokenAmount == 0) {
			bond.isActive = false;
			bond.closeEpoch = getCurrentEpoch();
			emit BondClosed(_bondId);
		}

		UserBondInfo storage userBond = userBonds[msg.sender][_bondId];
		userBond.amountPurchased += bondsToPurchase;

		emit BondPurchased(
			msg.sender,
			_bondId,
			bondsToPurchase,
			amountDecimaled
		);
	}

	function claimBonds(uint256[] calldata bondIds) external nonReentrant {
		uint256 currentEpoch = getCurrentEpoch();

		for (uint256 i = 0; i < bondIds.length; i++) {
			uint256 _bondId = bondIds[i];
			UserBondInfo storage userBond = userBonds[msg.sender][_bondId];
			Bond storage bond = bonds[_bondId];

			if (bond.isCanceled) {
				continue;
			}

			if (userBond.amountPurchased == 0) {
				continue;
			}

			if (userBond.claimed) {
				continue;
			}

			uint256 requiredEpoch = bond.closeEpoch + CLAIM_DELAY_EPOCHS;

			if (bond.closeEpoch == 0 || currentEpoch < requiredEpoch) {
				continue;
			}

			userBond.claimed = true;
			uint256 toMint = userBond.amountPurchased * 1e18;
			token.mint(msg.sender, toMint);

			emit BondClaimed(msg.sender, _bondId, toMint);
		}
	}

	function cancelBondOffer(uint256 _bondId) external onlyOwner {
		Bond storage bond = bonds[_bondId];
		require(!bond.isCanceled, "Bond offer already canceled");
		bond.isCanceled = true;
		bond.isActive = false;

		emit BondOfferCancelled(_bondId, bond.tokenAmount);
	}

	function withdrawUSDC(uint256 _amount) external onlyOwner {
		uint256 balance = usdcToken.balanceOf(address(this));
		require(_amount <= balance, "Amount exceeds balance");
		usdcToken.safeTransfer(owner(), _amount);
		emit USDCWithdrawn(_amount);
	}

	function stake(uint256 amount) external nonReentrant {
		require(amount > 0, "Amount must be greater than zero");

		token.transferFrom(msg.sender, address(this), amount);
		token.burn(amount);
		totalBurned += amount;

		StakeInfo storage stakeInfo = userStakes[msg.sender];
		uint256 currentTimestamp = block.timestamp;

		uint256 timeElapsed = currentTimestamp - stakeInfo.lastUpdated;

		if (stakeInfo.amount > 0 && timeElapsed > 0) {
			uint256 rewards = (stakeInfo.amount * APR * timeElapsed) /
				(100 * SECONDS_IN_YEAR);
			stakeInfo.pendingRewards += rewards;
		}

		stakeInfo.amount += amount;
		stakeInfo.lastUpdated = currentTimestamp;
		stakeInfo.epoch = getCurrentEpoch();
		totalStaked += amount;

		emit Staked(msg.sender, amount);
	}

	function unstake() external nonReentrant {
		StakeInfo storage stakeInfo = userStakes[msg.sender];
		uint256 amount = stakeInfo.amount;
		require(amount > 0, "No staked amount to unstake");

		uint256 currentEpoch = getCurrentEpoch();
		require(
			currentEpoch > stakeInfo.epoch,
			"Cannot unstake before the next epoch"
		);

		uint256 currentTimestamp = block.timestamp;
		uint256 timeElapsed = currentTimestamp - stakeInfo.lastUpdated;

		if (timeElapsed > 0) {
			uint256 rewards = (stakeInfo.amount * APR * timeElapsed) /
				(100 * SECONDS_IN_YEAR);
			stakeInfo.pendingRewards += rewards;
			stakeInfo.lastUpdated = currentTimestamp;
		}

		uint256 rewardsToClaim = stakeInfo.pendingRewards;

		stakeInfo.pendingRewards = 0;
		stakeInfo.lastUpdated = currentTimestamp;

		if (rewardsToClaim > 0) {
			token.mint(msg.sender, rewardsToClaim);
			emit RewardsMinted(msg.sender, rewardsToClaim);
		}

		stakeInfo.amount -= amount;
		totalStaked -= amount;

		uint256 taxAmount = (amount * UNSTAKE_TAX) / 100;
		uint256 amountAfterTax = amount - taxAmount;

		if (amountAfterTax > 0) {
			token.mint(msg.sender, amountAfterTax);
			totalBurned = totalBurned >= amountAfterTax
				? totalBurned - amountAfterTax
				: 0;
			emit Unstaked(msg.sender, amountAfterTax);
		}
	}

	function calculateRewards(address user) public view returns (uint256) {
		StakeInfo storage stakeInfo = userStakes[user];
		if (stakeInfo.amount == 0) {
			return stakeInfo.pendingRewards;
		}

		uint256 timeElapsed = block.timestamp - stakeInfo.lastUpdated;
		if (timeElapsed == 0) {
			return stakeInfo.pendingRewards;
		}

		uint256 rewards = (stakeInfo.amount * APR * timeElapsed) /
			(100 * SECONDS_IN_YEAR);

		uint256 totalRewards = stakeInfo.pendingRewards + rewards;

		return totalRewards;
	}

	function claimRewards() external nonReentrant {
		StakeInfo storage stakeInfo = userStakes[msg.sender];
		require(stakeInfo.amount > 0, "No staked amount");

		uint256 currentTimestamp = block.timestamp;
		uint256 timeElapsed = currentTimestamp - stakeInfo.lastUpdated;

		if (timeElapsed > 0) {
			uint256 rewards = (stakeInfo.amount * APR * timeElapsed) /
				(100 * SECONDS_IN_YEAR);
			stakeInfo.pendingRewards += rewards;
		}

		uint256 rewardsToClaim = stakeInfo.pendingRewards;
		require(rewardsToClaim > 0, "No rewards to claim");

		stakeInfo.pendingRewards = 0;
		stakeInfo.lastUpdated = currentTimestamp;

		token.mint(msg.sender, rewardsToClaim);

		totalBurned = totalBurned >= rewardsToClaim
			? totalBurned - rewardsToClaim
			: 0;

		emit RewardsMinted(msg.sender, rewardsToClaim);
	}

	function compound() external nonReentrant {
		StakeInfo storage stakeInfo = userStakes[msg.sender];
		require(stakeInfo.amount > 0, "No staked amount to compound");

		uint256 currentTimestamp = block.timestamp;
		uint256 timeElapsed = currentTimestamp - stakeInfo.lastUpdated;

		if (timeElapsed > 0) {
			uint256 rewards = (stakeInfo.amount * APR * timeElapsed) /
				(100 * SECONDS_IN_YEAR);
			stakeInfo.pendingRewards += rewards;
		}

		uint256 rewardsToCompound = stakeInfo.pendingRewards;
		require(rewardsToCompound > 0, "No rewards to compound");

		stakeInfo.pendingRewards = 0;
		stakeInfo.lastUpdated = currentTimestamp;
		stakeInfo.epoch = getCurrentEpoch();

		stakeInfo.amount += rewardsToCompound;
		totalStaked += rewardsToCompound;

		emit Staked(msg.sender, rewardsToCompound);
	}

	// Setters
	function setAPR(uint256 _newAPR) external onlyOwner {
		APR = _newAPR;
	}

	function setUnstakeTax(uint256 _newTax) external onlyOwner {
		UNSTAKE_TAX = _newTax;
	}

	function setEpochDuration(uint256 _newEpochDuration) external onlyOwner {
		epochDuration = _newEpochDuration;
	}

	function setClaimDelayEpochs(uint256 _newClaimDelay) external onlyOwner {
		CLAIM_DELAY_EPOCHS = _newClaimDelay;
	}

	function setTokenAddress(address _newTokenAddress) external onlyOwner {
		token = ICustomToken(_newTokenAddress);
	}

	function setUsdcTokenAddress(address _newUSDCAddress) external onlyOwner {
		usdcToken = IERC20(_newUSDCAddress);
	}

	// Getters Bond

	function getBondDetails(
		uint256 _bondId
	)
		external
		view
		returns (
			uint256 tokenAmount,
			uint256 pricePerToken,
			uint256 closeEpoch,
			bool isActive
		)
	{
		Bond storage bond = bonds[_bondId];
		return (
			bond.tokenAmount,
			bond.pricePerToken,
			bond.closeEpoch,
			bond.isActive
		);
	}

	// Getters Staking

	function getCurrentEpoch() public view returns (uint256) {
		return (block.timestamp - deploymentTime) / epochDuration;
	}

	function timeUntilNextEpoch() public view returns (uint256) {
		unchecked {
			uint256 timeInCurrentEpoch = (block.timestamp - deploymentTime) %
				epochDuration;
			return epochDuration - timeInCurrentEpoch;
		}
	}

	function getTotalUserStake(address user) public view returns (uint256) {
		return userStakes[user].amount;
	}

	function getNextEpochYield() external view returns (uint256) {
		uint256 numerator = APR * epochDuration * 1e6;
		uint256 denominator = 100 * SECONDS_IN_YEAR;
		uint256 yieldPercentage = numerator / denominator;
		return yieldPercentage;
	}

	function calculateDailyRewards(
		address user
	) external view returns (uint256) {
		StakeInfo storage stakeInfo = userStakes[user];
		if (stakeInfo.amount == 0) {
			return 0;
		}

		uint256 dayInSeconds = 1 days;
		uint256 rewards = (stakeInfo.amount * APR * dayInSeconds) /
			(100 * SECONDS_IN_YEAR);
		return rewards;
	}

	function calculateNextEpochRewards(
		address user
	) external view returns (uint256) {
		StakeInfo storage stakeInfo = userStakes[user];
		if (stakeInfo.amount == 0) {
			return 0;
		}

		uint256 epochTime = epochDuration;
		uint256 rewards = (stakeInfo.amount * APR * epochTime) /
			(100 * SECONDS_IN_YEAR);
		return rewards;
	}

	function getBondInfo(
		address user,
		bool onlyClaimable
	) external view returns (BondClaimDetails[] memory) {
		uint256 count = 0;
		uint256 currentEpoch = getCurrentEpoch();
		BondClaimDetails[] memory tempBonds = new BondClaimDetails[](
			bondCounter
		);

		for (uint256 i = 1; i <= bondCounter; i++) {
			UserBondInfo storage userBond = userBonds[user][i];
			Bond storage bond = bonds[i];

			if (userBond.amountPurchased > 0 && !userBond.claimed) {
				bool isClaimable = (bond.closeEpoch > 0 &&
					currentEpoch >= bond.closeEpoch + CLAIM_DELAY_EPOCHS);

				if (!onlyClaimable || isClaimable) {
					tempBonds[count] = BondClaimDetails({
						bondId: i,
						amountToClaim: userBond.amountPurchased
					});
					count++;
				}
			}
		}

		BondClaimDetails[] memory result = new BondClaimDetails[](count);
		for (uint256 j = 0; j < count; j++) {
			result[j] = tempBonds[j];
		}

		return result;
	}
}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 4 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}

File 5 of 9 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 6 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 9 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 8 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 9 of 9 : IToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ICustomToken {
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    function transfer(address recipient, uint256 amount) external returns (bool); 
    function balanceOf(address account) external view returns (uint256);
    function burn(uint256 amount) external;
    function mint(address to, uint256 amount) external;
    function totalSupply() external view returns (uint256); 
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "viaIR": true,
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_usdcTokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"bondId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BondClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bondId","type":"uint256"}],"name":"BondClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bondId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"remainingTokenAmount","type":"uint256"}],"name":"BondOfferCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bondId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pricePerToken","type":"uint256"}],"name":"BondOffered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"bondId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"}],"name":"BondPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"USDCWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"APR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CLAIM_DELAY_EPOCHS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_IN_YEAR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNSTAKE_TAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptTokenOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bondCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bonds","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"uint256","name":"closeEpoch","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"bool","name":"isCanceled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculateDailyRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculateNextEpochRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculateRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondId","type":"uint256"}],"name":"cancelBondOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"bondIds","type":"uint256[]"}],"name":"claimBonds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deploymentTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondId","type":"uint256"}],"name":"getBondDetails","outputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"uint256","name":"closeEpoch","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"onlyClaimable","type":"bool"}],"name":"getBondInfo","outputs":[{"components":[{"internalType":"uint256","name":"bondId","type":"uint256"},{"internalType":"uint256","name":"amountToClaim","type":"uint256"}],"internalType":"struct StakingBondContract.BondClaimDetails[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextEpochYield","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getTotalUserStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"}],"name":"offerBond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondId","type":"uint256"},{"internalType":"uint256","name":"amountInUSDC","type":"uint256"}],"name":"purchaseBond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAPR","type":"uint256"}],"name":"setAPR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newClaimDelay","type":"uint256"}],"name":"setClaimDelayEpochs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newEpochDuration","type":"uint256"}],"name":"setEpochDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newTokenAddress","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTax","type":"uint256"}],"name":"setUnstakeTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newUSDCAddress","type":"address"}],"name":"setUsdcTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeUntilNextEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract ICustomToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdcToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userBonds","outputs":[{"internalType":"uint256","name":"amountPurchased","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userStakes","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"pendingRewards","type":"uint256"},{"internalType":"uint256","name":"lastUpdated","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608034620000ea57601f6200212438819003918201601f19168301916001600160401b03831184841017620000ef578084926040948552833981010312620000ea576200005a6020620000528362000105565b920162000105565b60008054336001600160a01b0319808316821784556040519590946001600160a01b03949093859391908416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055168360025416176002551690600354161760035542600d55615460600a55600c600e55600a6009556103e860085561200990816200011b8239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620000ea5756fe60806040908082526004908136101561001757600080fd5b600090813560e01c9081630436f2f6146119c75750806307ec35a2146119a557806311eac8551461197c57806321aa3e991461178e57806326a4e8d2146117495780632998e87d1461155e5780632ab65c0c1461153c5780632acb5879146113ca5780632def66201461110e57806330024dfe146110ec5780633526a7ca1461109b578063372500ab14610eee5780633858e81714610ec857806338a5e01614610e605780634ff0876a14610e41578063514efb3714610c2b57806355e7a6c814610c0c5780635831d88514610bed5780635a5da62714610ba95780635dcc939114610b8a5780635f1c17c014610b2557806364ab867514610aff57806364edb53514610ac8578063715018a614610a6e578063817b1cd214610a4f578063854303cf14610a2d5780638da5cb5b14610a055780638da7ad23146109ac578063a694fc3a146107d3578063b0d7945c146107b4578063b97dd9e214610790578063bd30558e14610771578063c3ae2880146106b0578063c4accfbd14610683578063d89135cd14610664578063db81f99b14610518578063ecda10f5146104f9578063f2fde38b14610435578063f3fd622f146103f0578063f69e20461461027b578063fc0c546a1461024e5763fc9bddf1146101f357600080fd5b3461024b578060031936011261024b57610212600854600a5490611b75565b91620f4240928381029381850414901517156102385760208363bbf81e00865191048152f35b634e487b7160e01b825260119052602490fd5b80fd5b50823461027757816003193601126102775760025490516001600160a01b039091168152602090f35b5080fd5b5091346103ec57826003193601126103ec57610295611bb5565b33835281602052808320805480156103a957600282016102b6815442611ba8565b80610377575b5060018301805495861561033b5750918591876102f994554290556102ef6102e6600d5442611ba8565b600a5490611b88565b6003850155611b07565b905561030782600b54611b07565b600b55519081527f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d60203392a26001805580f35b606490602087519162461bcd60e51b83528201526016602482015275139bc81c995dd85c991cc81d1bc818dbdb5c1bdd5b9960521b6044820152fd5b61039163bbf81e009161038c60085486611b75565b611b75565b046103a160018501918254611b07565b9055386102bc565b825162461bcd60e51b8152602081860152601c60248201527f4e6f207374616b656420616d6f756e7420746f20636f6d706f756e64000000006044820152606490fd5b8280fd5b503461024b57602036600319011261024b5761040a611a16565b610412611a47565b60018060a01b03166bffffffffffffffffffffffff60a01b600354161760035580f35b509190346103ec5760203660031901126103ec57610451611a16565b9061045a611a47565b6001600160a01b039182169283156104a757505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b508234610277578160031936011261027757602090600d549051908152f35b50903461027757602090816003193601126103ec57803590610538611a47565b60035485516370a0823160e01b815230818401526001600160a01b0391821692908581602481875afa90811561065a578791610629575b5084116105ed57508454865163a9059cbb60e01b8682015291166001600160a01b031660248201526044810183905293947f4eacc637a5fb1dbbc94595a9432e0a8d75ae5d51d189021963a6cc8575465ddf9490916105e591906105e082606481015b03601f198101845283611ae5565b611c23565b51908152a180f35b865162461bcd60e51b81529081018590526016602482015275416d6f756e7420657863656564732062616c616e636560501b6044820152606490fd5b90508581813d8311610653575b6106408183611ae5565b8101031261064f57513861056f565b8680fd5b503d610636565b88513d89823e3d90fd5b508234610277578160031936011261027757602090600c549051908152f35b508234610277576020366003190112610277576020906106a96106a4611a16565b611ef5565b9051908152f35b5082346102775760203660031901126102775782356106cd611a47565b8083526005602052818320938085019081549060ff8260081c1661072e5750946001916101007fb19d423f2c612e4aec4c7027b9c2ca2c75f51ef29e56defb57974f8213fceda7969761ffff1916179055015482519182526020820152a180f35b606490602086519162461bcd60e51b8352820152601b60248201527f426f6e64206f6666657220616c72656164792063616e63656c656400000000006044820152fd5b5082346102775781600319360112610277576020906008549051908152f35b5082346102775781600319360112610277576020906106a96102e6600d5442611ba8565b5082346102775781600319360112610277576020906009549051908152f35b50809183346109a857602090816003193601126109a3578235926107f5611bb5565b610800841515611b2a565b60025482516323b872dd60e01b815233838201908152306020820152604081018790526001600160a01b03928691839185169082908b90829060600103925af180156109995761096c575b5060025416803b156109685785906024845180988193630852cd8d60e31b835289878401525af194851561095e577f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d949561094f575b506108ae85600c54611b07565b600c553386528252808520600281016108e3866108cc835442611ba8565b84549081151580610946575b610919575b50611b07565b825542905560036108f96102e6600d5442611ba8565b91015561090884600b54611b07565b600b55519283523392a26001805580f35b61092e63bbf81e009161038c60085485611b75565b0461093e60018701918254611b07565b90558a6108dd565b508015156108d8565b61095890611a9f565b866108a1565b82513d88823e3d90fd5b8580fd5b61098b90853d8711610992575b6109838183611ae5565b810190611c0b565b508761084b565b503d610979565b84513d89823e3d90fd5b505050fd5b5050fd5b509190346103ec5760203660031901126103ec5760809282916001600160a01b036109d5611a16565b16825260205220908154916001810154916003600283015492015492815194855260208501528301526060820152f35b508234610277578160031936011261027757905490516001600160a01b039091168152602090f35b50903461027757602036600319011261027757610a48611a47565b3560085580f35b508234610277578160031936011261027757602090600b549051908152f35b503461024b578060031936011261024b57610a87611a47565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b509190346103ec5760203660031901126103ec5760209282916001600160a01b03610af1611a16565b168252845220549051908152f35b508234610277576020366003190112610277576020906106a9610b20611a16565b611e37565b5091346103ec5760203660031901126103ec578060ff9160c094843581526005602052208054936001820154926002830154916003840154930154938151968752602087015285015260608401528181161515608084015260081c16151560a0820152f35b508234610277578160031936011261027757602090516301e133808152f35b5082903461024b578060031936011261024b57600d54420391600a54918215610bda57815183850684038152602090f35b634e487b7160e01b815260128552602490fd5b5082346102775781600319360112610277576020906007549051908152f35b508234610277578160031936011261027757602090600e549051908152f35b50903461027757610c3b36611a31565b9091610c45611bb5565b82845260206005815285852082810160ff81541615610e07578415610c6a8115611b2a565b620f4240808702968704141715610df457610c89600283015486611b88565b93600183019081548611610db1575060035489516323b872dd60e01b8187015233602482015230604482015260648101889052989997987f508ab912bdec45488e12f3749cdc690a80c994b9052a94b8865791f1df7afae098610d5c9690959094909390929091610d0a916001600160a01b03166105e082608481016105d2565b610d15878254611ba8565b80915515610d66575b5050338852600681528188209087895252808720610d3d848254611b07565b9055519283923396846040919493926060820195825260208201520152565b0390a26001805580f35b60ff1981541690556003610d7f6102e6600d5442611ba8565b9101557fb9a5a19afbb63e06e7bd9fd9dc0ecb5b442bf73a6c7f68b6e98312d448094ec6818351898152a13880610d1e565b895162461bcd60e51b8152908101859052601f60248201527f4e6f7420656e6f75676820746f6b656e7320696e20626f6e64206f66666572006044820152606490fd5b634e487b7160e01b875260118452602487fd5b875162461bcd60e51b8152808501849052601460248201527327379030b1ba34bb32903137b7321037b33332b960611b6044820152606490fd5b508234610277578160031936011261027757602090600a549051908152f35b50918291346109a857826003193601126109a857610e7c611a47565b6002546001600160a01b0316803b156109a35783918351809581936379ba509760e01b83525af1908115610ebf5750610eb3575080f35b610ebc90611a9f565b80f35b513d84823e3d90fd5b508234610277576020366003190112610277576020906106a9610ee9611a16565b611ea6565b5091346103ec57826003193601126103ec57610f08611bb5565b33835281602052808320918254928315611065578060026001920194610f2f865442611ba8565b9081611037575b505001928354938415610ffe578590554290556002546001600160a01b0316908490823b156102775783516340c10f1960e01b8152339181019182526020820186905292839182908490829060400103925af18015610ff457610fe5575b50600c5482808210610fdd57610fa991611ba8565b600c55519081527f5387ab2b2012a616dcfbc6c0f6c6f7a6ef5b3fc7c7740476f7b20b65f50d597260203392a26001805580f35b505082610fa9565b610fee90611a9f565b38610f94565b82513d86823e3d90fd5b835162461bcd60e51b815260208185015260136024820152724e6f207265776172647320746f20636c61696d60681b6044820152606490fd5b63bbf81e009161038c61104d9260085490611b75565b0461105c838301918254611b07565b90553880610f36565b506020606492519162461bcd60e51b8352820152601060248201526f139bc81cdd185ad95908185b5bdd5b9d60821b6044820152fd5b5082346102775780600319360112610277579081906001600160a01b036110c0611a16565b168152600660205281812060243582526020522060ff6001825492015416825191825215156020820152f35b50903461027757602036600319011261027757611107611a47565b35600a5580f35b509190346103ec57826003193601126103ec57611129611bb5565b3383528060205281832091825480156113875761114b6102e6600d5442611ba8565b60038501541015611338576002840193611166855442611ba8565b8061130b575b506001810194868654965542905584611273575b6111b892939450611192828254611ba8565b90556111a081600b54611ba8565b600b5560646111b160095483611b75565b0490611ba8565b91826111c7575b836001805580f35b6002546001600160a01b0316908490823b156102775783516340c10f1960e01b8152339181019182526020820186905292839182908490829060400103925af18015610ff457611264575b50600c548280821061125c5761122791611ba8565b600c55519081527f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f7560203392a23880806111bf565b505082611227565b61126d90611a9f565b38611212565b6002546001600160a01b031694853b1561064f5783516340c10f1960e01b815233868201908152602081018390529096889188919082908490829060400103925af1958615610999576111b89495966112fc575b5084519081527f5387ab2b2012a616dcfbc6c0f6c6f7a6ef5b3fc7c7740476f7b20b65f50d597260203392a284939250611180565b61130590611a9f565b386112c7565b61132063bbf81e009161038c60085486611b75565b0461133060018301918254611b07565b90553861116c565b815162461bcd60e51b81526020818501526024808201527f43616e6e6f7420756e7374616b65206265666f726520746865206e65787420656044820152630e0dec6d60e31b6064820152608490fd5b815162461bcd60e51b8152602081850152601b60248201527f4e6f207374616b656420616d6f756e7420746f20756e7374616b6500000000006044820152606490fd5b508234610277576113da36611a31565b6113e5929192611a47565b82156114f957600754600181018091116114e6578060075582519060c0820182811067ffffffffffffffff8211176114d357907f32496e64ac533cca4d99373b8746e36477ece85c1fa1fedc027dfa2570b6bf5296976114cd9493928652818352602083019287845286810185815260608201908b825260808301956001875260a08401958d87528d526005602052898d209351845551600184015551600283015551600382015501915115159060ff61ff0084549251151560081b1692169061ffff1916171790556007549251938493846040919493926060820195825260208201520152565b0390a180f35b634e487b7160e01b875260418852602487fd5b634e487b7160e01b855260118652602485fd5b815162461bcd60e51b8152602081870152601760248201527f496e76616c696420626f6e6420706172616d65746572730000000000000000006044820152606490fd5b50903461027757602036600319011261027757611557611a47565b35600e5580f35b508234610277578060031936011261027757611578611a16565b906024359081159283158093036117455793909291819061159e6102e6600d5442611ba8565b90600754916115ac83611f48565b6001989096906001600160a01b0316895b85811115611664575050505050506115d481611f48565b92825b82811061162b575050508251938493602080860191818752855180935281818801960194905b83821061160a5787870388f35b855180518852830151878401528897509586019594820194908401906115fd565b8061163e61165a92849997989699611fa9565b516116498289611fa9565b526116548188611fa9565b50611e28565b95929493956115d7565b81889b999a985289898c8a8860209260068452828120878252845282808220916005865220908054958615159182611736575b50506116b7575b5050505050506116ad90611e28565b99969897996115bd565b60030154801515908161171f575b508891611717575b506116da575b888261169e565b8a61170b94869c946116ad97946117009451956116f687611ac9565b8652850152611fa9565b52611654818d611fa9565b969050898c808a6116d3565b9050386116cd565b61172d9150600e5490611b07565b891015386116c5565b60ff9250015416158f38611697565b8480fd5b503461024b57602036600319011261024b57611763611a16565b61176b611a47565b60018060a01b03166bffffffffffffffffffffffff60a01b600254161760025580f35b509190346103ec576020908160031936011261197857803567ffffffffffffffff92838211610968573660238301121561096857818301359384116109685760059260243686861b8501820111611974576117e7611bb5565b6117f66102e6600d5442611ba8565b93885b87811061180857896001805580f35b8281881b8301013590338b5260068652898b20828c528652898b20918887528a8c2060ff93848883015460081c166119675780549485156119405760018092019283549182166119585760030154611862600e5482611b07565b901590811561194e575b506119405760ff1916179055670de0b6b3a76400008084029384040361192e576002546001600160a01b0316928c843b1561024b578c516340c10f1960e01b815233818a01908152602081018490529095869182908490829060400103925af19384156119245761191094611915575b508b51918252878201527f0ce25aff308b2de96a6a6ba8f55ec4abe905f18672cdaad10dc44aae1fd3579f8b3392a2611e28565b6117f9565b61191e90611a9f565b386118dc565b8c513d8f823e3d90fd5b634e487b7160e01b8c5260118652848cfd5b505050506119109150611e28565b90508b103861186c565b50505050506119109150611e28565b5050506119109150611e28565b8780fd5b8380fd5b50823461027757816003193601126102775760035490516001600160a01b039091168152602090f35b509034610277576020366003190112610277576119c0611a47565b3560095580f35b90508284346119785760203660031901126119785780608094833581526005602052209060018201549260ff600284015491600385015494015416938552602085015283015215156060820152f35b600435906001600160a01b0382168203611a2c57565b600080fd5b6040906003190112611a2c576004359060243590565b6000546001600160a01b03163303611a5b57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b67ffffffffffffffff8111611ab357604052565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff821117611ab357604052565b90601f8019910116810190811067ffffffffffffffff821117611ab357604052565b91908201809211611b1457565b634e487b7160e01b600052601160045260246000fd5b15611b3157565b606460405162461bcd60e51b815260206004820152602060248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f6044820152fd5b81810292918115918404141715611b1457565b8115611b92570490565b634e487b7160e01b600052601260045260246000fd5b91908203918211611b1457565b600260015414611bc6576002600155565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b90816020910312611a2c57518015158103611a2c5790565b6040516001600160a01b03909116929190611c3d81611ac9565b6020918282527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564838301526000808285829451910182895af13d15611d48573d9567ffffffffffffffff8711611d3457611cb894959660405190611caa88601f19601f8401160183611ae5565b81528093873d92013e611d54565b80519081611cc557505050565b8280611cd5938301019101611c0b565b15611cdd5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b634e487b7160e01b83526041600452602483fd5b611cb893949591506060915b91929015611db65750815115611d68575090565b3b15611d715790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015611dc95750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510611e0f575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611dec565b6000198114611b145760010190565b6001600160a01b031660009081526004602052604090208054908115611e9d57611e65600282015442611ba8565b918215611e935763bbf81e00611e87611e909461038c60019460085490611b75565b04910154611b07565b90565b5060019150015490565b60019150015490565b6001600160a01b03166000908152600460205260409020548015611eef57600854611ed091611b75565b6201518090818102918183041490151715611b145763bbf81e00900490565b50600090565b6001600160a01b03166000908152600460205260409020548015611eef57611f2c63bbf81e009161038c600a549160085490611b75565b0490565b67ffffffffffffffff8111611ab35760051b60200190565b90611f5282611f30565b604090611f6182519182611ae5565b8381528093611f72601f1991611f30565b0191600090815b848110611f87575050505050565b6020908251611f9581611ac9565b848152828581830152828701015201611f79565b8051821015611fbd5760209160051b010190565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220fb006285794c624288ef74dfd70feaa3e320c2921e6f4449c056027cd72cd7b564736f6c6343000811003300000000000000000000000077777bf11ab5b96753ea48e0401667a70675841e000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

Deployed Bytecode

0x60806040908082526004908136101561001757600080fd5b600090813560e01c9081630436f2f6146119c75750806307ec35a2146119a557806311eac8551461197c57806321aa3e991461178e57806326a4e8d2146117495780632998e87d1461155e5780632ab65c0c1461153c5780632acb5879146113ca5780632def66201461110e57806330024dfe146110ec5780633526a7ca1461109b578063372500ab14610eee5780633858e81714610ec857806338a5e01614610e605780634ff0876a14610e41578063514efb3714610c2b57806355e7a6c814610c0c5780635831d88514610bed5780635a5da62714610ba95780635dcc939114610b8a5780635f1c17c014610b2557806364ab867514610aff57806364edb53514610ac8578063715018a614610a6e578063817b1cd214610a4f578063854303cf14610a2d5780638da5cb5b14610a055780638da7ad23146109ac578063a694fc3a146107d3578063b0d7945c146107b4578063b97dd9e214610790578063bd30558e14610771578063c3ae2880146106b0578063c4accfbd14610683578063d89135cd14610664578063db81f99b14610518578063ecda10f5146104f9578063f2fde38b14610435578063f3fd622f146103f0578063f69e20461461027b578063fc0c546a1461024e5763fc9bddf1146101f357600080fd5b3461024b578060031936011261024b57610212600854600a5490611b75565b91620f4240928381029381850414901517156102385760208363bbf81e00865191048152f35b634e487b7160e01b825260119052602490fd5b80fd5b50823461027757816003193601126102775760025490516001600160a01b039091168152602090f35b5080fd5b5091346103ec57826003193601126103ec57610295611bb5565b33835281602052808320805480156103a957600282016102b6815442611ba8565b80610377575b5060018301805495861561033b5750918591876102f994554290556102ef6102e6600d5442611ba8565b600a5490611b88565b6003850155611b07565b905561030782600b54611b07565b600b55519081527f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d60203392a26001805580f35b606490602087519162461bcd60e51b83528201526016602482015275139bc81c995dd85c991cc81d1bc818dbdb5c1bdd5b9960521b6044820152fd5b61039163bbf81e009161038c60085486611b75565b611b75565b046103a160018501918254611b07565b9055386102bc565b825162461bcd60e51b8152602081860152601c60248201527f4e6f207374616b656420616d6f756e7420746f20636f6d706f756e64000000006044820152606490fd5b8280fd5b503461024b57602036600319011261024b5761040a611a16565b610412611a47565b60018060a01b03166bffffffffffffffffffffffff60a01b600354161760035580f35b509190346103ec5760203660031901126103ec57610451611a16565b9061045a611a47565b6001600160a01b039182169283156104a757505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b508234610277578160031936011261027757602090600d549051908152f35b50903461027757602090816003193601126103ec57803590610538611a47565b60035485516370a0823160e01b815230818401526001600160a01b0391821692908581602481875afa90811561065a578791610629575b5084116105ed57508454865163a9059cbb60e01b8682015291166001600160a01b031660248201526044810183905293947f4eacc637a5fb1dbbc94595a9432e0a8d75ae5d51d189021963a6cc8575465ddf9490916105e591906105e082606481015b03601f198101845283611ae5565b611c23565b51908152a180f35b865162461bcd60e51b81529081018590526016602482015275416d6f756e7420657863656564732062616c616e636560501b6044820152606490fd5b90508581813d8311610653575b6106408183611ae5565b8101031261064f57513861056f565b8680fd5b503d610636565b88513d89823e3d90fd5b508234610277578160031936011261027757602090600c549051908152f35b508234610277576020366003190112610277576020906106a96106a4611a16565b611ef5565b9051908152f35b5082346102775760203660031901126102775782356106cd611a47565b8083526005602052818320938085019081549060ff8260081c1661072e5750946001916101007fb19d423f2c612e4aec4c7027b9c2ca2c75f51ef29e56defb57974f8213fceda7969761ffff1916179055015482519182526020820152a180f35b606490602086519162461bcd60e51b8352820152601b60248201527f426f6e64206f6666657220616c72656164792063616e63656c656400000000006044820152fd5b5082346102775781600319360112610277576020906008549051908152f35b5082346102775781600319360112610277576020906106a96102e6600d5442611ba8565b5082346102775781600319360112610277576020906009549051908152f35b50809183346109a857602090816003193601126109a3578235926107f5611bb5565b610800841515611b2a565b60025482516323b872dd60e01b815233838201908152306020820152604081018790526001600160a01b03928691839185169082908b90829060600103925af180156109995761096c575b5060025416803b156109685785906024845180988193630852cd8d60e31b835289878401525af194851561095e577f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d949561094f575b506108ae85600c54611b07565b600c553386528252808520600281016108e3866108cc835442611ba8565b84549081151580610946575b610919575b50611b07565b825542905560036108f96102e6600d5442611ba8565b91015561090884600b54611b07565b600b55519283523392a26001805580f35b61092e63bbf81e009161038c60085485611b75565b0461093e60018701918254611b07565b90558a6108dd565b508015156108d8565b61095890611a9f565b866108a1565b82513d88823e3d90fd5b8580fd5b61098b90853d8711610992575b6109838183611ae5565b810190611c0b565b508761084b565b503d610979565b84513d89823e3d90fd5b505050fd5b5050fd5b509190346103ec5760203660031901126103ec5760809282916001600160a01b036109d5611a16565b16825260205220908154916001810154916003600283015492015492815194855260208501528301526060820152f35b508234610277578160031936011261027757905490516001600160a01b039091168152602090f35b50903461027757602036600319011261027757610a48611a47565b3560085580f35b508234610277578160031936011261027757602090600b549051908152f35b503461024b578060031936011261024b57610a87611a47565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b509190346103ec5760203660031901126103ec5760209282916001600160a01b03610af1611a16565b168252845220549051908152f35b508234610277576020366003190112610277576020906106a9610b20611a16565b611e37565b5091346103ec5760203660031901126103ec578060ff9160c094843581526005602052208054936001820154926002830154916003840154930154938151968752602087015285015260608401528181161515608084015260081c16151560a0820152f35b508234610277578160031936011261027757602090516301e133808152f35b5082903461024b578060031936011261024b57600d54420391600a54918215610bda57815183850684038152602090f35b634e487b7160e01b815260128552602490fd5b5082346102775781600319360112610277576020906007549051908152f35b508234610277578160031936011261027757602090600e549051908152f35b50903461027757610c3b36611a31565b9091610c45611bb5565b82845260206005815285852082810160ff81541615610e07578415610c6a8115611b2a565b620f4240808702968704141715610df457610c89600283015486611b88565b93600183019081548611610db1575060035489516323b872dd60e01b8187015233602482015230604482015260648101889052989997987f508ab912bdec45488e12f3749cdc690a80c994b9052a94b8865791f1df7afae098610d5c9690959094909390929091610d0a916001600160a01b03166105e082608481016105d2565b610d15878254611ba8565b80915515610d66575b5050338852600681528188209087895252808720610d3d848254611b07565b9055519283923396846040919493926060820195825260208201520152565b0390a26001805580f35b60ff1981541690556003610d7f6102e6600d5442611ba8565b9101557fb9a5a19afbb63e06e7bd9fd9dc0ecb5b442bf73a6c7f68b6e98312d448094ec6818351898152a13880610d1e565b895162461bcd60e51b8152908101859052601f60248201527f4e6f7420656e6f75676820746f6b656e7320696e20626f6e64206f66666572006044820152606490fd5b634e487b7160e01b875260118452602487fd5b875162461bcd60e51b8152808501849052601460248201527327379030b1ba34bb32903137b7321037b33332b960611b6044820152606490fd5b508234610277578160031936011261027757602090600a549051908152f35b50918291346109a857826003193601126109a857610e7c611a47565b6002546001600160a01b0316803b156109a35783918351809581936379ba509760e01b83525af1908115610ebf5750610eb3575080f35b610ebc90611a9f565b80f35b513d84823e3d90fd5b508234610277576020366003190112610277576020906106a9610ee9611a16565b611ea6565b5091346103ec57826003193601126103ec57610f08611bb5565b33835281602052808320918254928315611065578060026001920194610f2f865442611ba8565b9081611037575b505001928354938415610ffe578590554290556002546001600160a01b0316908490823b156102775783516340c10f1960e01b8152339181019182526020820186905292839182908490829060400103925af18015610ff457610fe5575b50600c5482808210610fdd57610fa991611ba8565b600c55519081527f5387ab2b2012a616dcfbc6c0f6c6f7a6ef5b3fc7c7740476f7b20b65f50d597260203392a26001805580f35b505082610fa9565b610fee90611a9f565b38610f94565b82513d86823e3d90fd5b835162461bcd60e51b815260208185015260136024820152724e6f207265776172647320746f20636c61696d60681b6044820152606490fd5b63bbf81e009161038c61104d9260085490611b75565b0461105c838301918254611b07565b90553880610f36565b506020606492519162461bcd60e51b8352820152601060248201526f139bc81cdd185ad95908185b5bdd5b9d60821b6044820152fd5b5082346102775780600319360112610277579081906001600160a01b036110c0611a16565b168152600660205281812060243582526020522060ff6001825492015416825191825215156020820152f35b50903461027757602036600319011261027757611107611a47565b35600a5580f35b509190346103ec57826003193601126103ec57611129611bb5565b3383528060205281832091825480156113875761114b6102e6600d5442611ba8565b60038501541015611338576002840193611166855442611ba8565b8061130b575b506001810194868654965542905584611273575b6111b892939450611192828254611ba8565b90556111a081600b54611ba8565b600b5560646111b160095483611b75565b0490611ba8565b91826111c7575b836001805580f35b6002546001600160a01b0316908490823b156102775783516340c10f1960e01b8152339181019182526020820186905292839182908490829060400103925af18015610ff457611264575b50600c548280821061125c5761122791611ba8565b600c55519081527f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f7560203392a23880806111bf565b505082611227565b61126d90611a9f565b38611212565b6002546001600160a01b031694853b1561064f5783516340c10f1960e01b815233868201908152602081018390529096889188919082908490829060400103925af1958615610999576111b89495966112fc575b5084519081527f5387ab2b2012a616dcfbc6c0f6c6f7a6ef5b3fc7c7740476f7b20b65f50d597260203392a284939250611180565b61130590611a9f565b386112c7565b61132063bbf81e009161038c60085486611b75565b0461133060018301918254611b07565b90553861116c565b815162461bcd60e51b81526020818501526024808201527f43616e6e6f7420756e7374616b65206265666f726520746865206e65787420656044820152630e0dec6d60e31b6064820152608490fd5b815162461bcd60e51b8152602081850152601b60248201527f4e6f207374616b656420616d6f756e7420746f20756e7374616b6500000000006044820152606490fd5b508234610277576113da36611a31565b6113e5929192611a47565b82156114f957600754600181018091116114e6578060075582519060c0820182811067ffffffffffffffff8211176114d357907f32496e64ac533cca4d99373b8746e36477ece85c1fa1fedc027dfa2570b6bf5296976114cd9493928652818352602083019287845286810185815260608201908b825260808301956001875260a08401958d87528d526005602052898d209351845551600184015551600283015551600382015501915115159060ff61ff0084549251151560081b1692169061ffff1916171790556007549251938493846040919493926060820195825260208201520152565b0390a180f35b634e487b7160e01b875260418852602487fd5b634e487b7160e01b855260118652602485fd5b815162461bcd60e51b8152602081870152601760248201527f496e76616c696420626f6e6420706172616d65746572730000000000000000006044820152606490fd5b50903461027757602036600319011261027757611557611a47565b35600e5580f35b508234610277578060031936011261027757611578611a16565b906024359081159283158093036117455793909291819061159e6102e6600d5442611ba8565b90600754916115ac83611f48565b6001989096906001600160a01b0316895b85811115611664575050505050506115d481611f48565b92825b82811061162b575050508251938493602080860191818752855180935281818801960194905b83821061160a5787870388f35b855180518852830151878401528897509586019594820194908401906115fd565b8061163e61165a92849997989699611fa9565b516116498289611fa9565b526116548188611fa9565b50611e28565b95929493956115d7565b81889b999a985289898c8a8860209260068452828120878252845282808220916005865220908054958615159182611736575b50506116b7575b5050505050506116ad90611e28565b99969897996115bd565b60030154801515908161171f575b508891611717575b506116da575b888261169e565b8a61170b94869c946116ad97946117009451956116f687611ac9565b8652850152611fa9565b52611654818d611fa9565b969050898c808a6116d3565b9050386116cd565b61172d9150600e5490611b07565b891015386116c5565b60ff9250015416158f38611697565b8480fd5b503461024b57602036600319011261024b57611763611a16565b61176b611a47565b60018060a01b03166bffffffffffffffffffffffff60a01b600254161760025580f35b509190346103ec576020908160031936011261197857803567ffffffffffffffff92838211610968573660238301121561096857818301359384116109685760059260243686861b8501820111611974576117e7611bb5565b6117f66102e6600d5442611ba8565b93885b87811061180857896001805580f35b8281881b8301013590338b5260068652898b20828c528652898b20918887528a8c2060ff93848883015460081c166119675780549485156119405760018092019283549182166119585760030154611862600e5482611b07565b901590811561194e575b506119405760ff1916179055670de0b6b3a76400008084029384040361192e576002546001600160a01b0316928c843b1561024b578c516340c10f1960e01b815233818a01908152602081018490529095869182908490829060400103925af19384156119245761191094611915575b508b51918252878201527f0ce25aff308b2de96a6a6ba8f55ec4abe905f18672cdaad10dc44aae1fd3579f8b3392a2611e28565b6117f9565b61191e90611a9f565b386118dc565b8c513d8f823e3d90fd5b634e487b7160e01b8c5260118652848cfd5b505050506119109150611e28565b90508b103861186c565b50505050506119109150611e28565b5050506119109150611e28565b8780fd5b8380fd5b50823461027757816003193601126102775760035490516001600160a01b039091168152602090f35b509034610277576020366003190112610277576119c0611a47565b3560095580f35b90508284346119785760203660031901126119785780608094833581526005602052209060018201549260ff600284015491600385015494015416938552602085015283015215156060820152f35b600435906001600160a01b0382168203611a2c57565b600080fd5b6040906003190112611a2c576004359060243590565b6000546001600160a01b03163303611a5b57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b67ffffffffffffffff8111611ab357604052565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff821117611ab357604052565b90601f8019910116810190811067ffffffffffffffff821117611ab357604052565b91908201809211611b1457565b634e487b7160e01b600052601160045260246000fd5b15611b3157565b606460405162461bcd60e51b815260206004820152602060248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f6044820152fd5b81810292918115918404141715611b1457565b8115611b92570490565b634e487b7160e01b600052601260045260246000fd5b91908203918211611b1457565b600260015414611bc6576002600155565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b90816020910312611a2c57518015158103611a2c5790565b6040516001600160a01b03909116929190611c3d81611ac9565b6020918282527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564838301526000808285829451910182895af13d15611d48573d9567ffffffffffffffff8711611d3457611cb894959660405190611caa88601f19601f8401160183611ae5565b81528093873d92013e611d54565b80519081611cc557505050565b8280611cd5938301019101611c0b565b15611cdd5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b634e487b7160e01b83526041600452602483fd5b611cb893949591506060915b91929015611db65750815115611d68575090565b3b15611d715790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015611dc95750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510611e0f575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611dec565b6000198114611b145760010190565b6001600160a01b031660009081526004602052604090208054908115611e9d57611e65600282015442611ba8565b918215611e935763bbf81e00611e87611e909461038c60019460085490611b75565b04910154611b07565b90565b5060019150015490565b60019150015490565b6001600160a01b03166000908152600460205260409020548015611eef57600854611ed091611b75565b6201518090818102918183041490151715611b145763bbf81e00900490565b50600090565b6001600160a01b03166000908152600460205260409020548015611eef57611f2c63bbf81e009161038c600a549160085490611b75565b0490565b67ffffffffffffffff8111611ab35760051b60200190565b90611f5282611f30565b604090611f6182519182611ae5565b8381528093611f72601f1991611f30565b0191600090815b848110611f87575050505050565b6020908251611f9581611ac9565b848152828581830152828701015201611f79565b8051821015611fbd5760209160051b010190565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220fb006285794c624288ef74dfd70feaa3e320c2921e6f4449c056027cd72cd7b564736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000077777bf11ab5b96753ea48e0401667a70675841e000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0x77777bf11AB5b96753EA48e0401667a70675841E
Arg [1] : _usdcTokenAddress (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000077777bf11ab5b96753ea48e0401667a70675841e
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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