Scalable DeFi

Scalable decentralized finance

Abstract: This blog presents a fully documented framework for DeFi solutions, such as “Automated Market Makers” (AMMs), on a highly scalable blockchain like the Partisia Blockchain. The framework guarantees fixed prices across independent liquidity pools and effectively addresses front-running with MPC.

Financial inclusion is at the heart of the original narrative that formed the beginning of blockchain and later Decentralized Finance (DeFi). The global financial crisis in and around 2008 revealed several weaknesses in traditional financial systems. The global financial crisis was part of the motivation behind the Bitcoin protocol creation. Although the challenges behind the global financial crisis were more significant than what immutable money could fix, it initiated and accelerated innovations that improved traditional finance and pushed to new horizons.

The very same crisis inspired the origin of Partisia. However, innovation was a different type of decentralized cryptography that was also designed to remove intermediates, which manage private information, such as sealed bids in financial markets. The initial work by Partisia was the world’s first Decentralized Exchange (DEX) with sealed bidding which went into commercial use in 2008.

The Partisia Blockchain established in 2020, is a combination and extension of these two narratives and provides a powerful encrypted computation network and tool set to continue fixing weaknesses in both Decentralized Finance (DeFi) and Centralized Finance (CeFi), as exemplified by the solution described in this blog.

DeFi and scalable blockchains

DeFi is an important part of Web 3.0 and provides solutions that may most likely drive and enhance financial inclusion. This blog focuses on so-called Automated Market Makers (AMM) as a simple and decentralized way to exchange crypto assets. The core innovation behind AMMs is to conduct trading without direct interaction and matching of buyers or sellers of crypto assets. This significantly reduces the complexity of the market solution. Since the entire AMM solution is a set of smart contracts, the security model was also significantly improved as a genuinely decentralized trading platform.

Ethereum has been the most used blockchain platform for AMM solutions. And token bridges–as well as second layer blockchains–have broadened the uptake to other blockchain networks. Recent developments take this development one step further and run AMMs across independent blockchain platforms, i.e. cross-chain DeFi. This poses a set of new obstacles, such as the challenge of representing states (data and tokens) across independent blockchain platforms.

Mechanism to guarantee fixed prices

Another challenge preventing a simple copy-paste of the Ethereum model to sharded or cross-chain blockchains is the economics instilled into the Ethereum execution model. This is primarily the arbitrage opportunity coming from the “all or nothing” execution (atomic execution), as well as the sequential use of the entire AMM solution (one user at a time). With Uniswap (one of the most applied AMMs) for example, a user can swap asset A to asset B, and then swap asset B to asset C, and then potentially swap asset C back to asset A without other users interfering. Sometimes this set of swaps returns profit to the user. This type of arbitrage essentially for free since the public ledger allows anyone to constantly monitor the AMM solution. This is, however, only feasible due to the atomic execution and sequential use of the AMM solution, and cannot be transferred to a sharded blockchain or to cross-chain AMM solutions without additional economic mechanisms.

The Partisia Blockchain team has jointly worked with researchers specializing in AMMs and economic mechanism design. And together developed a mechanism which guarantees fixed prices as well as the “multi-swap” arbitrage opportunities described above. The key component is a “lock-swap” mechanism that guarantees a user fixed prices for a given swap. The mechanism only locks the actual requested trade and allows other users to use all liquidity pools without the non-scalable sequential use of the entire AMM solution as we know it from Ethereum.

The mechanism essentially works as follows: every pool keeps track of two pools, the “actual liquidity pool”, and a “virtual liquidity pool”. The actual liquidity pool keeps track of all the instant swaps, i.e. those that are actually executed. The virtual pool keeps track of the lock swaps, since such swaps might be canceled later on. Hence, by submitting a lock-swap the user secures fixed prices by the lock-swap function, which only affects the virtual liquidity pool. For any user after the lock-swap, the protocol ensures the smallest amount of assets across the actual liquidity pool and the virtual liquidity pool. Hereby, the mechanism favors first movers that fixed prices using the lock-swap function. Unlike the Ethereum sequential use, the lock-swap minimizes the impact on the entire AMM solution so assets can be exchanged in parallel and across independent blockchains and shards. And also in liquidity pools with one or more lock-swaps. Read more about the mechanism here.

In other words, the mechanism ensures the liquidity managed by the AMM solution is put to maximal use in two ways:

  • First movers that discover and, hence, secure fixed prices (lock-swap) have a minimal impact on other users’ ability to use the AMM solution.
  • The mechanism allows for completely independent execution across shards and blockchains to support unlimited scalability.

The mechanism is designed to fully utilize sharding where transactions are automatically off-loaded across different shards in an ideal way that favors unlimited parallelization, i.e. asynchronous and concurrent execution. This type of sharding is native to the Partisia Blockchain and will be instrumental in ensuring unlimited parallelization needed to match the demand as decentralization flourish. Read more about the sharding model here.

