16 Aug, 23

Overcoming the Fundamental Limits of Smart Contracts and DAO Governance: Pairwyse Protocol

pairwyse banner
Pairwyse, Beau Chaseling, Finn Judell and Nathan Lenga

Finn Juddell 1, Beau Chaseling 1, Nathan Lenga 1, Akiva Dubrofsky 2, Ashwin Tumne 2, Eugene Fine 3, Misha Kushka 3, Eugeniia Monastyrna 4, Ramil Amerzyanov 4
1 Zerocap Research,  2 Akiva Capital Holdings, Inc,  3 DAOsign, LLC,  4 Consider IT Done Technologies

The rise of smart contracts has sparked a wave of innovation, facilitating the creation of web3 sectors such as Tokenisation, Decentralised Finance (DeFi), and Decentralised Autonomous Organizations (DAOs). However, DAO-based smart contract development is fundamentally centralised as it takes place in isolated off-chain environments under centralised entities, actors, processes, platforms, and actions. This paradox fundamentally undermines a DAO’s primary value of transparent governance, decentralised risk management and fault-tolerant operation.

A significant vulnerability for users of smart contract protocols lies in the complete lack of on-chain controls to prevent the erasure of previously granted rights or scope when DAOs vote to upgrade their protocol. This absence of automatic rights and scope enforcement severely limits the flexibility, instrumentation, and security that DAOs can offer to users that possess increasingly stringent risk-reward appetites.

This report deconstructs the problem from economic, technical, and security perspectives to arrive at a fundamental limit for DAOs and DeFi under current smart contract publication and governance systems.  How this systemic blocker places an upper limit on the DeFi market cap and public blockchain utility is analysed using traditional finance (TradFi) as a comparison point. Finally, a recent breakthrough is described in the form of a purely on-chain smart contract protocol called Pairwyse, enabling fully on-chain DAO governance, rights management, bylaw systems, and general peer-to-peer and DAO-to-DAO smart contracting.  This report concludes by examining the transformative potential of Pairwyse based on smart contract use cases made possible by Pairwyse’s paradigm shift to on-chain manufacturing and governance of DAOs.

off chain and on chain smart contracts

Figure 1.   Off- and On-chain liabilities, risks and costs a DAO must incur due to off-chain governance of smart contracts under current blockchain deployment systems.  Each new tranche, issuance or offering added by a DAO exponentiates costs and liabilities and compounds uncertainty for users.  This is especially true if a DAO is leveraging its creditworthiness (e.g. algorithmic stablecoins, lending, insurance, clearinghouse).  This underlies why most DAO protocols are limited to immutable (inflexible) smart contracts and low-complexity applications relative to TradFi standards.    

Deconstructing the Problem

DAOs are a novel and growing economic organisational model specific to blockchain ecosystems.  They attempt to encapsulate a broad cooperative partnership whose offerings are governed under operating rules specified by its deployed smart contracts.  DAOs attempt to limit assets and liabilities to those held by its smart contracts under the premise of strict enforcement by blockchain immutability, transparency and witness.  A DAO’s smart contracts can additionally provide a virtual back office of treasury, escrow, notarization and registration functions.  These on-chain capabilities enable DAOs to provide economic services to users in a trustless manner without the need for mediation.

However, DAOs face a critical vulnerability– off-chain authorship of smart contracts means scope enforcement of protocol amendments is also driven off-chain.  As soon as DAOs pierce the off-chain veil, their token holders are subject to unlimited liability and trust issues, requiring off-chain centrally-intermediated patches.  As a result, “trustlessness” for a DAO’s economic users is only delivered if decentralised protocols are absolutely immutable, which paradoxically prohibits any risk dynamism DAOs could offer users if their smart contracts possessed some degree of adaptability with rights protection.  

This is a strict consequence of the well-known blockchain trilemma (a.k.a. Zooko’s triangle), manifesting first at the blockchain level, then at the smart contract level, finally resulting in a fractured off-chain / on-chain DAO governance (Figure 2).  Under off-chain smart contract development and governance, applications requiring mutually beneficial risk adaptation cannot be achieved on public blockchains without sacrificing decentralisation.   This is unfortunate because risk adaptable contracts are the bulk of global capital markets.   Therein lies a fundamental upper limit on the economic value of DAOs, rooted in the blockchain trilemma under off-chain smart contract governance.

segregated governance problem

Figure 2.   The segregated governance problem for DAOs manifests as a result of the well-known blockchain trilemma, which is a “rock-paper-scissor” tradeoff that transaction networks must make between decentralisation, security and scalability.  

This segregated governance fracture creates a fundamental asymmetry between a DAO and its users that ultimately leaves both parties in an economic stalemate. While a DAO can impose conditions on protocol users through the governance of its smart contracts, users have no mechanism to enforce any rights granted to them except through off-chain mediation with high uncertainty of any successful recourse for the user.

