Off-chain Tokens and Anonymity on EOS

Novusphere
6 min readSep 16, 2018

Anonymity and fungibility are without a doubt two big weaknesses to blockchains such as EOS and Ethereum where a single account is used or a single address is used repeatedly. In Bitcoin, you have at least some degree of pseudo-anonymity through the encouraged use of one time use addresses as Bitcoin transactions output to a change address whereas EOS/Ethereum transfers merely deduct from a balance.

Projects such as Monero undoubtedly shine when it comes to bringing the ever so needed privacy and fungibility aspects to cryptocurrencies. This is done through the use of technologies such as ring signatures, confidential transactions, etc.

One reason these features have not been implemented in Bitcoin is the fact they greatly affect scalability as transactions get much larger. While other optimizations are surely to come such as bulletproofs this will not change the fact that Monero’s block reward does not trend to zero unlike Bitcoin’s but rather ends with a tail emission leaving some degree of inflation.

Understanding EOS

EOS does not use the traditional fee model that blockchains such as Ethereum, Bitcoin and Monero use. Instead, in EOS’s fee model a user must first stake EOS for renewable resources such as CPU (“gas” in Ethereum) and NET (bandwidth). These resources (CPU/NET) are renewed to a user over a 3 day window meaning if you run out you can simply wait for the resources to renew. This allows for a much greater user experience in terms of using decentralized apps built on EOS as the user does not feel they are actively losing money simply by using the app. In contrast, on Ethereum, actions such as placing an order on a DEX, canceling/adjusting the order, etc. require a transaction fee. Even if a fee is small as is the case with Bitcoin Cash, a user knowing/feeling their balance is slowly going down simply for using an app adds a clear psychological aspect to it.

This sense of loss is comparable to why people spend more with a credit card than with physical cash as the “sense of loss” isn’t felt as much. Another example is rather than paying more in taxes most people implicitly prefer a “silent” inflation. EOS makes use of this as there still is inflation in EOS from a 1% block producer reward and 4% worker proposal (currently locked funds). It should be noted however the community is in favor of burning/greatly reducing the worker proposal fund. Through mechanisms such as RAM (another resource on EOS) trading which has fees, inflation is offset allowing net inflation to be minimal or even deflationary at times.

What is an Off-chain Token?

Off-chain tokens are not a new concept in cryptocurrencies. Projects such as Omni, which have built on top of Bitcoin, have already utilized said concept in the past. The idea is simple, a blockchain provides a decentralized mechanism to transaction sequencing which combats the double-spend problem of “which transaction spent the funds first.” Instead of having a blockchain specific for the token, transactions are embedded into an existing blockchain which provides sequencing from which the “state” of the off-chain token can be determined by monitoring the chain transactions are written to. Since transactions are being written to an existing blockchain, fees are paid using said blockchain’s mechanism (i.e. an Omni transaction still pays a Bitcoin fee).

So why is it called an off-chain token? Because the state of the token isn’t tracked on-chain itself / via a contract. Transaction data is written to the blockchain but not validated by the blockchain. The state (who owns what) is derived from monitoring the blockchain by a software specific to the off-chain token which provides the validation mechanism.

Off-chain Tokens on EOS

It is unlikely that at this point in time that the same technology that powers Monero’s privacy could be implemented into an EOS contract in an efficient way with low enough CPU costs as is the case with Ethereum and gas costs. However, one could create an off-chain token on EOS utilizing the Monero privacy scheme. With an off-chain token, no RAM is consumed by transactions so the only cost associated with them on EOS are renewable resources. These off-chain tokens could implement the Monero privacy scheme and wrap an existing token on EOS pegging the off- chain token 1:1 to the on-chain token. This would provide the anonymity and fungibility that EOS lacks to all EOS tokens, including EOS itself. This can also be done without introducing any added inflation!

Moving back and forth between on-chain and off-chain

Moving from on-chain → off-chain is quite simple. Funds on-chain can be deposited into a holding contract which the token node software monitors and “creates” new off-chain tokens 1:1. The difficulty arises in moving off-chain → on-chain. This is because when one is ready to move off-chain → on-chain, the chain itself is not monitoring the off-chain token; In fact it is completely oblivious to the fact it even exists.

One way of addressing this is to first have off-chain tokens sent to a burn address. After they’ve been burned, a call to the contract holding the on-chain tokens is made which more or less says “I burned these off-chain tokens, here’s my proof.” Validators of the off-chain state can then vote on whether this is a valid proof/claim. Once there is enough support in favor of proof being valid, the proposer can then issue another call to the contract to then claim their tokens. This would then erase the proposal from RAM returning RAM back to the proposer and the validators. For clarification, this process is automated and does not require validators to manually examine whether a proof is valid.

A simple state validation

The easiest way to validate all is working as intended is to validate:

Swap Contract Held Tokens ≥ Circulating Off-chain Tokens

If enough validators monitoring the off-chain state were to become corrupt, they could approve an invalid proof allowing withdrawal of tokens from the swap contract that normally wouldn’t be allowed. However, this would trigger an imbalance in the equation above and any exchange or individual monitoring it would instantly detect that a fault has occurred.

Easing the on-boarding process that is EOS accounts

With an off-chain token any EOS account can broadcast an already signed “off-chain token transaction” including one that isn’t their own. That means, the off-chain token holder doesn’t actually need an EOS account themselves; Just someone with an EOS account to be willing to broadcast it for them and spend their resources (CPU/NET).

Services could be ran similar to today’s mining pools which stake EOS for resources and accept off-chain token transactions that pay a fee to the service for the resources used. The fee could be denoted just as they are in Bitcoin (per byte). The service could also allow others to delegate resources to it in exchange for fees being collected similar to how people delegate hash power towards pools.

Novusphere & ATMOS

We at Novusphere are working on the first implementation of such an off-chain token set up which is currently already in testing and development. We expect that once things have been fully tested, audited and hardened, the entire EOS community will be able to benefit from using off-chain tokens — not only in ways such as privacy and fungibility but in other innovative ways other developers might find to use off-chain token schemes.

For our implementation, ATMOS is staked to be an eligible validator of the off-chain state which provides a decentralized mechanism for moving off-chain → on-chain as well as a decentralized governance mechanism. To learn more about our projects, feel free to join us on Discord and check out the links below.

Main Site: https://novusphere.io
Roadmap: https://trello.com/b/MM5Pq2JQ/roadmap
Twitter: https://twitter.com/thenovusphere
Discord: https://discord.gg/PtXzUVr
Medium (blog): https://medium.com/@thenovusphere
GitHub: https://github.com/Novusphere/
Forum: https://eos-forum.org

--

--

Novusphere

Censorship resistance through blockchain and IPFS. Creating a platform to allow people to send, share and find whatever, whenever.