decentralised vpnpaymentsupdates

Building on the bleeding edge

By August 13, 2020 No Comments

As the Head of Product of Mysterium Network, I am charged with everything from driving micropayments research to delivery of working applications on Android, Windows and Mac.

A regular VPN application is hard enough, but it’s even more challenging when we are seeking to decentralize the infrastructure through which the service is provided. Let’s add peer to peer and blockchain payments into the mix of network security, and you’re bound to have multiple shifting pieces that you’re building upon.

Here’s an update from me as Mysterium Network transitions into Mainnet. 

I first want to quickly reiterate the goal of the MYST token migration.

We were looking to implement an easy way for consumers to top up their dVPN app accounts using ETH and for node runners to withdraw earned MYST into ETH (and maybe even DAI) automagically using a decentralized exchange. We wanted this to happen in a single transaction, so users would have the best possible experience.

ERC777 based token and their callback hooks looked like a good solution for our needs. That’s why we announced the migration of MYST into an ERC777 based token.

Mysterium Network will transition to updated ERC20 token with `permit`: 712-signed token approvals (ERC2612) at the end of August. 

Part of our process gearing up for real payments on Ethereum blockchain included the submission of two versions of our token to our security auditors (both ERC777 and ERC20 +ERC2612 versions). 

Based on feedback from auditors, and our deeper research into current DeFi projects, we are making the decision to par back the scope of our token migration for the moment. 

This is due to several factors. The ERC 777 token standard is a new technology. It was peer-reviewed for two years and finally marked as final on 7 May 2019. The token is extremely advanced and powerful. However, its use in DeFI projects can be dangerous because of some specific vectors of attacks. Even though more popular projects (e.g. Uniswap v2 or Kyber network) are taking steps to be protected against these types of attacks, there are some who may not take such precautions.

In saying that we have found an alternative and less risky solution for achieving all required peer to peer payment system functionality. 

This will involve an upgrade to the ERC20 token with the extension of `permit`: 712-signed token approvals (ERC2612).

What is the ERC2612 standard, and how does it help Mysterium Network? 

ERC2612 is standardising `permit` function which was introduced in DAI token and is now popularised by the Uniswap team.  

So first things first, for the geeks amongst us. If you’re not a developer, feel free to skip past this section. 

What is the permit functionality?

   function permit(address holder, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external {
       require(deadline >= block.timestamp, 'MYST: Permit expired');
       bytes32 digest = keccak256(
           abi.encodePacked(
               '\x19\x01',
               DOMAIN_SEPARATOR,
               keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, value, nonces[holder]++, deadline))
           )
       );
       address recoveredAddress = ecrecover(digest, v, r, s);
       require(recoveredAddress != address(0) && recoveredAddress == holder, 'MYST: invalid signature');
       _approve(holder, spender, value);
   }

The function permit extends the ERC20 allowing for the following benefits: 

  • Transactions involving ERC20 operations won’t require ETH and can be paid for by the token itself. 
  • Approve and pull operations happen in a single transaction, instead of two consecutive ones – making the transaction cheaper.  

This means that MYST token holders who don’t own ETH are able to  give permission to smart contracts which would extend the native token functions and allow more advanced operations (similar to those provided in ERC777). This was possible before with `approve` function, but only for ETH holders. Now it becomes possible for various apps where users are not holding ether, e.g. Mysterium dVPN app.

 

Our plans ahead.

Our token migration will commence at the end of August.

TestNet

Mysterium Network is currently running on TestNet, this means that test token payments are happening on Ethereum’s Goerli testnet and node bounty payouts are managed by the Mysterium Team.

BetaNet

We will begin with an invite only BetaNet. During this point, there will be a development freeze on our TestNet. We will be working with a small group of initial testers on our BetaNet. Interested in being a part of the Mysterium Network BetaNet? Use this form to register or jump into our discord channel and let the team know!

The rationale behind an invite only BetaNet is to provide a controlled environment as we transition to real peer to peer payments with MYST on the Ethereum blockchain.

MainNet

Once our team has battle tested our technology during the BetaNet phase, we will merge all the code into master repository on github, deploy final version of smart contracts and update all the apps and services. This will become Mysterium Network MainNet.

Looking into the future

After the token migration and a successful transition onto Ethereum Mainnet, we are planning to integrate with a decentralised exchange, most probably Uniswap v2. This integration with Uniswap will open up app top-ups with ETH for consumers and direct withdrawal to ETH or DAI for node runners as we will have liquidity pools there.

PS: We code golang, and are hiring. If you’re a golang whiz, I’d love to hear from you. Ping me on our discord or send me a message on twitter