As a result, when DAOs attempt to tokenize their creditworthiness on-chain to raise growth capital or provide hedging solutions to liquidity providers seeking risk reduction, they encounter a hard limit due to an inability to extend rights and scope protection to liquidity providers on-chain.  DAOs cannot feasibly issue debt, provide insurance, or run a clearinghouse unless they centralise off-chain, thereby defeating their competitive economic advantage.  This represents a fundamental economic limit of blockchains under the current paradigm of off-chain smart contract authorship, compilation, and governance.  This limit places restrictions on the growth potential of DAOs and the adoption of blockchain ecosystems in general.

The Fundamental Economic Limit of DeFi

The risks posed by the lack of on-chain rights and scope enforcement are particularly pronounced for any class of prospective DAO creditors who don’t have sufficient governance influence over the smart contracts they enter into.  This includes stablecoins, term deposits, convertible instruments, hedging products and derivative contracts.  This lack of on-chain rights enforcement leads to multiple off-chain roadblocks to scope enforcement and recourse, thereby eliminating protocol trustlessness (Figure 3).

Figure 3 illustrates how this fundamental limit of DAOs and DeFi protocols manifests itself and limits the facilities DAOs can practically offer on-chain without sacrificing decentralisation. While a DAO can provide a trustless peer-to-peer (P2P) driven smart contract facility like an asset exchange or lending protocol, it faces significant challenges when attempting to capitalise on its creditworthiness to onboard liquidity providers seeking risk hedging.  Smart contracts alone cannot achieve this multipotency when their scope enforcement exists off-chain.

For an on-chain smart contract agreement to bind a DAO and its creditor, a creditor requires on-chain assurances the DAO will not negate or oversubscribe its creditworthiness by upgrading its protocol logic or state with risky scope.  This task is impossible to perform with smart contracts alone when their contents are updated off-chain.  The end result is a prospective creditor without security and a DAO that cannot effectively leverage itself for growth opportunities.

This ecosystem-wide economic stalemate cannot be understated.   The total market cap of DeFi activity in the last 5 years has been limited to less than $100 Billion in total value locked compared to $5 Trillion in TradFi assets transacted daily under a range of risk hedging instruments and facilities.  Left unsolved, blockchain and web3 ecosystems will continue to face adoption, growth, volatility, and trust challenges across the broader economy that they could be servicing if this fundamental problem was solved at a technical level.

pairwyse protocol structure

Figure 3.  Intermediated off-chain binding contracts are the only means for web3 to enter broader markets (e.g. term lending).  Under current smart contract publication systems, web3 companies must operate as Web2 fintechs to address transaction markets held by TradFi.  This is currently a fundamental economic limit of public blockchains.

Overcoming the Fundamental Limit of DeFi

If the fundamental cause of DeFi’s scalability limit is off-chain governance of smart contract creation, peer-review, quality assurance, and deployment, then it implies the solution to this problem lies in migrating the entire smart contract governance and manufacturing process to a purely on-chain model.  With this insight, a newly open-sourced smart contract project called Pairwyse may hold the solution.

Recently published technical documents and solidity source code for the Pairwyse smart contract protocol introduce a novel on-chain smart contract compiler, which itself is a smart contract on a blockchain (see the video).  What sets Pairwyse apart from other web3 frameworks is that the entire composition and manufacture of a turing-complete computationally universal smart contract is performed entirely on-chain (Figure 4).  Moreover, contract authorship is fully peer-to-peer (P2P), meaning multiple web3 users can compose and upgrade the terms & conditions of the same smart contract while its blockchain address remains permanently fixed.

An introductory 2 min video describing Pairwyse Protocol

Under off-chain publication, once a smart contract is deployed on-chain, the smart contract itself does not have the capability to modify its own logic in response to external stimuli or triggers.  The deployed bytecode only represents a fixed immutable instruction set for executing specific computational operations in the ethereum virtual machine (EVM) on blockchain.  As such, the solidity language is considered turing-complete while the smart contracts are not Turing complete.  

This key dichotomy is what enables trustless smart contract applications in that specifications for them are written in a turing complete medium while the blockchain induces program immutability once the smart contract’s bytecode is deployed on-chain.  However, due to the Blockchain trilemma, solidity applications must be written off-chain in order for trustless to be realised on-chain.  As such, there is no trustless mechanism for scope enforcement under off-chain publication.  This, in turn, leads to the economic limit of public blockchains under off-chain publication.

Pairwyse solves this dilemma (trilemma actually) by making the deployed smart contract itself a Turing complete by transforming it into a medium that can simulate a Turing machine like the EVM after it has already been deployed.  This is where Pairwyse’s technical paradigm shift begins.  However, a self-morphing smart contract application alone is not something that can be considered trustless unless it is constrained or filtered by a Turing incomplete medium before being able to instruct the EVM as a Turing machine.  That Turing incomplete medium is constitutional governance encoded by immutable solidity charter code. 

Figure 4.  Illustration of bottom-up tokenization of real-world terms and conditions to pending blockchain executables.  A key enforcement pattern in Pairwyse manufactured smart contracts is signatory validation, followed by conditions validation, followed by transaction validation before final transaction fulfilment.