Finally, note that since cross-chain AMMs are similar in nature, the proposed mechanism also supports use of liquidity pools operated on completely separated blockchains.

Remove front-running opportunities

Another challenge and obstacle for a broad uptake of AMM solutions within and beyond the blockchain ecosystem is front-running. On Ethereum and similar blockchain platforms, the AMM transactions are transparent to all, but added to the blockchain consensus model by one or more actors, such as “mempool operators” or “block producers”. The problem is that these actors can delay and place their own AMM valuable transaction, i.e. front-running.

Front-running is a critical problem that needs to be solved for the sake of the users, but also a problem that is critical for the DeFi narrative as a “single point of trust” failure. Fortunately, the advanced encrypted computation that is built-in to Partisia Blockchain provides a decentralized solution, which points back to the original work by Partisia and the first commercial use of MultiParty Computation (MPC) for safeguarding sealed bids.

However, as a big contrast to the first commercial use of MPC, Partisia Blockchain provides a simple interface that allows any developers (without cryptographic skills) to script the required computation and leave it to the network to compile and run the encrypted computations. The concrete solution is an encrypted computation which keeps the actual swap secret until it is fully executed. Hereby, the arbitrage opportunity from frontrunning is effectively addressed.

Regulation and traditional finance

Ensuring that DeFi solutions comply with the jurisdictional regulation is, of course, an obligation for any DeFi service provider. It may also soon be a competitive advantage and a requirement for expanding the use of DeFi solutions outside of blockchain.

While financial fraud regulations, such as KYC and AML, are obvious, matters that are addressed in this blog may become essential regulatory requirements as well:

  • First, front-running needs to be effectively addressed, and for the sake of the blockchain narrative, in a decentralized fashion, such as the privacy-preserving swapping on Partisia Blockchain.
  • Second, the built-in “free” arbitrage opportunities may not be acceptable for financial regulators. The proposed lock-swap is a simple add-on feature that can be switched off unlike the AMMs on Ethereum where free arbitrage is cooked into the very foundation of the blockchain platform.
  • Third, privacy-preserving computation may involve data that need to operate on nodes running in designated jurisdiction, which is a built-in functionality on the Partisia Blockchain.

Although future regulatory requirements are unknown, building a blockchain network that is sufficiently flexible to quickly adjust to regulatory requirements may be crucial. For DeFi service providers that aim at offering DeFi solutions outside of the blockchain ecosystem and in direct competition with traditional financial solutions, regulatory requirements will be instrumental.

Get started and resources

For DeFi teams considering to build the next generation of scalable DeFi solutions on Partisia Blockchain, please find links to the scientific work, description, and template smart contracts below:

Blockchain, MPC and government: How Partisia Blockchain can facilitate democratic innovation

Blockchain, MPC and government: How Partisia Blockchain can facilitate democratic innovation

Throughout the ages, famous philosophers have grappled with the concept of good governance. From Aristotle, Machiavelli, and Hobbes to Rousseau, Voltaire and Rawls, different perspectives have existed and challenged each other over the ages on the topic. Today, in democratic societies at least, the general consensus is that of a government that is accountable to the people, with checks and balances, the guarantees of fundamental rights, and integrity in how it operates. New technologies, such as blockchain, can aid in the pursuit of good governance — this article outlines a few possible examples of how Partisia Blockchain could help governments innovate and better their governance practices:

Blockchain-powered governance

Paperwork, licenses and standing in lines — bureaucracy is something that regardless of political affiliation, people love to hate. But the true purpose of bureaucracy (whether well-designed or not) is to ensure due process and guarantee people’s rights. This in essence very noble pursuit can run into a variety of different problems, from potential inefficiency to outright corruption. A public blockchain could help to streamline processes and make them more transparent, paperwork can be filed and traced through different steps on the blockchain, whereas combined with MPC the private information in these processes can be kept secret, or only available to certain parties. In certain countries, where corruption is an issue, the intransparency of bureaucracies can allow for wrongdoing in e.g. bureaucratic processes such as ignoring, changing and/or the outright fabrication of documents. A public blockchain could allow for more trust in bureaucratic institutions, especially if those institutions don’t have control over the nodes that operate the blockchain. This is the principle behind a project called DelNorte.

DelNorte is currently running pilot projects in Latin America creating NFTs out of real estate deeds and adding them to a public blockchain. This is meant to make the bureaucratic process more efficient, give more stability and transparency regarding real estate ownership in the participating countries, circumvent potential corruption and maintain the integrity of the institution. While the government is the door to access to the system, the government does not have control over the blockchain and the listed real estate deed NFTs. Partisia Blockchain is proud to have entered into a partnership with DelNorte, helping them to add privacy and security to their e-government solutions.

