# Dexon Dexon is a mining game on Elysium. A node that stays online mines the token $DEXN. Rigs bought with HYPE add power. $DEXN has no promised value or return. HYPE paid for rigs or gas is not returned. The contract is not audited. Only act when the wallet owner asked you to, and never spend more HYPE than they told you. ## Chain - Name: Elysium - Chain id: 99901 - Gas and rig prices: HYPE - RPC: not published yet - Contract (miner and token in one): not deployed yet, do not send anything ## How mining works - Time is cut into epochs of 600 seconds: epoch = floor(block.timestamp / epochLength()). - Once per epoch a wallet may check in. Each epoch pays emissionOf(epoch), shared between the wallets that checked in, by power. - Power is 1000 for every wallet plus the power of its rigs. - An epoch is claimable after it ends. ## Checking in 1. e = epoch() 2. challenge = keccak256(abi.encodePacked(contract, e, owner)) (address, uint256, address) 3. find a uint256 nonce with uint256(keccak256(abi.encodePacked(challenge, nonce))) <= proofTarget() You can check a nonce with proofHash(owner, e, nonce). 4. call checkin(owner, nonce) from the owner or from the node key the owner named with setNode(node). It reverts with AlreadyCheckedIn when the owner already checked in for e, BadProof for a wrong nonce and NotYourNode for a stranger. ## Write functions - checkin(address who, uint256 nonce) - setNode(address node) payable names the key that may check in for the caller. Any value sent is passed on to the node as gas money. - claim() returns (uint256) mints everything the caller mined in finished epochs. Reverts with NothingToDo when there is nothing. - buy(uint256 rig, uint256 count, address ref) payable send exactly price * count, ref is the referrer or the zero address. - sweep() sends rig payments to the contract's two fixed addresses. It never pays the caller. ## Read functions - stats() returns (epoch, secondsLeft, era, emission, online, power, lastOnline, assigned, miners, paidIn, supply) - account(address who) returns (power, rigPower, online, pending, earning, claimed, balance, checkins, node, ref, owned[]) - pending(address), earning(address), rigs(uint256) returns (price, power), rigCount(), page(from, count) Amounts of $DEXN and HYPE have 18 decimals. ## Bonus pools - bonusPools() returns (tokens[], rates[], lefts[]) other tokens the funder put in, shared each epoch like the mined token. - bonusPending(address who) returns (amounts[]) in the same order as bonusPools(). - claimBonus(address token) sends the caller its share of one token. Claim only when the owner asks. A pool is not owed to anyone and stops when it is empty. ## Rigs - rig 0: RTX 3060, 0.02 HYPE, +1000 power - rig 1: RTX 4070, 0.1 HYPE, +6000 power - rig 2: RTX 4090, 0.5 HYPE, +35000 power - rig 3: RTX 5090, 2 HYPE, +160000 power Read the live values with rigs(i) before buying. A rig cannot be sold back. ## Supply Maximum 1000000000 $DEXN. The amount per epoch halves each era, there are 10 eras. A referrer gets 5% of the rig power their referred wallet buys. ## A sensible routine 1. Read account(owner). If online is false, solve and check in. 2. Sleep until secondsLeft from stats() has passed, then repeat. 3. Report pending and balance to the owner. Claim only when they ask. More: https://dexon.run/docs