Source code published on etherscan reveals an intricate on-chain recording, translation, validation, and continuous integration of each proposed smart contract amendment.  A  developer video and workshop tutorial showcase purely on-chain smart contract proposals enacted by a completely on-chain governance vote activation.  The key innovation and breakthrough of this system is that the terms and conditions of one Pairwyse smart contract can enforce the allowable upgrades of terms and conditions in a second Pairwyse smart contract.  This enables on-chain rights enforcement and represents a paradigm shift in how smart contracts can be governed, not just by a single DAO but co-governed between peer groups or entities according to their roles and interests.

The novelty of Pairwise-manufactured smart contracts lies in an internal dual-layer governance architecture enabling smart contracts on existing blockchains to store executable and upgradable Turing computable bylaw programs (Turing bylaws) under strict solidity code governance (Figure 5).  The primary function of the solidity layer is to provide an on-chain constitution or charter permanently dictating how rights are enforced across all rights holders in that smart contract.  In turn, the solidity-coded layer provides a governance foundation for P2P-negotiated, legislated and enacted Turing bylaws which specify the terms and conditions of each peer group’s obligations, allowances and rights in their P2P transactions.  Altogether, the solidity charter and Turing bylaws define the intended on-chain applications of the smart contract for all economic users.

pairwyse platform anatomy

Figure 5.  Pairwyse smart contracts have a unique dual-layer program architecture, enabling end-to-end governance and value chains between economic users and developers.  The dual-layer architecture effectively creates a fixed immutable charter that enforces the governance scope of upgrades.  DAOs have flexibility in the choice of constitutional charter (solidity-coded immutable enforcement), legislative engine (on-chain language compiler), governance policies (on-chain scope validation) and live enactment (continuous bylaw integration).  By selecting a charter that is generalised to rights enforcement across all right holders, DAOs can tokenize their creditworthiness to create structured products and deals that would not be possible under the current paradigm of off-chain smart contract compilation and governance.

What is most compelling is how Pairwyse accomplishes rights enforcement.  Instead of translating an agreement’s terms and conditions into solidity code and then compiling off-chain, terms & conditions are transmitted directly from a user’s web3 account under private key sign-off to the deployed smart contract itself for on-chain processing and composition into executable smart contract functions and variables (Figure 6).  This allows the solidity-coded program layer of the smart contract to validate, and if necessary, restrict enactment of an on-chain compiled Turing program based on constitutionally-enforced scoping policy.  The constitutional charter accordingly specifies the treatments applied to proposed Turing bylaws such as activation of on-chain token holder votes or blocking an invalid upgrade.  This effectively brings the entire smart contract governance process and its enforcement of rights fully on-chain while significantly reducing smart contract coding effort– a win-win for DAOs.

pairwyse agreement clause

Figure 6.  A fully on-chain protocol for P2P smart contract authorship, proposal, validation, consensus and integration based on the composition of Turing bylaws filtered and enforced by solidity charter under P2P governance protocol of similar on-chain construction. This new architecture enables purely on-chain governance across all rights holders, a critical feature for DeFi and web3 scalability.  At a most granular level, Turing bylaws have a direct 1-1 mapping between instruction sets transmitted by a web3 wallet (b) and the intended agreement clause were it to be conveyed in a peer communication or commercial contract (a).  The precise instructional text representing a proposed Turing bylaw is received “as is” by the target smart contract itself (c).  The Pairwyse smart contract compiler (d) is subcontracted to perform the first gate of validation (technical soundness).  The target smart contract may specify other smart contract governance policies as constitutionally mandated.  These policies can include scope enforcement (e) and process validation (f) which can include voting and other forms of right-holder consent (g).  Upon successful multi-step validation, the executable smart contract bylaw can be readily integrated into the live protocol.

A Pairwyse smart contract’s architecture allows a DAO to offer derivative instruments using Turing bylaw enactment. It enables hedge seekers to have on-chain recourse by enabling upgrade- or execution-level scope enforcements on DAO assets staked for risk-hedging, based on predetermined conditions for their activation. This dual governance, one between Turing bylaws and solidity code technically and two between a DAO and its hedge-seekers economically, is what enables DAOs to fully tokenize their creditworthiness on-chain.  Pairwyse achieves this by introducing an additional degree of freedom to smart contracts– by extending Turing completeness from the coding language to the smart contract itself.  This new degree of freedom enables smart contracts to break free of triangular constraints imposed on them by blockchains.

With this crucial on-chain capability unlocked, DeFi infrastructure, such as decentralised equivalents of structured debt, insurance, derivatives and clearinghouses, can be built as alternatives to centrally-secured TradFi equivalents. Consequently, the advent of a technology like Pairwyse may represent an inflection point for DAOs and web3 in bringing the long-heralded promise of blockchains full circle.

DAO 2.0 Unplugged 

The new smart contract paradigm introduced by Pairwyse transcends the notion of a DAO solely possessing smart contract authorship rights while providing creditors scope enforcement rights.  In this fresh paradigm, both general and limited partners in a shared venture can each be considered their own DAOs or autonomous peer groups.  To enable trustless transactions between these distinct peer groups, a shared smart contract is required to bind their peer-to-peer interactions and transactions completely on-chain. This encompasses everything from negotiating and implementing terms to executing and settling transactions between the parties, all performed on the blockchain.

