By Brandon Lovejoy
Architects of Consensus is a series dedicated to shining a light on the unseen figures who are developing and advancing the most battle-tested, highly performant blockchain stack in the world — EOSIO. These are the intrepid explorers whose lives have traced the elliptic curves and merkle trees of blockchain technology to reveal its many potentials, and who have returned to share that knowledge with us.
I had the pleasure of sitting down with Areg Hayrapetian over a video call, apropos of the virtual worlds we frequently inhabit. Our corresponding chats online revealed a focused and curious individual, possessed of a significant intellect, who has followed his inner muse along an unlikely trajectory to arrive at the bleeding edge of blockchain.
Areg’s wide-ranging thoughts stretch from the contrasting design characteristics of decentralization and centralization, to the minutiae of account permissions, transactions per second, and back again to the tension between freedom and control in society. His perspectives on the hard-won potential of EOS, the intrigue of AI, and the nature of technology, also surface.
At 33 years of age, Areg is a consensus level blockchain architect and engineer who has been investigating the possibilities of blockchain and cryptocurrency since he first became interested in Bitcoin back in 2013. Having completed his B.S. in Mechanical Engineering at UCLA, Areg began pursuing his Ph.D. in the same field at MIT, however, he was still fascinated by blockchain, and at some point, the pull became irresistible. In 2018 he joined Block.One to help their engineering team deliver EOSIO 1.0. Areg now works for the EOS Network Foundation as the Director of Engineering where he continues to use his talents to advance EOS as the best-in-class Web3 smart contract platform and blockchain ecosystem for the benefit of the whole community.
What got you interested in blockchain and cryptocurrency?
Bitcoin introduced me to the broader concept that it was possible to use technology and incentive models built into code in a clever way to create a platform that allows people to hold tokens of financial value that they could exchange for tangible goods and services while also not requiring the platform to be owned or controlled by any single entity or institution.
The fact that this was achievable, and just the overall concept of it, I found to be pretty remarkable. And it makes you sort of start thinking, what is money, really? Ahh, ok!
So just as a nerd interested in this idea, interested in cryptography, interested in how it could be applied to build cool things, as well as the game theory, economics, and all of that, the technology behind Bitcoin was already motivating enough by itself.
But also one of the other motivators, and I think a significant part of the appeal of the concept was my hope that this could provide ways of integrating financial incentives into applications that are more permissive than what existing financial networks allowed, which could spur greater competition and innovation in the digital space.
When it comes to products and services in the digital space that are largely decoupled from finances, I already believed there was a lot of competition. I view this competition as a good thing since it leads to innovation and also to great variety which can better meet customers’ similarly varied desires and preferences.
But far more interesting and powerful products and services become possible when they are deeply integrated with finances and money. And the connection to the traditional financial system, which appears to me to be very conservative in its nature, seems to create a bottleneck in innovation and creative freedom. So I was excited by the thought that perhaps a growing open-access alternative to the existing financial system could unlock competition and the potential for products and services that never came to be, due to hindrance from the dominant traditional financial system.
I did and still do, even more so as I have gotten older, have some concerns about too much freedom and the harm it can have on a society. Almost everything is best in moderation, and too much of a good thing can be bad. I think the past decade has shown how even non-financial aspects of life such as free speech, which all things considered I am still a pretty big proponent of, can be weaponized to cause harm at a large scale. Finances or money can be thought of as a particular potent variant of speech which is quite effective in altering people’s behavior. So, I do not actually want a world of absolute freedom with regards to the flow of money and no restrictions whatsoever on finances since I view that as a net negative for civilization.
That said, I do often find our society biased more towards the, in my view, overly and unnecessarily restrictive side on matters of speech and finances, and generally other forms of expression, and I think technology that can provide significant competition to shift that balance back a bit is probably doing more net good than harm. Again, moderation is key, and I believe there are many in the cryptocurrency space that go too far to the extreme for my liking. The natural tension between those in this space that are more extreme on one side, and powerful incumbents in our society on the other side who want too much control over everyone’s lives, will hopefully lead to a compromise in the middle that I am much more comfortable with. So, I tend to support the overall spirit in the cryptocurrency space, although with some reservations.
Do you feel like blockchain will make good on the early promise of the internet, and bring about a more decentralized, peer to peer network, like before centralized servers came to be the dominant architecture?
Yeah, I hope so. Well, the Internet itself is this wonderful, decentralized infrastructure that you can do things on without too many levers of power that control everything, but the reason Web 2.0 and the cloud model have arisen is because there’s a lot of value in it, and it’s more difficult to achieve that value through an alternative means that doesn’t centralize control.
It makes sense why that model has become so dominant. But I think it may be like a pendulum swinging back and forth. You have the more decentralized model to start, with the early Internet, and that was a really cool, powerful idea. Very inspiring but hard to work with, harder than a more centralized system, which is kind of what we moved to. Hopefully it will go back to a more decentralized system without compromising too much of the conveniences.
When you want to build something useful and easy, it’s simpler to do it centralized. The goal ultimately should be to still achieve a platform that offers convenience, flexibility, and addresses scaling challenges while removing those burdens of operation from the people who just want to focus on the unique aspects of their application, whether that’s the core business logic, the marketing, or whatever. The infrastructural parts common to many applications, which isn’t what makes them each special, should ideally be abstracted away and handled by experts focused on that. The key difference for this decentralized future compared to what we have today is that these convenient decentralized application platforms should not compromise in such a manner that gives control over the platforms everyone depends on to a hierarchical structure that is ultimately controlled at the top by very few individuals.
While I do hope to see things move back to the decentralized side over time, I think it’ll be a very long process because there’s a lot of technology that needs to be built to achieve that goal without compromising on the things that are essential for people to even consider this alternative as the tech stack to build on.
We still need to shrink the gap between blockchain and the traditional tech stack for building applications in terms of cost, in terms of developer convenience, and in terms of all sorts of areas that blockchain is still lagging behind on which I’ve learned about more deeply through trying to build a sophisticated application on it. Unless we shrink that gap, it won’t be viable for the vast majority of applications.
Currently, it’s only viable for a small subset of applications that truly need decentralization otherwise they can’t survive. What I’d like to see is a world where applications that don’t absolutely need but could still stand to benefit from it move more and more towards that, at least for their critical functions.
You were actually on a completely different track pursuing a Ph.D. in mechanical engineering, how did you end up making such an epic course change to where you are today?
That’s right. Initially, I had been focusing my education and career towards a different field: mechanical engineering. I had already been somewhat hesitant about my decision to go down that path since I had been interested in computers and programming from a young age. As a child and young adult I studied computer science on my own and worked on programming projects on the side for fun. Then starting from when I first got interested in Bitcoin in 2013 and through the end of the 2017, I found myself spending an increasing amount of my limited free time learning all I could about blockchain technology and cryptocurrencies, contributing some open source code to projects I was interested in, and participating in cryptocurrency community discussion forums. It became obvious that my heart was not in the field or career path that I was trying to continue to follow out of inertia, and that what I really wanted to do is spend most of my time working on blockchain projects. Then in February 2018, I made a transition from having cryptocurrency and blockchain be my hobby to having it be my full-time focus and career when I joined Block.one to help build EOSIO.
What was your experience like working at Block.one during the early stages of EOSIO development?
I joined Block.one at a time when the EOSIO team was rushing to complete and deliver EOSIO 1.0 in time for the deadline marking the end of the EOS token sale. It was a lot of hard work but also fun getting to be part of that rush and help the team deliver working software by the deadline.
I was overjoyed to witness how a community came together to take that open source code we developed and used it to launch a blockchain, the EOS blockchain, as well as a whole ecosystem surrounding it. It was a very exciting time, and I also enjoyed the two years after the launch when the EOSIO team was busy constantly improving the EOSIO software, adding new features, and even helping the EOS community diagnose and solve various issues that came up as EOS became battle-hardened in the public arena full of hackers and attackers.
I took a slight detour in the following two years at Block.one, and then Bullish, where I became focused on building a cryptocurrency exchange and improving a private version of an EOSIO-based blockchain that the exchange was built on. It was good experience and the process of actually dog-fooding, building a sophisticated application on EOSIO, showed me where there are a lot of the deficiencies in EOSIO, not to mention other blockchain platforms, when it comes to building a sophisticated and performance intensive application on the blockchain managed by a large team of developers. There is still a lot of work to do to improve blockchain technology!
Now I have joined the EOS Network Foundation with the hopes of getting back to doing what I had originally set out to do when I first joined Block.one: to help make the technology underlying the EOS network a great blockchain platform upon which developers can build performant and sophisticated decentralized applications that are highly usable.
So right now, among other things, you’re working on Trust EVM. What’s your role on that project and what’s your view on the significance of that project?
My role right now as it relates to Trust EVM is to provide that team with whatever development assistance I can to continue improving the software as the team gets it ready for production launch. In particular, right now that involves upgrading the implementation of a component of the Trust EVM stack, the translator, from its current quick solution to a more performant and sustainable implementation as a nodeos plugin.
My view of the significance of Trust EVM particularly as it relates to EOS is that by enabling existing developers who are used to developing using Solidity and against an EVM-like platform to easily switch over to building on the Trust EVM with little to no changes required on their part, we can attract more developers to build on EOS which can hopefully induce demand by users. Providing a familiar EVM platform lowers the barrier to switch, but the expectation is that developers would be motivated to switch because Trust EVM running on EOS can leverage the higher transactional capacity available on EOS which should ultimately result in cheaper transactions than many of the alternative EVM-based platforms developers can currently choose from. This will hopefully revitalize development on EOS and that positive sentiment can drive further value and improvements to EOS.
To me, if EVM on EOS is successful, that does not take away from native EOS development but rather it can ultimately support it. The EOS community will continue to innovate and improve the tooling and platform for native EOS development to hopefully address any gaps some developers may see compared to what they are used to with developing on EVM-like platforms. And at some point, my hope is that the developers brought over to the EOS ecosystem through Trust EVM will start exploring native EOS development either to port their existing app (e.g. to take advantage of even greater performance) or when taking on a new project which may be a more sophisticated application that can benefit from the unique capabilities that are available in the native EOS development model but not in the EVM model.
So to me, success with Trust EVM on EOS is: in the short term, a boost in developer activity of EVM-based decentralized applications on EOS and an increase in user demand of applications running on EOS; and, in the long term, continued high user demand of applications running on EOS but with most of the user activity concentrated on decentralized applications running on an improved native EOS development model and the EVM still around to complement native EOS development for the applications where it still makes sense.
What programming languages are you most competent in, and what are some others that you can program in, but you wouldn’t consider yourself top level.
I know various languages, but certainly the one that stands out compared to the rest is C++ and that’s the language I like to work in the most. Other languages like Python, JavaScript, Rust, I can work well in them, but C++ is the one I’m most proficient in. And then, in terms of languages I’d like to work in, I actually do prefer working in systems languages, so C++ fits but I also really like Rust. I think it’s a neat language.
What are some adjacent computer science skills, such as architecture, that you feel like you’re uniquely qualified in?
Yeah I do find myself enjoying, and have spent quite a bit of time over the last four years, on the architectural side. I was often part of the architectural design of EOSIO and figuring out how to continue to improve software and build out the architecture. In Bullish I was the architect behind the account and permission system that they’re using and led the team to develop that. As time has gone by, I have been focusing more on that side of building out architecture, and leading a team of developers to work on it, more so than actually developing myself, although I still love coding as well.
Tell us about some of the more notable blockchain projects you’ve worked on.
I started by participating in the BitShares community. Mostly it was limited to contributions in the form of discussions with other members in the community forums, ideas, analysis and feedback, etc. Then when I started getting involved in the Steem blockchain, I took a more active role. Besides participating on the Steemit platform itself through adding content, I also contributed some code to the Steem blockchain code base, found and fixed some bugs, and was even a witness, the equivalent of a block producer, on Steem for a little while.
But most of my contributions in the blockchain space came when I started working on EOSIO. I worked on a bunch of various parts of the core EOSIO code base. Of particular note where I tended to spend more of my time in the code base was in the account and permission system, the consensus algorithm, which is lower level than DPoS, and the protocol feature framework to enable easier hard forking upgrades of the protocol. I also spent time working on the system contract and its various features, and in particular worked on the implementation of PowerUp within the system contract.
During my time working on the Bullish exchange, I worked on a couple of different projects that were pretty interesting. One was a proof-of-concept of an inter-blockchain communication system between an EOSIO blockchain and the Bitcoin blockchain that enabled a BTC custody solution requiring minimal need for trust. We did get token deposits and withdrawals working with a Bitcoin test network before Bullish ultimately went another direction that allowed for more easily adding a wide variety of new tokens. The thing I spent most of my time on in Bullish was designing the architecture of and leading a team of developers to build a flexible account and permission system built upon an EOSIO blockchain that met the Bullish exchange’s needs of using WebAuthn keys for higher privilege operations, establishing expiring session keys for lower privilege operations, leveraging roles with granular capabilities that are modulated by policies imposed by exchange operators (e.g. compliance restrictions), and facilitating all of this through tracking and validation on a blockchain which establishes a tamper-resistant log of both user and operator account activity.
What are the main challenges developers face when building on blockchain.
One of the main challenges is the difficulty for developers, especially developers who are not super familiar with what it’s like to build on EOSIO specifically and on blockchain more generally, to change the contract code over time after launch especially if there is some bug and fixing it requires the contract to access data that is not already indexed in existing tables. It’s a complicated process that involves migrations of state, and considering the backwards compatibility aspect it is all a huge burden. Having better developer tools to abstract that and make that easier for developers so it’s closer to SQL databases would be very helpful.
Another thing is just better developer tooling to help debug issues. For example, there currently is no debugger for EOSIO smart contracts.
Finally, as fast as EOSIO is, there’s a lot of performance improvement still needed to build certain types of applications. At this stage, blockchain is not really ready for the throughput and scale demanded by some applications. Those are the applications where as much as you would like them to benefit from decentralization and building on a blockchain, you would be kind of crazy to do it.
So what’s an example of something that’s totally insane to build on blockchain?
I’m thinking of the performance expected from many centralized exchanges, where it’s expected to easily absorb throughputs of over 100,000 transactions per second while still maintaining low latency. Trying to build that as a smart contract is a bad idea right now.
What are we clocking in at right now with EOSIO in terms of TPS?
It depends on what the transaction is doing. It’s already been demonstrated that in a public global decentralized EOSIO network you can go past 4000 token transfers easily, and you can sustain that. With some other tricks and tuning I know you can go considerably beyond that, but it’s hard to say definitively. We have to actually benchmark it, and not just in lab settings but also in a real global network setting, to see what can be realistically sustained. We’re not talking high double digit thousands TPS, we’re probably talking about a number in the low double digit thousands. I think around 10,000 TPS sounds pretty reasonable if you tune it well and each transaction isn’t doing anything too complicated.
So, why EOS? What do you think are the core value propositions of EOS, in this historical moment, not just in the abstract.
First, I think some communities can be very hard lined about how technology should be built and are at more extreme ends of the decentralization spectrum that I don’t think make the right trade-offs to build something that works well and can capture a large developer community in the long run. It seems that people in this community are at least more flexible, if not just more aligned with what I think are the right trade-offs to make for the platform and its governance system and consensus. So it feels like there’s alignment to build the architecture that I think would be necessary to create a viable platform for the future.
Second, EOS is actually in a surprisingly rare situation that is beneficial for the long-term decentralization of the platform. There are several cryptocurrencies out there focused on being a general purpose platform for decentralized applications. And if you look at their token distributions, they look less decentralized than EOS. This is especially true for many of the more recent platform projects, which have very large insider allocations which typically also means that those insiders will have outsized governance influence for many years to come. That kind of centralization can actually work to the benefit of those communities in the short-term because it enables few highly-motivated individuals to take decisive action for the benefit of the network and thus themselves as very large token holders. But I don’t believe it inspires much confidence in the long-term success of the platform when transition to a decentralized power structure remains unproven for them.
Ideally, these decentralized application platforms would demonstrate success, specifically developer and user adoption, while under the control of a decentralized governance system, so that users can feel comfortable about the long-term sustainability of this model going into the future. I do think success is far more achievable by empowering centralized coordination to lead and act in the interests of the token holders, but I like to see a more robust mechanism that aligns interests between the centralized coordinators and the token holders than simply hoping the insiders will continue to maintain a financial interest in the tokens they were granted control over. That’s why the funding structure of the EOS Network Foundation really excites me. If the ENF fails to meet the community’s expectations, they can be cut off from the inflation tap and those funds can be redirected somewhere more productive. And the way things are set up on the blockchain, there is a cultural expectation that it is okay to do that, whereas creating a fork to seize pre-allocated funds from insiders who are failing to perform is more controversial and so token holders may be reluctant to carry out such a fork out of fear of damaging the reputation of their platform. And even that extreme option is assuming the insiders’ pre-allocated funds are held as tokens on a blockchain that the community has any influence to successfully fork.
The widely distributed nature of the EOS token and the mechanism used to decide on, fund, and if necessary revoke coordinators like the ENF that lead and represent the interests of the token holders gives me confidence that if over the next few years EOS can survive, revitalize the community, improve sentiment, increase developer adoption, and create large user demand, then that success can survive for the long-term as a sustainable system not at risk of insiders losing interest, cashing out, and letting the system die without their support. Granted, I admit these currently available governance mechanisms on EOS are primitive and have their flaws. I do think that still needs to improve. But despite those flaws, I still have more confidence in the sustainability and long-term decentralization of EOS than many of the other recent general purpose blockchain platforms, assuming EOS is able to overcome the enormous hurdle of relevance over the next couple of years. I don’t want to make it seem like overcoming that hurdle will be easy. It will be difficult and it is a bit of a long shot. But it is important to me to believe that if that hurdle was to be successfully overcome then the long-term future of EOS can be very bright, otherwise it will feel like a major waste of effort.
Then there are aspects of EOS and the EOS community that have come to be because of the unique history of EOS and the unfortunate situation the community finds itself in today. I think that misfortune and, frankly, desperation can create a more aggressive, ambitious community with a large risk appetite that is willing to take significant steps to try to fix the problems we see. And that sort of bold action is exactly what I think EOS needs right now to succeed. There is still a lot of work that needs to be done, many big changes to be implemented, and large investments required for changing course and moving in the right direction. I’m hopeful our disappointing history thus far can establish a new culture that, when coupled with appropriate investment and a community that even after four years of disappointment has many amazing and brilliant developers still remaining and building, will ultimately end up being a super power for EOS in the long run.
What are you exploring outside of computer science related fields?
I like going deep in one or two things, which I guess in this case would include blockchain, but then also having a breadth of knowledge. I like to learn broadly, even if it comes with the trade-off that you are forced to remain more shallow in that knowledge. The areas I spend some time trying to learn broadly include math, physics, engineering, psychology, economics, and politics. I guess even in that breadth I am still selective in the sense that I prefer spending my time trying to better understand how the world and people within it function more so than even broader ways that one could spend their time such as developing other skills or dabbling in the arts.
What are your future aspirations? Is there life after blockchain?
I do think there is a lot of work to be done in blockchain for many years to come that I am very interested in continuing to do. But if all goes well, eventually a lot of the low-hanging fruit will have been addressed and the focus will predominantly be at the highest layers of the technology stack. I’m a lot more interested in working on the foundations, and if it has been well established and become more mature and stable, I will likely start entertaining other things beyond blockchain.
I haven’t given it too much thought, but I think one possibility that I may eventually be interested in exploring is the area of machine learning and artificial intelligence.
It seems like machine learning is in a similar stage as blockchain, development wise, but maybe not?
Certainly it’s very hot right now, again. Better computing and enormous amounts of data enabled by the internet has resulted in major progress with deep neural networks and back-propagation which has reinvigorated the field after a period of AI winter.
Despite the significant recent progress in machine learning, I do personally feel like we’re still very far away from what I’m a lot more interested in, which is solving the problem of general artificial or machine intelligence. Neural networks now allow for a lot of cool things and not just that, useful things as well, like self-driving cars. That can have an enormous impact on our society. But it is nowhere near as impactful as a general machine intelligence that can be on par with or exceed human intelligence. Of course, that is a ridiculously hard problem to solve and my intuition tells me that even several decades in the future there will still be a lot of people working on solving that problem.
With blockchain, I feel like the critical time for the history of that technology is the present. And what I mean by that is that if blockchain does ultimately mature and becomes a reliable, viable platform for building a wide variety of applications, then I believe most of the really interesting work to make that future a reality will be happening in this next decade. On the other hand, I think it is likely that scientists and engineers will still be struggling to get closer and closer to that milestone of general machine intelligence on par with humans throughout the remainder of this century.
When you put it like that and start comparing it against biological intelligence, the curve is very steep, and blockchain seems really achievable by comparison.
Yes. Of course, there are many narrower applications that you can achieve now with machine learning. And that can be a very rewarding career. It’s just that for me, what I would find most rewarding in the area of AI and ML is feeling like you are getting close to that general machine intelligence milestone. Making progress in a narrow application of machine learning could be exciting and cool as well, but for whatever reason I’m just more thrilled by getting to explore and innovate within the blockchain space at the moment.
Do you share any of Elon Musk’s concerns about AI?
I am concerned about existential threats in general. I’m concerned about how more powerful technology, which could be AI but even just narrow AI, in the hands of foolish people doing reckless things puts all of human civilization at extreme risk. But I guess I’m more concerned about that aspect of AI development than I am about the possibility of a conscious self-directed AI choosing to wreak havoc on humanity.
But these sorts of concerns apply more broadly than AI. It applies to any technology, blockchain included. It is important to think through how technology that is being created can be used in ways you didn’t intend and to question whether what you are building is actually a net positive for society. Some technology is more naturally inclined to be used for destructive purposes, but for the most part technology is neutral. However, what all useful technologies have in common is that they amplify power.
The important questions are, who will be in control of that technology and how will they be using that increased power? I think there are a lot of challenges in our society regarding these two questions. These are important challenges to overcome if we want to have a bright future. I guess that is more of a governance problem than a typical technology problem. But one can view governance as a social technology.
What advice would you give to those wanting to build on blockchain?
Just do it. Just try it. Get involved. Don’t expect that there’s some course or specific book you need to read, or some credentials you need to acquire as a prerequisite. Just start learning about it using the information freely available on the internet and start building a simple application simply as a learning exercise. That’s the best education you can get if you’re interested in learning how to do it. Then eventually to further advance your knowledge and skills, either start a new project or contribute to an existing open source one.
Good advice. Thanks for your time, and for sharing all your thoughts and insights here today!
My Pleasure.
For a considerable portion of this interview with Areg, he delved so deeply into the multiple tradeoffs inherent in the types of consensus algorithms that various blockchains employ, that I have opted to save the entirety of those particular thoughts for another piece altogether, so if you enjoyed this, know that we will yet go deeper into the mysteries of blockchain consensus!
This was the first interview of our new series, Architects of Consensus.
Let us know your thoughts in the comments below!
EOS Network
The EOS Network is a 3rd generation blockchain platform powered by the EOS VM, a low-latency, highly performant, and extensible WebAssembly engine for deterministic execution of near feeless transactions; purpose-built for enabling optimal web3 user and developer experiences. EOS is the flagship blockchain and financial center of the EOSIO protocol, serving as the driving force behind multi-chain collaboration and public goods funding for tools and infrastructure through the EOS Network Foundation (ENF).
EOS Network Foundation
The EOS Network Foundation (ENF) is a not-for-profit organization that coordinates financial and non-financial support to encourage the growth and development of the EOS Network. The ENF is the hub of the EOS Network, harnessing the power of decentralization as a force for positive global change to chart a coordinated future for EOS.