All posts by David Rugendyke

Development Update — 13th Oct, 2017


Rocket Pool — Next Generation Ethereum Proof of Stake Pool

Happy Friday Rocket Poolers! With the RPL presale in the rear view mirror, efforts over the last few weeks have been concentrated on working on some core elements of Rocket Pool that will be required for its beta release hopefully on the Kovan testnet in the first quarter of 2018. Some of these core elements are the smart node service scripts and the design / functionality of the Rocket Pool beta UI.

Smart Nodes

Following up on the previous development update, more work has been done on the smart node service scripts. Rocket Pool isn’t only made of smart contracts, but also a network of nodes that can listen to the main smart contracts and receive instructions from those contracts. These scripts also allow the smart nodes to check in with the main contract on a regular basis to report on their server load which helps with load balancing users who stake with Rocket Pool + more.

Currently these beta scripts are functional and will run as a background service on a node. They will automatically run when the smart node is booted up and will wait for the Parity node software to initialise, they will then add event listeners to the Ethereum blockchain which allows for two way communication between the Rocket Pool smart contracts and themselves. The scripts will also process past events in case they incur downtime, so no instructions are missed in the case of hardware faults. Still more work to be done, but the initial beta versions of these scripts are promising and working well initially.

Rocket Pool Beta UI

Development has largely taken a backseat over the past few weeks as we near part one of the Metropolis hard fork, the Byzantium fork. With this upgrade to the Ethereum blockchain happening soon, it will also bring with it several new notable upgrades for smart contracts that will allow huge optimisations to Rocket Pool that I’ll discuss a bit further on. Waiting for these changes to come into play allowed for some initial design work on the beta version of the Rocket Pool user interface for users that wish to stake with Rocket Pool and earn interest on their ether holdings.


Rocket Pool beta menu style and interface.

The aim of the UI is to be big, simple, effective and attractive. A lot of Web3js apps using Metamask and ethereum browsers currently in the ecosystem are fairly clunky, so the aim is to make this UI as smooth and easy to use as possible. Here’s two screenshots of very early prototype designs of the beta style.


Selecting your Ethereum account you wish to stake with.

Not only have designs been undergoing work, there’s also been some initial work on the actual UI animations and JS framework that will power the UI. Currently this is Vue.js, similar to React in some ways, but very powerful and flexible when combined with a global Event Bus (I’m a huge fan of Pub/Sub frameworks and design concepts).


The blurred world map in the previous screenshots will also be an interactive live status of the Rocket Pool networks current capacity and node locations. Click to view animation.

Contract Updates

While a lot of the recent focus has been on the UI, a few but important contract updates have been made.

Rocket Pool was originally designed according to the Mauve Paper specs which specified that Casper would require some parameters that identified a node by a validation code (EVM byte code, like a mini contract). This has since been changed to a normal node account address for the first version of Casper, so Rocket Pool has been updated accordingly and is now compatible with this approach.

Byzantium HF

The first part of Ethereums next major upgrade, Metropolis; is set to begin in just a few days. This update brings with it several new features which will enable Rocket Pool to do across the board optimisations and even some contract restructuring.

Two of the most useful updates are some new opcodes which will now allow contracts to send variable length data between each other. Until now this wasn’t possible and often resulted in some inefficient methods to get the job done. This update will allow dapps that use a modular contract structure, as Rocket Pool does, to achieve much more efficiency. We’ll be looking at starting these optimisations in the near future.

Ethereum Brisbane — Anatomy of a dapp.

Rocket Pool got a special invitation to give a talk on our Dapp + Network to the Brisbane Ethereum Meetup group on the 4th October. Gave a high level overview of the differences betwen PoW/PoS as well as a rundown on what Rocket Pool is, how it works and some general info on decentralised apps.

Had a great turn out of 60-80 people and spent a good hour going over all Rocket Pools tech, how it was made and what it was made using. If anyone wants to view slides from the events, there’s a pdf version available here.

Contact Us

If you’re new to Rocket Pool or have any questions, we invite you to please checkout our website and contact us there or join our slack chat group to get all news and updates before they are posted anywhere else.



Development Update — 13th Oct, 2017 was originally published in Rocket Pool on Medium, where people are continuing the conversation by highlighting and responding to this story.

Rocket Pool — A new twist on better ICO’s, introducing the Sales Agent contract.

You don’t have to be a seasoned Ethereum enthusiast to know there’s a lot of buzz around ICO’s in the space, for better or worse. We are currently seeing a shift in traditional Venture Capitalist backed startups around Silicon Valley to crowdfunded tech startups all over the world, where even the tiniest investor can get some of the pie.

Of course this rapid shift is causing some new growing pains, very popular and large ICO’s are now putting a strain on the Ethereum network and getting sold out in minutes. This inevitably causes frustration for those failing to get in on the ICO due to the rush and for those regular users on the clogged network who suffer the burden of this influx of transactions.

The same old garden path