To ensure optimal fault tolerance for all interacting peer groups, an immutable smart contract charter at the blockchain opcode execution level establishes the governance model and working parameters between a DAO and its external stakeholders.  This fixed charter specifies the smart contract’s governance process, including trustless specifications for on-chain governance functionaries such as registrar, notarizer, facilitator, validator, executor, and enforcer.  

The transacting peer groups collectively assume responsibility for the terms and conditions (Turing bylaw programs) of the smart contract under its charter-enforced governance. Based on their respective roles, capacities and governance, each peer group can strive to align their specific economic interests to an on-chain signed agreement under the smart contract’s immutable on-chain governance charter.  This provides the basis of on-chain deals and instruments with no upper limit to agreement complexity (Figure 7).  As such, Pairwyse can provide DAOs with a means of overcoming the blockchain trilemma to address traditional credit markets served by off-chain instrumentation.

pairwyse on-chain contract compiler

Figure 7.  The Pairwyse whitepaper describes unlimited term & condition complexity for completely on-chain agreements between peer groups.  In the example provided, the three peer groups are the issuer, investor and DeFi insurer.  Pairwyse facilitates trustless on-chain agreements through contract-to-contract governance.  This enables placement of agreement terms and conditions not just on the shared smart contract instrument, but also on each peer group’s own on-chain governance and treasury smart contracts if they are also Pairwyse enabled.  This abstraction of an on-chain agreement from its smart contract containers is what facilitates on-chain recourse and rights enforcement in a multi-party agreement.

However, Pairwyse takes smart contracting a step further.  If two DAOs are manufactured on-chain using Pairwyse, the enforcement of agreement terms and conditions can extend from their binding P2P smart contract to each DAO’s respective smart contracts (Figure 9). For example, a creditor may require safeguards on a DAO’s treasury, such as the maintenance of capital ratios. In response, a DAO can propose a term and condition granting the creditor the right to impose restrictions on new on-chain proposals involving asset transfers out of the DAO’s treasury if its capital ratios fall below agreed-upon levels.

This paradigm shifts toward on-chain governance with on-chain mediation and on-chain enforcement unlocks three foundational applications not possible under traditional off-chain smart contract composition and publication systems:

  1. Invoking a DAO and raising capital purely on-chain in a trustless, peer-decentralised manner without relying on a centralised trust or foundation.
  1. Purely on-chain peer-decentralised composition and perfection of trustless constitutionally-enforced on-chain protocols and P2P instruments.
  1. Trustless end-to-end economic transactions conducted purely on-chain between DAOs (D2D) as well as DAOs with other entities (D2E).

Figure 8.  Pairwyse facilitates decentralised sign-off of P2P agreements between two DAOs according to each group’s charter-specified bylaw legislative process.  Under Pairwyse, an on-chain agreement between two peer groups can span multiple smart contracts.  Each agreement bylaw can be made conditional on the satisfaction of other agreement bylaws (blue lines), particularly on the on-chain agreement approval transactions between two DAOs.  With on-chain terms and conditions spanning both DAOs smart contracts, rights enforcement is directly mediated on-chain rather than off-chain under legacy smart contract solutions.

Trustless on-chain peer-decentralised DAO genesis 

Using Pairwyse, a DAO can be manufactured on-chain by a group of peers in a trustless and decentralised manner. This is achieved through a step-wise Byzantine fault-tolerant (BFT) sequence of on-chain contract manufacture and integration actions. BFT refers to a characteristic achieved by a distributed system when it functions in a failsafe manner through peer consensus, even if some system members behave maliciously or fail to fulfil their expected role. For trustless on-chain DAO genesis, BFT means manufacturing a DAO through a particular sequence of peer actions such that its founding peer group or any individual thereof can’t simply “take the money and run” or highjack DAO governance in any other way once the DAO is sufficiently activated for on-chain economic development (Figure 8).

By manufacturing and assembling on-chain DAO charter contracts before implementing economic protocols such as Turing bylaws, the DAO’s security structure and constitution can be publicly validated in real-time. 

The ability to perform open on-chain audits serves to assure standby protocol participants that the DAO’s genesis smart contracts are tamper-proof, even from its founding peers. This inspection effort is significantly reduced when foundational DAO smart contracts are manufactured from pre-audited on-chain product parts. Consequently, any audits of new charter or bylaw scope can focus solely on the incremental addition relative to previously audited compositions.

pairwyse protocol

Figure 9.  Using Pairwyse as an on-chain smart contract manufacturing facility, a group of founding peers can perform a byzantine fault tolerant sequence of actions to assure tamper-proof construction, security and charter of a DAOs genesis smart contracts.  As construction is completely verifiable in real-time from on-chain events, economic users can be assured of a tamperproof implementation of the DAOs founding constitution, which is the set of all solidity charters across all smart contracts under the DAO’s on-chain governance.  Reference: Pairwyse workshop docs

