Since its public release, Ethereum has grown into the world's most-used programmable blockchain. As an open and permissionless system, it has enabled new kinds of software applications and created billions of dollars of value, but this technology is also facing many roadblocks that still need to be tackled.

Scalability is, by far, the most urgent challenge. With the increasing usage, the network is reaching its limits (~15txs) and the cost of using the available infrastructure grows to the point of making it unsuited for many use cases. A situation that will probably improve with the upcoming Ethereum 2.0.

The situation can be seen in these two graphs:

Currently, it's inefficient and economically infeasible to use Ethereum for projects requiring a high transaction throughput. Just as an example, at the time of writing, deploying the Vocdoni's voting smart contract costs about ~0.7 ETH or ~240 USD, and creating a simple voting process using this smart contract costs about ~0.062 ETH or ~20 USD.

Vocdoni's needs

While building Vocdoni as a trustless governance layer scalable to millions, we realized that such technology had to be cheap, capable of handling voting procedures with a large number of voters (>1M users), and able to process these votes in a few minutes.

It was clear to us that decentralized technologies such as Ethereum were ideal for enabling anonymous and E2E digital voting, but scalability problems currently make it impossible to bring this technology to the masses.

We believe that Voting must be accessible to everyone, everywhere, at any time. Without economical barriers.

So we had to accept that, in spite of everything, staying fully on-chain and waiting for Ethereum L1 and L2 scalability solutions is not an option for us, due to:

  • πŸ’Έ Increasing gas costs: making the infrastructure unusable and the project unsustainable.
  • 🐌 Limited number of tx/s: Even the expected +3000tx/s are not enough.
  • πŸ”΄ Limitations on state transitions

In this scenario, we had to find a way to make Vocdoni scalable and accessible to anyone today. Especially now that the need for remote governance is growing due to COVID-19.

The path to scale Vocdoni

As is well known, the 'Security-Scalability-Decentralisation' trilemma applies to any blockchain-based system. And a digital voting system on this type of technology was not going to be an exception.

During the design of Vocdoni's digital voting infrastructure we encountered mainly two problems:

  1. Massive on-chain voting is virtually and physically impossible

    In order to address this issue, we created Vochain, a custom Tendermint blockchain with the singular goal of storing and counting votes, while the source of truth for each voting process is on Ethereum Mainnet. (Using Vochain, we already processed a real-world election with a 180k census size in just 20 seconds!).
  2. Voting processes could require to storage large amounts of data

    General-purpose blockchains like Ethereum can't handle the storage of large amounts of data. So we addressed this hurdle using IPFS.

In addition to the above problems, we've now also been forced to look for alternative solutions to Ethereum to deploy our voting smart contracts and act as a source-of-truth for voting processes.

And we have found a solution that fits perfectly: xDai.

ℹ️ Although we would love to develop a fully on-chain solution for anonymous digital voting the fact is that currently, it's just not possible due to the mentioned limitations. So in order to make our idea a reality, we designed a decentralized multi-layer system that fulfils the requirements of a secure, transparent, accessible, and end-to-end verifiable digital voting system. To know more about how Vocdoni works, check this technical overview, or visit our Docs.

What is xDai chain?

xDai Chain is an Ethereum sidechain designed for fast and inexpensive stable transactions with xDai, a native stablecoin pegged to USD. One of its strengths is that being EVM compatible, every contract working on Ethereum can be easily redeployed to the xDai chain, which makes it perfect as a mainnet replacement.

Thanks to xDai Chain we have created the first voting system that is not only safe and privacy-centric but also extremely cheap to use.

Moving to xDai chain

While in the long run we continue betting on Ethereum, our reason for this switch is to offer Vocdoni right now as an accessible governance system while maintaining a compatible infrastructure. Let us summarize why xDai was the best solution for us:

  • πŸ₯‡ The expertise and vision of the xDai team
  • ⚑ Β Fast transaction times (5s) & low transaction fees (500tx for $0.01)
  • ⚑ Blazingly fast state changes finality
  • πŸ’² A stable coin ideal for real world value exchange
  • πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Community support
  • 🌿 Energy efficiency
  • πŸ“ˆ Growing ecosystem (See the full list of projects here)
  • πŸ”’ Tested environment released two years ago
  • 🐎 Less syncing time
  • πŸ’Ύ Less storage for having a full node

Even if prices can increase in the future, as of today, are several times cheaper than in Ethereum allowing to,

  • Deploy all our infrastructure, including an ENS, for less tan 0.01 USD.
  • Create a voting process, for less than 0.000024 USD!

For these reasons, as of today, Vocdoni's infrastructure is operating on the xDai chain without breaking our technological stack and without end users even noticing the change.

Working with xDAI

From a developer point of view we want to share our experience working with the xDai chain.

During Q3 2020, we first tested our smart contract on the Sokol testnet and verified that everything worked like a charm. So after some further testing, we deployed the voting contract on xDai at an ultra-low cost!

Once the voting smart contract was working, we also deployed an ENS, a key component of our stack that was missing on the xDai network. We got a Registry and a Public Resolver fully operative. You can find the code we used for the deployment right here.

Our initial idea was to deploy a fully trustless and usable official ENS, however, it required a community agreement on how should function and maintenance that we cannot handle at this moment. But, luckily, the xDai developers are considering building an ENS bridge with all the benefits you can imagine.

ℹ️Alternatively, you can try to use the official ENS documentation to deploy an ENS with a single transaction.

If you're curious about our deployed infrastructure you can check out the smart contracts here:

In short, we're really excited about the use of the xDai chain and the new possibilities this partnership can bring. We're looking forward to further strengthening this collaboration and contributing actively to a useful component of this ecosystem.

Get involved!

Vocdoni is not just a digital voting infrastructure and a governance platform. It's also a community of people interested in building digital democracy tools. Join us!

πŸ’¬ Discord
πŸ“£ Telegram
🦊 Gitlab repos

πŸ“‘ Open Stack docs
πŸ’Ό Open positions

πŸ’Έ Donate to Vocdoni

Much ❀️ from Vocdoni Team.