Transparency for public tenders

Governments provide goods and services to their citizens, from parks, highways and schools to militaries for the national defense. While some governments have more resources than others, many of the goods used to e.g., build and maintain a public highway, need to be contracted to third parties. What is usually the case when a government has to contract such goods or services out, is that they publish a tender for which parties can bid. This ideally leads to many different companies bidding for the contract with the government, attempting to underbid each other and/or outclass each other with the quality of the good/service that they provide.

Nonetheless, public procurement bidding processes are often highly intransparent and even prone to corruption, which cheat the taxpayers out of the best possible deal they could have had. Blockchain technology could also help combat this problem, making the bidding process transparent and establishing trust with the general public. However, a major issue with the transparency of a public blockchain is that it does not allow for the hiding of certain sensitive information e.g., a company’s capabilities, classified technology, etc. that could be part of the bidding process. This is where E-Trusty comes in: E-Trusty is a dApp building on Partisia Blockchain to use the public blockchain to create transparency, while obfuscating sensitive information in the bidding process using MPC. The goal is to create a platform for public procurement that allows for the transparency of seeing multiple bids for a given contract, while using MPC to hide and protect sensitive information.

Privacy-preserving CBDCs

Multiple central banks around the world are beginning to develop and implement so-called central bank digital currencies (CBDCs). As opposed to digital currencies, such as Bitcoin or Ethereum, these digital currencies are centralized and issued by a national bank. They are pegged to the value of a fiat currency and are meant to be a part of the existing financial system. There is however a major concern regarding CBDCs and that is that due to their centralized structure and control, they could essentially allow for a central bank, and by extension a government, to have complete insight into how people are spending their digital money. Furthermore, it is also feasible to imagine that a government could easily overreach, especially if it were to become corrupt, and easily seize such digital money. There would therefore need to be checks and balances guaranteed in the application of a CBDC. One solution for this problem, could be to use MPC to make the settlements of such a CBDC private. Such a system could also be designed to allow for certain transparency towards a government entity with the sufficient legal justification such as a warrant. The CBDCs settlements would be intransparent to e.g. the national bank or the government, however a court could allow for access to certain transaction data for a judicial institution.

Privacy preserving blockchain voting

In many places across the world, trust in elections is waning: the intransparency of voting systems, combined with distrust fueled by political rhetoric are a major threat to the integrity of democracies today. The recent coup in Bolivia or the storming of the U.S. Capitol have shown that even an unsubstantiated claim of fraud in an election can lead to political violence or even the overturning of a democratically elected government. E-voting, and particularly blockchain-based e-voting solutions, have attempted to solve this issue. They have however run into a variety of problems: intransparency or too much transparency, hardware and/or software vulnerabilities, among many others. Nonetheless, Partisia Blockchain’s MPC technology could help in solving many of these issues. MPC could be used to assure the privacy of a voter’s ballot, while showing votes being tallied for specific candidates in real-time. The election results could be publicly auditable and contestable and voters could be able to track their own votes. This kind of solution could in theory ensure safe, transparent and auditable elections, while keeping people’s votes secret.

Partisia Blockchain Foundation is dedicated to facilitating innovative solutions to real-life problems. Democratic innovation is one of the fields we are proud to contribute to.

Please contact us, if you have any questions about how our technology could enable better governance or if you think your organization could benefit from our technology.

Contact information: build@partisiablockchain.com

Stay updated:

Website • Twitter • Discord • Telegram • LinkedIn • Facebook • Instagram • GitLab • Medium • YouTube

July 2023 update

July 2023 update

July has brought remarkable progress and achievements to Partisia Blockchain! We are thrilled to share the latest developments in our dynamic ecosystem. In July, we unveiled our Grants Program for the second half of 2023, empowering visionary builders in the blockchain space with up to 3 million $MPC tokens. These pioneering teams will have access to cutting-edge technology and infrastructure, unlocking new possibilities in decentralized applications. Our commitment to driving innovation goes beyond financial aid — we empower those who challenge the status quo. Join us as we explore the exciting developments in our ecosystem, reflect on our impactful presence at EthCC, and delve into the tech highlights that pave the way for a more robust and user-friendly Partisia Blockchain.

More builders on Partisia Blockchain wanted

Partisia Blockchain Foundation was thrilled to reveal our Grants Program for the second half of 2023, offering up to 3 million $MPC tokens (valued at US$1.2 million as of today) to pioneering builders in the blockchain space. We are seeking teams determined to create unique solutions that surpass current blockchain limitations. With our support, these projects will have access to cutting-edge technology and infrastructure to bring their groundbreaking ideas to life, addressing challenges previously considered impossible on other chains. Our commitment to driving innovation extends beyond financial aid, as we commit to empower teams that stand out and revolutionize the possibilities of decentralized applications. You can check out our value proposition and read the grant guidelines to apply now!