The pivotal event in the DAO’s genesis sequence is when ownership of the DAO governance contract is transferred to itself (step 5). This action permanently closes any backdoor to the DAO’s governance contract, even from the blockchain account that manufactured it. This public event assures potential interactants that the DAO’s governance can only be administered according to a fixed on-chain constitutional protocol.

The second defining on-chain action is the transfer of protocol contracts to exclusive ownership by the DAO governance contract, including the DAO’s treasury contract (step 6).  This second event establishes the limits of the DAO’s assets and liabilities to only those contained in Pairwyse-manufactured smart contracts verifiably owned and controlled by the DAO’s governance smart contract under the DAO’s native token.

Once the adoption requirements for security, charter, and tamper-proof construction are met, the DAO can begin implementing its protocol and associated instruments through the on-chain bylaw proposal system of each smart contract.  It can also raise capital through a variety of on-chain P2P instruments (Figure 9).

Figure 10.   The Pairwyse whitepaper and workshops list a variety of instruments that can be decentrally evoked by a DAO on the same smart contract under its on-chain governance.

As the needs of the DAO and its interactants grow, both peer groups can follow the governance process specified by the DAO’s governance charter to propose on-chain optimizations.  This capability empowers DAOs to establish on-chain enforceable terms and conditions with external parties, while external parties have the means to interact with the DAO’s governance on-chain to enforce their interests through both charter-prescribed rights enforcement and on-chain negotiation using the DAO’s on-chain bylaw proposal system. This sets the stage for the implementation of trustless on-chain instruments and risk controls to facilitate secure (trustless) economic transactions between two or more autonomous peer groups under a binding (enforceable) on-chain agreement.

Trustless DAO protocol implementation with on-chain rights enforcement 

The Pairwyse codebase offers a remarkable level of flexibility for DAOs to create language customizations for smart contract bylaws. DAOs have direct control over the level of expressiveness allowed under their smart contract governance by choosing the appropriate domain-specific language (DSL) model. This enables DAOs to tailor the charter model for specific smart contract functions, such as treasury or governance. For example, a treasury contract’s bylaw language can be restricted to asset management transactions (allowance, transfer, mint, burn), while governance bylaw language can be limited to legislative functions (vote, votersBalance, enableRecord).

This on-chain flexibility grants significant power to DAOs in ensuring comprehensive governance transparency and operation for protocol participants. It allows DAOs to fine-tune the governance scope at the individual bylaw level, optimising the economic benefits for both the organisation and its users. However, it’s important to note that a Pairwyse smart contract’s charter can also restrict the permissible language which can be executed on the contract, serving as the foundation for on-chain rights enforcement.

For instance, consider a DAO built on-chain with Pairwyse-manufactured smart contracts. The DAO can effortlessly establish on-chain deposit and withdrawal facilities on any smart contract with just a few lines of bylaw instructions (Figure 10a). While this bylaw facility mirrors what could be written off-chain using solidity (Figure 10b), a DAO gains greater flexibility when enacted as Turing bylaws. The DAO can adopt a charter allowing it to specify whether an enacted bylaw is non-upgradeable, conditionally upgradeable, or fully upgradeable under on-chain governance, collectively constituting a bespoke terms of service for the smart contract.

Figure 11.  Pairwyse smart contracts enable financial instruments to be created as a DAO or its users require with just a few lines of bylaw instructions.  The equivalent facilities as immutable solidity code involve much more boilerplate instruction with no means to enforce scope restrictions post-deployment.

For most users, non-upgradeable facilities and a mechanism to prevent the DAO from expanding the smart contract’s scope to the detriment of granted rights and their predictability would be expected. In traditional solidity contracts, bytecode immutability has been commonly used to prevent a DAO from prioritising its interests over those of its users.  However, the situation changes when the DAO’s creditworthiness becomes part of the product offering.

Consider a yield-bearing term deposit that users can redeem after a lock-up period (Figure 10c).  Here, user security concerns go beyond the smart contract’s integrity; they also involve the DAO’s ability to fulfil its promise of providing full principal repayment with yield.  To achieve this fully on-chain, users need some measure of economic recourse against a DAO that might oversubscribe itself.

While staking or pledging governance tokens can be an initial straightforward solution based on Oracle data, it may not be sufficient to prevent risky credit behaviour to safeguard against DAO actions like operating a Ponzi scheme.  In this case, users truly need rights enforcement on the credit buffer— that is, preventing a DAO from over-subscribing its reserves while prioritising claims and recourse on staked assets should conditions be breached.  Such scope inhibition could conceivably be placed on either a DAO’s ability to upgrade or execute certain conditional transactions of a smart contract.  For instance, a right holder might seek operational recourse to protect the DAO’s credit buffer, such as restricting a DAO from paying out dividends (token burns) or blocking new token issuances (token transfer or mint) until a satisfactory remedy is proposed, approved by all decentralised peer groups and upgraded (all on-chain).

If a DAO’s governance is sufficiently decentralised, these two recourse actions provided to right holders would serve as a powerful incentive for a DAO to maintain its creditworthiness and actively work towards generating the promised yield. Pairwyse’s smart contract architecture and governance model empower counterparties with the ability to conditionally invoke charter-level restrictions on specific bylaw upgrades, depending on the language model and charter adopted for the smart contract. This provides users with a conditional right to activate restrictions on a DAO’s ability to issue additional debt.

