Transaction Hash:
Block:
14225016 at Feb-17-2022 05:33:57 PM +UTC
Transaction Fee:
0.009506970077686263 ETH
$17.80
Gas Used:
154,651 Gas / 61.473705813 Gwei
Emitted Events:
520 |
X2Y2Token.Transfer( from=[Sender] 0xcc9828d8d1aac593e48886256e05648660fccd1f, to=[Receiver] FeeSharingSystem, value=163771956672862299468 )
|
521 |
X2Y2Token.Approval( owner=[Sender] 0xcc9828d8d1aac593e48886256e05648660fccd1f, spender=[Receiver] FeeSharingSystem, value=99999836228043327137700532 )
|
522 |
X2Y2Token.Transfer( from=[Receiver] FeeSharingSystem, to=TokenDistributor, value=163771956672862299468 )
|
523 |
X2Y2Token.Approval( owner=[Receiver] FeeSharingSystem, spender=TokenDistributor, value=115792089237316195423570985008687907853269984665640527695112079964670624132462 )
|
524 |
TokenDistributor.Deposit( user=[Receiver] FeeSharingSystem, amount=163771956672862299468, harvestedAmount=0 )
|
525 |
FeeSharingSystem.Deposit( user=[Sender] 0xcc9828d8d1aac593e48886256e05648660fccd1f, amount=163771956672862299468, harvestedAmount=0 )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0x1E4EDE38...a11ABEBC9 | |||||
0xB329e39E...17Ca5Bac1 | (X2Y2: Token Distributor) | ||||
0xc8C3CC5b...9F76a1B85 | (X2Y2: Fee Sharing System) | ||||
0xCc9828D8...660fcCd1F |
0.053160579394800666 Eth
Nonce: 6
|
0.043653609317114403 Eth
Nonce: 7
| 0.009506970077686263 | ||
0xEA674fdD...16B898ec8
Miner
| (Ethermine) | 1,138.881142089619467346 Eth | 1,138.881374066119467346 Eth | 0.0002319765 |
Execution Trace
FeeSharingSystem.deposit( amount=163771956672862299468, claimRewardToken=True )
-
TokenDistributor.CALL( )
-
TokenDistributor.userInfo( 0xc8C3CC5be962b6D281E4a53DBcCe1359F76a1B85 ) => ( amount=17423394058910136295699160, rewardDebt=20064519137203120477114146655316731388248 )
-
X2Y2Token.transferFrom( sender=0xCc9828D8d1AAC593e48886256E05648660fcCd1F, recipient=0xc8C3CC5be962b6D281E4a53DBcCe1359F76a1B85, amount=163771956672862299468 ) => ( True )
-
X2Y2Token.allowance( owner=0xc8C3CC5be962b6D281E4a53DBcCe1359F76a1B85, spender=0xB329e39Ebefd16f40d38f07643652cE17Ca5Bac1 ) => ( 115792089237316195423570985008687907853269984665640527695275851921343486431930 )
TokenDistributor.deposit( amount=163771956672862299468 )
-
X2Y2Token.transferFrom( sender=0xc8C3CC5be962b6D281E4a53DBcCe1359F76a1B85, recipient=0xB329e39Ebefd16f40d38f07643652cE17Ca5Bac1, amount=163771956672862299468 ) => ( True )
-
deposit[FeeSharingSystem (ln:108)]
harvestAndCompound[FeeSharingSystem (ln:111)]
_updateReward[FeeSharingSystem (ln:113)]
_rewardPerToken[FeeSharingSystem (ln:287)]
_lastRewardBlock[FeeSharingSystem (ln:278)]
_lastRewardBlock[FeeSharingSystem (ln:288)]
_calculatePendingRewards[FeeSharingSystem (ln:290)]
_rewardPerToken[FeeSharingSystem (ln:250)]
_lastRewardBlock[FeeSharingSystem (ln:278)]
userInfo[FeeSharingSystem (ln:115)]
safeTransferFrom[FeeSharingSystem (ln:117)]
safeTransfer[FeeSharingSystem (ln:136)]
_checkAndAdjustX2Y2TokenAllowanceIfRequired[FeeSharingSystem (ln:140)]
deposit[FeeSharingSystem (ln:142)]
Deposit[FeeSharingSystem (ln:143)]
File 1 of 3: FeeSharingSystem
File 2 of 3: X2Y2Token
File 3 of 3: TokenDistributor
12345678910111213141516// SPDX-License-Identifier: MITpragma solidity ^0.8.0;import {AccessControl} from '@openzeppelin/contracts/access/AccessControl.sol';import {IERC20, SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';import {ReentrancyGuard} from '@openzeppelin/contracts/security/ReentrancyGuard.sol';import {TokenDistributor} from './TokenDistributor.sol';import {IStakeFor} from './IStakeFor.sol';/*** @title FeeSharingSystem* @notice It handles the distribution of fees using* WETH along with the auto-compounding of X2Y2.*/contract FeeSharingSystem is ReentrancyGuard, AccessControl, IStakeFor {using SafeERC20 for IERC20;// for `depositFor` callbytes32 public constant DEPOSIT_ROLE = keccak256('DEPOSIT_ROLE');
File 2 of 3: X2Y2Token
12345678910111213141516// SPDX-License-Identifier: MITpragma solidity ^0.8.0;import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';import {IMintableERC20} from './IMintableERC20.sol';contract X2Y2Token is ERC20, Ownable, IMintableERC20 {uint256 private immutable _SUPPLY_CAP;constructor(address _premintReceiver,uint256 _premintAmount,uint256 _cap) ERC20('X2Y2Token', 'X2Y2') {require(_cap > _premintAmount, 'Premint exceeds cap');// Transfer the sum of the premint to address_mint(_premintReceiver, _premintAmount);_SUPPLY_CAP = _cap;
File 3 of 3: TokenDistributor
12345678910111213141516// SPDX-License-Identifier: MITpragma solidity ^0.8.0;import {ReentrancyGuard} from '@openzeppelin/contracts/security/ReentrancyGuard.sol';import {IERC20, SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';import {IMintableERC20} from './IMintableERC20.sol';/*** @title TokenDistributor* @notice It handles the distribution of X2Y2 token.* It auto-adjusts block rewards over a set number of periods.*/contract TokenDistributor is ReentrancyGuard {using SafeERC20 for IERC20;using SafeERC20 for IMintableERC20;struct StakingPeriod {uint256 rewardPerBlockForStaking;uint256 rewardPerBlockForOthers;