Over the past few weeks, I’ve read numerous proposed solutions to this new ICO mania which have been inspiring. While I think it’s entirely up to the individuals whether or not they invest, there must be a better way for the ICO’s to roll out, or even be proportioned better so that even the little guy can indeed, get his piece of the pie.

While starting on the contracts for the Rocket Pool crowdfund and presale, I started down the traditional garden path of first come, first served. After much thought though, I decided to take a different approach, even if it meant spending longer on them than I was anticipating. So I began asking myself, what extra tools could a developer or team need to ensure their ICO is rolled out in a fair and measured manner?

That extra time bore fruit in the way of the Sale Agent contract.

Introducing the ERC20 Sale Agent

Progressive crowdsales? quarterly crowdsales? crowdsales that combine first come, first serve and proportional distribution models? multiple crowdsales for the same token at the same time to different participants with no effect on the network?? If your jaw is still on the ground from that last one, lets pick it up and introduce you to a new contract called the Sale Agent.

The Sale Agent is a new type of contract that can authorise the minting of tokens on behalf of the traditional ERC20 token contract. This allows you to distribute your ICO tokens through multiple Sale Agents, at various times, of various token quantities and of varying fund targets. Once you’ve written a new Sale Agent contract, you can register him with the main ERC20 token contract, he’s then permitted to sell its tokens on your behalf using guidelines such as the amount of tokens he’s allowed to sell, the maximum ether he’s allowed to raise, the start block and end blocks he’s allowed to sell between and more.

Hmmm tell me more!

There’s a lot of various sale models possible with Sale Agents, but a few that quickly come to mind are are…

The Progressive Crowdsale
For a more traditional style of raising funds, you could deploy 12 Sale Agents that could sell 1/12 of the total tokens available in the ICO each month over the course of a year. Prospective buyers could view the progress of the dev team and buy more or less each month depending on the projects progress. Or if the dev team is feeling confident, they could just deploy 1 agent every month as time goes on, that agent could be set to sell a varying amount of tokens at a certain value each month until all tokens are sold.

Multiple Crowdsales
It’s entirely possible with Sale Agents to have multiple crowdsales running at the same time using just the one token. Some instances where this would be handy would be to allow various parties access to your tokens at varying rates, you could essentially sell some tokens at a discount to one group and another group at the regular price… at the same time. Of course if you were to do this, I’d use the proportional distribution method described below to avoid any adverse effects on the network.

Flexible Crowdsale Models
Each Smart Agent is just like a person, each can have their own way of selling their tokens. Smart Agents can be written to allow the developers to collect their reserved tokens for development purposes. They can also be written to distribute tokens to reserved addresses such as what occurs in a presale and they can even distribute tokens using the proportional distribution method that avoids the ‘rush’ associated with current ICOs by allocating tokens based on the amount of ether deposited over time, rather than selling to whomever gets there first. The Rocket Pool crowdsale repo currently features these 3 types of Sale Agent contracts if you wish to see them.

Summary

The Smart Agent system can be inherited onto any standard ERC20 token contract and allows for a multitude of various ICO rollouts, both in timings and token distribution systems. It is currently built for the Rocket Pool future ICO and will be built out into a much more abstract version for easy use with any new ERC20 token once the code audits are completed and if the community expresses interest for such a system.

The Code

At the moment you can find the ERC20 token with Sale Agent compatibility in the Rocket Pool crowdsale repo. If the community likes this approach, I’d happily build it out into a more abstract contract that can be inherited by traditional ERC20 token contracts with little to no modification needed. This would then allow them to write their own sales agent contracts that can plug right into it. Currently it’s based around a fixed supply token, but it would not be hard to allow a variable token supply model as well. The code has been thoroughly unit tested but is also due for additional 3rd party auditing soon.

Also thanks to Nick Johnson from the EF for providing feedback on the concept which allowed some fine tuning. If you’ve made it this far, thank you for taking the time to read :)

Rocket Pool — Your new Casper friendly Ethereum POS pool in alpha.

Around the end of 2013, like many others at the time, I was captivated by the juggernaut that had become Bitcoin as it busted onto the mainstream media radar with the seemingly unstoppable price increase that not unsurprisingly, busted shortly after and as such, led to a bear market for the next few years in Bitcoin.

But my interest in a new found passion for Cryptocurrency didn’t waver and by early 2014, I had built my first mining rig. I quickly mined the most very wow Cryptocurrency at the time, none other than Dogecoin which was becoming a runaway success among a boom of Bitcoin spin offs.


My first hand built frame & mining rig — 6 x Radeon 290x

After mining for several months with relative success, it quickly became apparent due to the immense power usage required for POW, it was not to be a long term strategy for me as the power rates in my area were not cheap and my profitability became smaller by the day. Despite my passion for it, I decided to dismantle the rig, keep two of the cards for an awesome gaming rig and sold the rest. Once again, my interest in Cryptocurrency didn’t waiver and I spent the next few years reading daily on just about everything Bitcoin related, new breakthroughs, adoption and the rest.

With over 15 years lead web development experience and a CS background, I had often tinkered with the idea of doing some Bitcoin development so I could combine my passion for dev and crypto. Due to several factors, Bitcoin politics being one of them, I never pursued this idea and kept just doing my regular lead dev 9–5 gig which I was quite happy with.