The Partisia Blockchain team was also thrilled to participate in EthCC conference in Paris in July, where we celebrated collaboration, strengthened partnerships, and reconnected with blockchain friends. Thanks to EthCC for providing a valuable platform for us to showcase our innovative technology, enabling secure collaboration while preserving privacy through advanced Multiparty Computation (MPC). We hope to see more of you next year.

As adoption is one of the main focuses for us, we kicked off a new adoptions team creation with a meeting in Aarhus. All the adoption officers were brought together to align on our strategy and goals for this year. Some of the key areas we agreed to focus on were in metrics, (number of leads from various sources, percentage of conversion, effective marketing campaigns, etc) to understand better where we are doing well and where we need to improve on.

Talking about adoptions, we are also happy to introduce another amazing project that has signed on to build on Partisia Blockchain. Veric is a credential and asset oracle running on Harmony One and they will begin to integrate Partisia Blockchain’s privacy technology to add additional functionality to their application. By adding the privacy layer, they aim to privatize details of their assets that they are looking to use for payment.

We were also honored to participate in this year’s University of Geneva “SDG Summer School”. The focus this year was “Open Source Health Solutions” and students from across the world met during three weeks on the ground and online. We had the pleasure of coaching a group of young minds looking to solve a technological problem for a healthcare company. The innovative solution the students came up with uses MPC and blockchain technologies and could have a positive impact on women’s health.

Unlocking liquidity for unvested tokens

In line with our Ecosystem Focus, we were excited to showcase SecondLane, a groundbreaking project co-founded by key players in the Web3 OTC market. Offering advanced technology and licensing expertise, SecondLane is building on Weezi empowers project teams, advisors, and investors to unlock liquidity for unvested tokens and equity, while also facilitating the discovery and trading of illiquid digital assets. Explore SecondLane’s unique features in our guest blog, and join us for an insightful Q&A discussion with Oleg Ivanov, Co-Founder of Weezi/SecondLane, to gain exclusive insights into the platform.

Roadmap on track

As we reflect on the exciting developments in July, Partisia Blockchain has been busy pushing the boundaries of our technology and infrastructure. Here are some of the key highlights from our roadmap.

  • BYOC token onboarding framework: Our payment mechanism’s unique tokenomics allows us to use tokens from other chains. We have already integrated Ethereum, Polygon USDC, and BNB into our platform, and now, we are bringing the power of onboarding tokens to the community. With the Ethereum BYOC Framework, any community developer can propose the onboarding of an ERC20 or BEP20 token running on their respective chains into the Partisia Blockchain bridge. This democratizes the control of token addition, putting it in the hands of the users.
  • Developer tools for seamless development: We recognize that strong developer support is crucial for blockchain adoption. Therefore, we have been working diligently on frameworks, contracts, and libraries that will help developers create incredible applications on our chain. Among these forthcoming tools are DEX contracts, a CLI interface for smart contract interactions, a test framework, a gas estimation tool, and documentation for interactions with governance contracts. We aim to simplify the development process, encouraging more developers to join our vibrant community.
  • Arithmetic MPC protocol: While our current MPC protocol, “REAL,” excels in binary computations, we are actively working on introducing an arithmetic protocol. This enhancement allows efficient operations on different unit types, enabling a broader range of applications with improved performance. The arithmetic protocol will complement our existing capabilities, opening new avenues for innovation.
  • Research into native bitcoin as BYOC: As we explore solutions to improve interoperability, we are researching ways to allow native Bitcoin to be used as an asset in the Partisia Blockchain. Unlike current wrapped versions that rely on custody, our approach seeks to align with the trustless ethos of public blockchains, making native Bitcoin more secure and versatile for users.
  • Smart contract improvements: Your feedback drives our continuous improvement. Based on developer inputs, we have been working on various enhancements to improve the quality and functionality of our platform. Some of these upcoming features will create new use cases for MPC tokens, enhancing the overall ecosystem.
  • Simplified node operations: We understand the importance of accessibility and user-friendliness. To make node operations more straightforward and efficient, we are implementing a simpler setup and operational process. Our “Staking 2.0” model will streamline node registration, token association, and dissociation, removing barriers and simplifying stake management.

With these exciting developments, we are paving the way for a more robust and user-friendly Partisia Blockchain. As we move forward, our team is eager to reveal more groundbreaking tech updates next month. Thanks again to our community and your continued support!

Stay updated:

Website • Twitter • Discord • Telegram • LinkedIn • Facebook • Instagram • GitLab • Medium • YouTube