The flexibility of the Pairwyse smart contract architecture and on-chain governance model opens new possibilities for transparent, secure, and community-driven DeFi beyond instrument primitives in the current market (decentralised exchanges, overnight variable rate lending). The ability to customise bylaw language and enforce on-chain rights empowers DAOs to act responsibly and maximise trust with their users, ensuring the truthfulness of both their smart contracts and on-chain decentralised governance.

Trustless DAO-to-DAO and DAO-to-Entity transactions with on-chain recourse

The Pairwyse protocol ultimately sets the stage for the enablement of fully on-chain DAO-to-DAO (D2D) and DAO-to-Entity (D2E) transactions. For example, if two self-contained DAOs wish to execute a deal, they can use Pairwyse to manufacture a special-purpose smart contract (SPC) to mediate the deal’s terms and conditions.

Pairwyse introduces a unique model for decentralised implementation and enforcement of an agreement. Under the protocol, the set of on-chain Turing bylaws representing agreement terms between peer groups need not be contained in a single exclusive smart contract. 

Instead, some of the D2D agreement terms can reside on one DAO’s smart contracts while others reside on the second DAO’s protocol.  Furthermore, the fulfilment of a term on one DAO’s smart contract can be made conditional on the fulfilment of a term on a counterparty DAO’s smart contract.  This creates enforceable yet coordinated terms across each DAO’s treasury contracts.  The remaining agreement terms are invoked in the SPC with a key bylaw, requiring each DAO’s governance sign-off on terms and conditions placed on their respective smart contracts (Figure 12).

This facilitation of trustless D2D/D2E transactions purely on-chain is the secret sauce for Pairwyse-manufactured multiparty structured products. Pairwyse enables DAOs to leverage their economic decentralisation as an alternative to centrally managed loss provision.  The Pairwyse whitepaper and code repo describe on-chain term-by-term agreements between a General Partner (GP) and Limited Partner (LP).  This blueprint can be extended to agreements between multiple transacting peer groups with differing levels of claim priority vs. governance privileges (Figure 13).  

What remains is an effective composition with other DAOs, protocols, and instruments to provide fully on-chain end-to-end asset-liability management (ALM). Towards this, the Pairwyse codebase describes a 

smart contract blueprint and testnet POC for invoking customizable multi-tranche yield-bearing staking instrument.  In the demo, there is a particular Turing bylaw instruction authorising a DAO to transfer all USDC deposits from the DAO to the Compound DeFi protocol as a yield-bearing liquidity deposit.

Figure 12.   The Pairwyse whitepaper describes flexibility in capital stack and liquidity integrations all through domain-specific language-based bylaw enactments.

As Compound smart contracts are based on an immutable bearer ERC20 standard, liquidity providers can be assured of retrieving their deposits anytime so long as peer-decentralised liquidity in Compound’s USDC pool remains sufficient for withdrawal transactions.  What is remarkable is that on-demand transactions by a DAO smart contract with an external DeFi protocol can be composed, approved and executed entirely on-chain using only Turing bylaws— this means on-demand DeFi integrations with no off-chain smart contract deployment needed.

Figure 13.  Custom opcodes are possible for Pairwyse smart contract composition with existing DeFi protocols, in this case, the Compound protocol.   By creating custom compositions with existing DEXs, Liquidity Pools and Lending protocols, Pairwyse derivative contracts can be composed over these facilities to generate new uses.  For example, DEXs can be used to automate collateral liquidation as risk conditions dictate.  Likewise, Pairwyse P2P term loan smart contracts can use overnight lending protocols as insurance facilities in the event of borrower default, provided the protocol accepts the collateral assets.

In the case of compound deposit bylaw instruction,  the term compound instructs the Pairwyse protocol to access a sub-branch of language instructions and opcodes specific to the transacting with the Compound lending protocol (Figure 14).  As such, DeFi protocols seeking transaction flow can provide counterparties with a simple bylaw language facilitating on-chain / on-demand contract-to-contract composition as an alternative to using application binary interfaces (ABIs) or custodial / multi-signature wallets for portfolio management.

Based on the Pairwyse whitepaper, the project envisions a decentralised marketplace of DeFi protocols and web3 solutions.  Building on the Compound integration example, this decentralised marketplace could be implemented as an instructional markup language used by the Pairwyse protocol during bylaw manufacture. As such, bylaw sub-languages in Pairwyse can play the role of purchase and redemption orders between web3 projects. This can provide a basis for many types of integrations between two DAOs, from service agreements to venture agreements to merger agreements. Under Pairwyse, such D2D transactions could be made as commonplace as they are between TradFi entities.

Figure 14.  The Pairwyse whitepaper describes a general roadmap to develop Pairwyse as a decentralised utility, marketplace and ecosystem for fully on-chain DAOs and entity subsidiaries.

An even bigger Disruption ahead?