Enter Ethereum

That itch though has never gone away and in early 2016 I was quickly mesmerised with the technology behind a relative new comer, Ethereum. While I had heard of Ethereum on the grapevine for a while, I’d never seriously looked into it until that time and from that point on I found myself hooked on the idea of smart contracts on a blockchain.

Fast forward to late 2016 and that itch was continuing to dig at me, so I decided to start getting a handle on Solidity, the primary Ethereum smart contract language. After making a few small apps, I was pretty impressed with Solidity and although it’s still a new language and still quite primitive in some areas, it’s pretty solid (great work solidity devs).

I knew I needed a project that might test my skills and allow me to get a much deeper understanding of Ethereum and solidity. Then it occurred to me, why not combine my old passion for mining with my new passion for smart contracts and make a new generation of mining pools with the main focus on being Casper compatible. That shouldn’t be too hard… right?

Rocket Pool — The new generation of pools

Rocket Pool is the result of that itch finally being scratched. I would classify it as a next generation decentralised Ethereum proof of stake (POS) pool currently in Alpha and built to be compatible with Casper.

Unlike traditional centralised POW pools, Rocket Pool utilises the power of smart contracts to create a self regulating decentralised network of smart nodes that allows users with any amount of Ether to earn interest on their deposit and help secure the Ethereum network at the same time.


An overview of the Rocket Pool network and how it operates.

Um… Casper isn’t finished yet

You’re absolutely right! While Casper is still a while away from implementation, I spent a fair amount of time analysing the Mauve paper and code. This allowed me to build a dummy Casper contract that simulates the inputs/outputs of Casper (none of the real internal workings) so that Rocket Pool can work as expected (at this stage). We will of course keep a very close eye on its development as work continues on getting Rocket Pool to the next release stage.

Right! So how does it work?

Rocket Pool is composed of 3 primary elements. Smart contracts, smart nodes and minipools. All three integrate with each other to provide a network that can automatically scale and load balance itself across multiple cloud hosting providers in any region of the world.

When a user sends their Ether deposit to the main Rocket Pool smart contract, if it does not meet the minimum requirement for staking with Casper (currently 32 Ether), it will create a new minipool contract and assign the user + their deposit to it. Once enough users are assigned to this minipool and their deposit total exceeds 32 Ether (or any min limit set by Rocket Pool), their minipool is then assigned to a smart node in the network with the least amount of server load (future versions will also assign to alternating geographic regions for redundancy and decentralisation), and their deposit is sent to Casper with their assigned nodes details. The user is also able to join minipools of a specific staking time, this allows them to have their deposit earning interest for the minimum allowed time by Casper (currently 2 months), 6 months, 9 months or a year.

When a minipools staking time is completed, a smart node will automatically request the withdrawal process to start with Casper. This withdrawal process can take some time and when it is finally ready to actually withdraw the deposit + rewards, a smart node will trigger this process for the minipool again. The minipool users are then allowed to withdraw their deposit + rewards from Rocket Pool.

To accommodate businesses such as wallet providers or exchanges, Rocket Pool also has a 3rd party partner contract API that allows these entities to offer staking services for their users while using the RocketPool infrastructure in the background. This free’s them up to focus on their business while providing their users the opportunity to earn interest on deposits for a fixed term.

Smart Nodes

By now you’re probably wondering what a smart node is. In the Rocket Pool network, a smart node can listen to all goings on in the network, get issued commands and contact other smart nodes directly using special scripts that run as services on each node. Currently each node must report in with the main contract every 15 mins to report on its current server load, launch any minipools that are ready and more. Smart nodes are also capable of disabling other smart nodes that are misbehaving, this can come in particularly handy if a node is suffering a DDOS attack, the server has caught fire or anything else that might allow Casper to penalise the node for not doing its job. In that case, the smart node will disable the misbehaving node to prevent any new users being assigned to it and (this depends on Casper atm) move any minipools currently staking on it to another node.

Future versions of Rocket Pool will give smart nodes even more brains. Each smart node will be able to monitor the status of the network and can even attempt to remote reboot another smart node regardless of the cloud provider it’s hosted on. Smart nodes will also be able to scale the network by automatically launching new smart nodes themselves (hello skynet) if they detect the network is running near capacity.

The Future

Rocket Pool is undergoing constant work and new features are always being added. While Rocket Pool is currently in Alpha, it is fully interactive in its current state and can be run with a local testrpc instance and truffle. I’d love to hear some feedback or anything else users would like to have in such a network.

The Code

We have working code! You can see all the contracts on my GitHub account at the moment. The smart node service scripts are currently working but still heavily under development and will be available there in the near future, the contracts run just fine without them though if you wish to run Rocket Pool locally.

Contact Us

If you’d like to have a chat, feel free to view the Rocket Pool website at www.rocketpool.net and contact me there or if you just want to leave a few quick thoughts, let us know below. All feedback is welcome! Thank you for taking the time to read this far :)