← Back to blog posts
October 23, 2021

Q&A: The cryptography advisor and lead core blockchain engineer behind Polymesh

We’ve been gearing up for Mainnet launch, all thanks to our dedicated and hardworking team To give you a behind-the-scenes look into building Polymesh, we spoke to a few of our developers.

Here we hear from Polymath's Cryptography Advisor, Aram, and Lead Core Blockchain Engineer, Mazdak, to find out which features they helped provide for Polymesh, what challenges they experienced, what has helped them navigate the blockchain space, and more.

What is one aspect or feature you helped provide for Polymesh, and what did it entail?

Aram: My work was very separated from the core development of Polymesh as I was working primarily on the application layer protocol which will be applied to the blockchain. Polymesh is a blockchain for security tokens and needs financial privacy so that assets on the blockchain can be issued and transferred confidentially as is typically required by participants in capital markets. Usually, on a public blockchain, everyone can see who owns what and in what amount. For a blockchain for regulated securities, though, there is a need for more financial privacy.

Providing privacy on the blockchain is a tough and complex issue. Since 2019, I’ve been working on a new protocol that could potentially enable private transactions, meaning nobody can trace who owns what assets and in what amount, and so on. This protocol is our patent-pending protocol called MERCAT, which stands for Mediated, Encrypted, Reversible, seCure Asset Transfers. 

As part of MERCAT, I have also been working on other applications like confidential identity. The idea is that prior to using the blockchain, we have people become certified by some certification authority which cannot be Polymath itself. This lets users transact on the blockchain anonymously and protects privacy while still ensuring participants can verify their identity and that only certified users are enacting transactions. 

Mazdak: One example was adding corporate actions to the chain, with which corporations can distribute dividends to investors and through which annual general meetings can be held. For this, we started with the product need and fleshed out the more technical details about how things should work. I then began writing the code and made adjustments based on feedback between product decisions and observations made when writing the code itself. 

While we were developing this feature, we had an expert in capital markets and one in product management. They would attend our core meetings and give input on decisions to guide our product to where it needed to go. We would also have technical discussion meetings where several teams would join to discuss the feature, for example with the SDK team and back-end team, as well as show-and-tell meetings where different teams would show and demo different features to gather feedback.

What type of challenges occurred for your team while working on Polymesh? 

Aram: As a cryptography researcher and scientist, working on Polymesh brought a lot of complex scientific challenges. We were trying to create a new, competitive protocol and there still exist some problems for which we haven’t found solutions yet.

The most major thing I have been working on for Polymesh is the MERCAT protocol, or enabling confidential asset transfers by hiding transaction amounts and asset types. The second major problem is the confidential identity protocol. The first version allowed for some level of anonymity but had some privacy drawbacks. Recently, we’ve been able to solve those drawbacks and create an efficient and secure confidential identity scheme. A related challenge was having a private auditing scheme, or how to provide anonymity and confidentiality while also enabling audibility. 

A significant part of my job is researching the state of the art and scientific papers to get ideas from. 

Mazdak: One interesting engineering challenge was governance. The governance model on Polymesh works this way: users propose Polymesh Improvement Proposals (PIPs) which they can vote on and assign different values. These then get put into a queue according to their respective points, which the Governance Council snapshots to make decisions from.

The initial queue implementation resulted in hefty costs for taking snapshots since a new order was computed from scratch every time a new snapshot was taken. Because snapshot-taking is unaware of the number of PIPs, there was a resultant cost problem where the user would be paying a constant cost while the cost for the chain would grow with the number of PIPs. For example, a user might pay 5 POLYX, while in reality, the cost might be N, where N is a parameter that grows with the number of PIPs already stored. 

This challenge was more resource-constrained. We had to think about weights and efficiency and attack those first. Ultimately, we had to re-engineer this feature to use a more caching approach where we have a snapshot in waiting and insert new PIPs into the right place in the queue. When new votes are submitted for a PIP, we also alter its position. That way, when the snapshot is actually taken, we only take a copy of it. These sorts of caching approaches are often used to solve this kind of problem. What we do is essentially perform a binary search.

What do you find most interesting about the project?

Aram: The most interesting part about Polymesh for me is its ambitions and the challenging problems we are trying to solve. It’s also really interesting thinking about the specific scientific challenges that need to be solved in order to enable a specific feature. E.g. we have been working on enabling anonymous credentials and certifications where the investor can get certification during the KYC process and later use that certificate anonymously without revealing any information about his identity or trades.

Mazdak: On a technical level, the thing I find most interesting is that we can focus on implementing our features and on our domain. Using the Substrate framework, we get a nice representation of our concepts in Rust. So, with the exception of weights and attack vectors, we do not need to think too much about the blockchain, networking, and low-level consensus details.

What has helped you work with blockchain technology? 

Aram: The cryptography space is quite modern– I’ve been working on blockchain protocols only since 2017. Prior to joining Polymath, I was actually advising another crypto-related project involving innovative cryptography technology relating to private blockchain transactions. That experience really helped me contribute to MERCAT and continues to help me research in other directions. 

Another thing I’ve found really helpful is the flexibility and open approach of the research team managers. While it’s important to be focused on the particular problems already formulated, it’s really important to provide researchers with time to do open research because the most amazing and creative things come out of it. When you do not block yourself on some specific problem, you will be looking for opportunities, and might even come back to those existing problems with a fresh outlook and new ideas.

Mazdak: Before joining Polymath in July 2020, I was working on designing language features for Rust as well as implementing them in the rustc compiler. Since we use the Substrate framework, based in Rust, my knowledge of the language has helped me work on the core chain. However, before joining, I did not know much about blockchain itself. Reading up on blockchain, and especially Ethereum, has helped, but I’ve also found the team to be a really helpful resource.

Join DiscordDownload the report

Ready to use Polymesh?