One would be forgiven if one thought the Pairwyse paradigm shift ends here.  A closer look at the ALICE and BOB asset exchange demo video in the Pairwyse whitepaper reveals a potentially larger disruption on the horizon around the acceptance of a smart contract as a valid and enforceable agreement between parties.  Imagine if ALICE and BOB are two distinct DAOs with equal governance rights in a Pairwyse smart contract.   Each term & condition can only be enacted if one party proposes a Turing bylaw and the other party approves its enactment.   In this case, the Pairwyse smart contract is facilitating an on-chain P2P negotiation of agreement terms and conditions, thereby showcasing an intent to enter a binding agreement.

If it so happens that one party is responsible for proposing all the Turing bylaws with activation of its terms dependent on the counterparty’s on-chain approval, then the first DAO can potentially be interpreted as presenting an offer to the second DAO for their collective review and acceptance by on-chain token vote.  If accepted, the smart contract agreement terms become executable by both parties according to their agreed-to rights and obligations.  If the bylaws specify a posting of assets by the counterparty in return for something of acceptable value from the offerer, this could be interpreted as evidence of consideration between the two parties.

Figure 15.  The ALICE and BOB exchange demo highlights illustrate how elements of intent, offer, acceptance and consideration can be implemented on-chain in a transparent and interpretable P2P-governed manner using Pairwyse.  

What remains are additional criteria of capacity, severability, certainty and legality for the smart contract to contain at least the minimal essential elements of a valid agreement as typically defined by case law. Certainty is provided by blockchain execution of the smart contract, severability is facilitated through bylaw upgradability under governance, and capacity can be established through zero-knowledge proof or other oracle-based method.

The remaining validity hurdle is legality.  Legality is often based on the agreement’s context and its alignment with applicable statutory and case law.  General alignments may include commercial contracting conventions (e.g. uniform commercial code), proof-of-authorization requirements (e.g. uniform electronic transaction act) or counterparty due diligence (e.g. zero knowledge proofs of capacity).  Accordingly, most transacting parties typically require severability clauses and contract upgrade mechanisms thereof as shifts in conflict of laws dictate.  Under Pairwyse, on-chain severability and clause survivorship is facilitated by bylaw upgradability under the on-chain consent of the transacting peer groups.

Even if agreement validity was evidenced, enforceability is the critical follow-up question. This is where on-chain rights enforcement capabilities of Pairwyse smart contracts can play a critical role, not necessarily to instantly sever, liquidate or terminate an active agreement or position, but to enable a right holder to place an effective pause and recourse upon breached conditions such that the DAO’s best move is on-chain re-negotiation of terms or actions to the satisfaction of both parties.

We leave to the reader’s own interpretation (and counsel) whether ALICE and BOB are engaged in a valid and enforceable agreement. However, Pairwyse smart contract upgradeability under constitutional governance appears to facilitate both. Should a dispute or pending enforcement action arise among the parties, there is nothing prohibiting them from seeking independent adjudication, on- or off-chain, should both parties consent.  WIth Pairwyse, the counterparties can invoke a third smart contract governance user for an independent adjudicator (centralised or decentralised).  The adjudicator can be given a one-time enforcement mandate to make an on-chain proposal (mediation) and/or upgrade (arbitration) to resolve a smart contract dispute between parties.

It remains to be seen whether sovereign courts would ever accept such on-chain adjudication instruments or on-chain agreement validity proofs potentially enabled by Pairwyse.  However, the Pairwyse protocol could help propel ecosystem-driven projects around decentralised bankruptcy adjudication for resolving insolvency disputes and transparent decentralised rating protocols to incentivize risk management by DAOs and entities entering (or seeking) on-chain deals.

Concluding Remarks 

A previously overlooked restriction of DAOs during boom days has become glaringly obvious in the current market.  This highlights a significant and inherent challenge within the core concept of decentralised human coordination through blockchain technology. The predicament lies in the fact that, despite being promoted as decentralised, DAOs are fundamentally centralised due to the restrictions imposed by existing blockchains and legacy smart contract publication and deployment systems. The primary centralisation risk comes from the fact that any amendment or upgrade to a smart contract design requires the input of centralised intermediaries off-chain to physically alter the underlying code of the smart contract.

Pairwyse introduces a new paradigm of DAO creation and management; DAO 2.0 – offering a novel mechanism for fully decentralised DAO creation and maintenance through the use of rights management, bylaw systems and general peer-to-peer/DAO-to-DAO smart contracting. This is made possible by the use of an on-chain domain-specific language (DSL) which sets a series of predetermined functions that the smart contract is able to run as a set of bylaw agreements under an on-chain blockchain-enforced constitution. Under Pairwyse, DAOs can propose new bylaws and upon a contributor and/or right holder vote taking place, the amendments can be trustlessly integrated into the protocol with zero centralised intermediary involvement. 

As a result, Pairwyse enables smart contracts to break past their fundamental limitations, allowing smart contracts to act in a way that was fundamentally impossible without the use of DAO 2.0 mechanics. For example, Pairwyse agreements can be used to bind a DAO and its creditor, which enables an on-chain assurance that the DAO will not negate its creditworthiness by upgrading its protocol logic or state with risky scope.  Pairwyse’s potential to facilitate on-chain negotiation, dispute resolution, and even legally enforceable agreements, introduces compelling new possibilities within the DAO ecosystem. 

