Mine & Mint Proof-of-Work Tokens on Avalanche Avalanche

The THOR, LOKI and ODIN members of the XPower token family are all proof-of-work tokens that have neither been pre-mined nor pre-minted. Their contracts operate on the Avalanche C-Chain, and anyone presenting a valid $nonce$ number can mint them. Once minted, they operate as regular tokens.


Both Proof-of-Work (PoW) and Proof-of-Stake (PoS) are sybil protection mechanisms to establish an identity in a distributed environment. In our opinion both are valid, and frankly we are disturbed by the PoW versus PoS polarization we see in the blockchain space.

Systems relying on PoW are very good at distributing value, because the energy that is required to mine PoW coins and tokens has already been pre-distributed by nature: Yes, it is not perfect but in principle everyone has equal access to the energy of the sun (and to a limited extend its derivatives).

PoS systems on the other hand are fantastic at transmitting value between participants with minimal effort and energy: If done right — like in Avalanche Avalanche — then they are the ideal platforms to exchange value on and to build huge economies of scale upon.

Hence, instead of being forced into an artificial either-or choice between PoW and PoS mechanisms, why not combine both? 1) You mine PoW tokens, but 2) you mint and transmit them on a PoS system.

That is the XPower token family in a nutshell. We hope, that via XPower the energy of the sun will be injected into the Avalanche ecosystem and contribute to its success.


Below, you find the various parts and milestones of the project. Please note, that everything upto but excluding lending & borrowing has already been realized:

Project Overview
Project Overview

The entire process begins with mining and minting XPower tokens, of which three variants exist: THOR (yellow), LOKI (green) and ODIN (cyan). Also, with each mint some amount is allocated for the project’s treasury.

Further, by burning XPower they can be converted into NFTs, which can be staked to earn rewards in the form of APower tokens i.e. aged XPower: aTHOR (blue), aLOKI (magenta) and aODIN (red).

However, APower rewards can only be claimed if the treasury holds enough XPower, since each APower wraps one XPower! By burning an APower the contained XPower can be unwrapped. Also, in the near future borrowing XPower against collateralized APower tokens will become possible.

Token Supply

The maximum supply consists of about $\bold{1.157T}$ $\times$ $\bold{10^{64}}$ for THOR, $\bold{1.240T}$ $\times$ $\bold{10^{64}}$ for LOKI and $\bold{796.794T}$ $\times$ $\bold{10^{64}}$ for the ODIN tokens, where the amount per mint is determined by the number of $\text{leading-zeros}$ of the $hash$ of the provided $nonce$ number. Further, each $hash$ can only be used once which effectively puts a hard limit on the total supply. However, due to these limits being very high, for all practical purposes the supply of each token can be treated as infinite — similarly for the aTHOR, aLOKI and aODIN tokens.

Mining and Minting

To be able to mint XPower, a valid $nonce$ number needs to be presented. The process of finding such a number is called mining, where the algorithm for verifying whether the work has actually been performed (or not) consists of first calculating the $hash$ value of:

$$hash = \text{keccak256}(\lbrace address, interval, blockhash, nonce \rbrace)$$

…where $\text{keccak256}$ is a standard hashing function, the $nonce$ a (random) number and where the $address$ is associated with the minter of the XPower tokens.

Apart from the $nonce$ number, the $address$ is also hashed to avoid the former from being “stolen” by front-runners, who otherwise would observe a transaction with a valid $nonce$ and who would then try to get their own transaction with the same $nonce$ validated first. By hashing the $address$ such an attempt will result in a different value, because the front-runner would have a different $address$.

Further, the $interval$ is set to the current $block.timestamp$ divided by $1$ hour: Hence, any valuable $nonce$ number that has been found for the current interval needs be minted within the same $interval$, since otherwise it would expire at the start of the next one. This extra condition forces miners to convert their nonces into XPower tokens rather quickly, instead of them getting hoarded.

Obviously, a miner could still pre-mine valid $nonce$ numbers using future $interval$ values and then try to mint as many XPower tokens as possible within that $interval$: By including a recent $blockhash$ this scenario is avoided, where the $blockhash$ needs to be within the last $256$ blocks (which correspond at current block latencies to about $3$ to $4$ minutes); or, the current $blockhash$ can be cached and then be used until the end of the interval (i.e. for a maximum of $1$ hour).

Once a $hash$ is produced, its leading number of zeros is counted and then the $\text{amount}$ of XPower tokens (to be minted) calculated according to the following formulae:

Amount rewarded for THOR tokens

For the THOR tokens, the rewarded amount grows proportionally in the number of $\text{leadings-zeros}$ of the $hash$ value:

$$amount = \text{leadings-zeros}(hash)-\text{difficulty}(block.timestamp)$$

Since the hash is an hexadecimal value, the amount should be an exponentiation w.r.t. a base of $16$ (instead of a simple linear function). However, for THOR tokens we deliberately chose to undervalue hashes with more zeros to strongly negate the advantage of miners with access to better technology. Further, the $\text{difficulty}$ step function increases every $4$ years (by $1$), hence reducing the amount rewarded over time.

Amount rewarded for LOKI tokens

For the LOKI tokens, the rewarded amount grows exponentially (w.r.t. to a base of $2$) in the number of $\text{leadings-zeros}$ of the $hash$ value:

$$amount = 2^{\text{leadings-zeros}(hash)-\text{difficulty}(block.timestamp)}-1$$

Again, since the hash is an hexadecimal value, the actual exponentiation base should be $16$ (instead of $2$), because finding one with for example two $\text{leading-zeros}$ is statistically $16$ times less likely than finding one with just one initial zero. However again, we deliberately chose to undervalue hashes with more zeros to partially negate the advantage of miners with access to better technology. Further, due to the $\text{difficulty}$ step function the amount rewarded is halved every $4$ years.

