We incorporated this functionality directly into our reward chest module system, so the earning part is implemented in the form of a StakingModule contract. Users can call the deposit()
and withdraw()
functions at any time, only incurring a small withdraw penalty if they withdraw prior to 72 hours after their last deposit. Deposits of merchants that are auto-staking their sale-earnings through the staking module will not count towards that penalty, so they can withdraw their staked XGT without a penalty at all times.