For further readings on this and related research topics, please explore the reference links below.  We invite you to share your own comments, insights and feedback. The paper was written in consultation with the Pairwise Foundation. Zerocap is not a customer, shareholder or stakeholder in the Pairwyse Protocol.

Pairwyse 

DAOs

Contract Law

About Zerocap

Zerocap provides digital asset liquidity and custodial services to forward-thinking investors and institutions globally. For frictionless access to digital assets with industry-leading security, contact our team at [email protected] or visit our website www.zerocap.com

FAQs

What is the centralization paradox in DAO-based smart contract development?

The centralization paradox refers to the fact that DAO-based smart contract development is fundamentally centralized as it occurs in isolated off-chain environments under centralized entities, actors, processes, platforms, and actions. This undermines the primary value of transparent governance, decentralized risk management, and fault-tolerant operation in DAOs.

What is Pairwyse, and how does it aim to overcome the limitations of current smart contract protocols?

Pairwyse is a purely on-chain smart contract protocol that enables fully on-chain DAO governance, rights management, bylaw systems, and general peer-to-peer and DAO-to-DAO smart contracting. It introduces a novel on-chain smart contract compiler, allowing the entire composition and manufacture of a Turing-complete smart contract to be performed entirely on-chain. This enables on-chain rights enforcement and represents a paradigm shift in smart contract use cases.

What are the foundational applications that Pairwyse unlocks, which were not possible under traditional off-chain smart contract systems?

Pairwyse unlocks three foundational applications: (1) Invoking a DAO and raising capital purely on-chain in a trustless, peer-decentralized manner without relying on a centralized trust or foundation; (2) Purely on-chain peer-decentralized composition and perfection of trustless constitutionally-enforced on-chain protocols and P2P instruments; (3) Trustless end-to-end economic transactions conducted purely on-chain between DAOs (D2D) as well as DAOs with other entities (D2E).

How does Pairwyse address the issue of on-chain rights and scope enforcement, and why is this significant?

Pairwyse addresses the issue of on-chain rights and scope enforcement by allowing the entire smart contract governance and manufacturing process to be migrated to a purely on-chain model. This ensures that the terms and conditions of the smart contract can enforce allowable upgrades and rights, enabling on-chain rights enforcement. This is significant as it eliminates off-chain roadblocks to scope enforcement and recourse, thereby enhancing trust and scalability in DeFi and web3 ecosystems.

What is the concept of DAO 2.0 as introduced by Pairwyse, and how does it differ from traditional DAOs?

DAO 2.0, as introduced by Pairwyse, transcends the traditional notion of DAOs by enabling both general and limited partners in a shared venture to be considered their own DAOs or autonomous peer groups. It allows trustless transactions between distinct peer groups, encompassing everything from negotiating and implementing terms to executing and settling transactions on the blockchain. This paradigm shift enables on-chain governance with on-chain mediation and enforcement, allowing more complex agreements and overcoming the blockchain trilemma, unlike traditional DAOs.

DISCLAIMER

Zerocap Pty Ltd carries out regulated and unregulated activities.

Spot crypto-asset services and products offered by Zerocap are not regulated by ASIC. Zerocap Pty Ltd is registered with AUSTRAC as a DCE (digital currency exchange) service provider (DCE100635539-001).

Regulated services and products include structured products (derivatives) and funds (managed investment schemes) are available to Wholesale Clients only as per Sections 761GA and 708(10) of the Corporations Act 2001 (Cth) (Sophisticated/Wholesale Client). To serve these products, Zerocap Pty Ltd is a Corporate Authorised Representative (CAR: 001289130) of AFSL 340799

All material in this website is intended for illustrative purposes and general information only. It does not constitute financial advice nor does it take into account your investment objectives, financial situation or particular needs. You should consider the information in light of your objectives, financial situation and needs before making any decision about whether to acquire or dispose of any digital asset. Investments in digital assets can be risky and you may lose your investment. Past performance is no indication of future performance.

Beau and Nathan’s page

Pairwyse

Like this article? Share
Latest Insights

16 Aug, 23

What are Liquidity Providers in Crypto

In the rapidly evolving world of cryptocurrencies, liquidity is a fundamental component that ensures the seamless exchange of digital assets. Liquidity providers (LPs) play a

Weekly Crypto Market Wrap: 16th December 2024

Zerocap is a market-leading digital asset firm, providing trading, liquidity and custody to forward-thinking institutions and investors globally. To learn more, contact the team at

Weekly Crypto Market Wrap: 9th December 2024

Zerocap is a market-leading digital asset firm, providing trading, liquidity and custody to forward-thinking institutions and investors globally. To learn more, contact the team at

Receive Our Insights

Subscribe to receive our publications in newsletter format — the best way to stay informed about crypto asset market trends and topics.

Want to see how bitcoin and other digital assets fit into your portfolio?

Contact Us
Ready to sign up?
Create an Account