Amount rewarded for ODIN tokens

For the ODIN tokens, the rewarded amount grows exponentially (w.r.t. to a base of $16$) in the number of $\text{leadings-zeros}$ of the $hash$ value:

$$amount = 16^{\text{leadings-zeros}(hash)-\text{difficulty}(block.timestamp)}-1$$

Here, the rewarded amount corresponds one-to-one to the effort of miners, resulting in a distribution in favor of those with access to better technology. Further, again due to the $\text{difficulty}$ step function the amount rewarded is reduced by a factor of $16$ every $4$ years.

Co-Minting for Project Treasury

With each newly minted XPower an extra amount of tokens are co-minted for the project treasury, where this $amount_Θ$ is calculated according to the following formula:

$$amount_Θ = \lfloor amount / 2 \rfloor$$

So, it is calculated has half of the $amount$ minted, which results in $33.3\%$ of the THOR, LOKI or ODIN tokens being co-minted for the treasury (in case the entire supply were to be mined and minted).

Note that this upper limit of $33.3\%$ does not take token burn events into consideration! However, if such tokens — that have (for any purpose) been burned — are all accounted for then the limit would still hold.

XPower NFTs

The blockchain ecosystem is full of various NFT projects most of which cater to artistic expressions.

We use XPower NFTs to represent various denominations as “bills”, while combining them with “art” that remotely resembles what we see on today’s banknotes. For each of the THOR, LOKI and ODIN tokens we issue three separate collections: yellow, green and blue ones respectively (plus another three for staking).

Such art changes yearly, and the relative rarity of these NFTs depends on how many such bills get minted per issue — by burning the corresponding XPower.

Further, each of the three NFT collections come in nine different levels named after the standard SI prefixes: unit, kilo, mega, giga, tera, peta, exa, zetta and yotta (by default the user interface does not show the latter three levels).

Minting each next level requires $1’000$ times more XPower to be burned than the previous one: So, UNIT NFTs can already be minted by burning a single token, while KILO NFTs can only be minted by burning $1’000$ tokens etc.

These stakeable THOR, LOKI and ODIN NFTs offer rewards with an extra 1% APR per level (starting from 0%) — distributed as APower tokens and financed by the project’s treasury.

Further, older issues fetch an extra 1‱ APR for each year passed. Hence, our NFTs can succinctly be described as “perpetual bonds” with the rewards increasing over time.

ROI on XPower NFTs
ROI on XPower NFTs


While manually minting mined XPower tokens is “cute” (by clicking for each mined token the corresponding mint button), the user interface also allows auto-minting: For this purpose a minter wallet can be pre-loaded with some AVAX to pay for fees. Also, there are terminal based miners with built-in wallets (to again auto-pay for fees).


As Marc Andreessen has famously put it in his essay “Why Software is Eating the World”, there is a big opportunity here, and we are acting upon it. So, being a software project there are infinitely many improvements and extensions that may (or may not) be pursued. Below, is a list of some of them we have in mind to deliver upon — but not necessarily in the same given order:

Lending & Borrowing

By putting up APower as collateral it will be possible to borrow XPower, where the latter will be provided by the project’s treasury — if it holds enough funds! Otherwise, the treasury can be replenished via mining XPower tokens (and the co-minting process).

Avalanche Subnet?

At the moment, Avalanche subnets are being fleshed out. Once they reach a certain maturity and if the GINI coefficient of the XPower tokens is sufficiently low (i.e. wide distribution), we may — as a proper citizen of the Avalanche ecosystem — consider launching our own subnet.


Anyone participating in the blockchain space needs to be aware of at least the following risks:

Platform Risk

Avalanche is a relatively young ecosystem: Looking back, in the short little amount of time so far much has happened and improved upon! Still, anyone starting to mine and mint XPower tokens needs to be aware of this fact.

Contract Risk

The XPower smart contracts have not been audited (yet) and may contain bugs, though we put a lot of effort to ensure that they do not, by deliberating keeping them short and avoiding any unnecessary scope creep. We relied also on the industry-standard OpenZeppelin libraries.

Further, please ensure that you interact with the correct contracts: You can find an “Add XPower token” icon in the footer, which you can use to import the tokens’ meta-information into your Metamask wallet.

Upgrade Policy

In case of an unintended contract breach, our recovery policy will rely on 1) determining at what block height it happened, 2) fixing the bug and deploying new contract(s), and 3) allowing the migration of XPower tokens up to the block height of the breach.

Anyone, not happy with any of the decisions taken in the steps above, is free to continue interacting with the old (and breached) contract(s): The entire migration process is voluntary.

Price Risk

There is no assurance regarding the price of the XPower or APower tokens (w.r.t. to any other currency or commodity). It is completely up to the invisible hand of the free market to decide that. Further, any forward looking statement expressed in this document may be subject to change and is not to be relied on.

Privacy Risk

You have no privacy: Blockchains are open public ledgers anyone can inspect upon gaining knowledge of your address. Do not share it, avoid KYC and try to pay fees with AVAX which have been sanitized.

If you want to further improve your privacy, setup your own Avalanche validator and then connect your Metamask wallet to it. Try to route your transactions through a proxy node, instead of broadcasting the validator’s presence to the entire world.

You can also download this web user interface (see the footer) and run it locally, so your IP address does not get tracked by any infrastructure provider we use to deliver it to your browser; or you can simply use a VPN.


Despite our occasional constructive critisisms, we are incredibly grateful to the entire Avalanche community for having produced a fantastic blockchain, and we are looking forward to continue with our various contributions.