Leasehold — Current and future tech

Jonathan Gros-Dubois
10 min readMay 8, 2020

Current tech

Overview

Several parts of the Leasehold tech stack are derived from Lisk SDK, therefore, some parts can be used across both the Lisk or Leasehold blockchains. The Leasehold blockchain is separate from Lisk but its network is designed to partially overlap that of Lisk in order to support automatic market and sidechain discovery and to facilitate decentralized trading between the two blockchains.

Leasehold can be thought of as a sidechain of Lisk; the relationship has some similarities to the relationship between ERC-20 tokens and the Ethereum blockchain but instead of being immutably hardcoded into the parent blockchain as a smart contract, the relationship between Lisk and Leasehold is determined at an infrastructure level and reinforced only by network effects (e.g. popularity and trade volume of various DEX markets). Unlike the current ERC-20 ecosystem, this allows the Lisk ecosystem to scale without limit because different sidechains act as independent shards of the same network — One in which the relative relative price of each sidechain is allowed to fluctuate through DEXs.

Lisk was chosen in a large part because its Delegated Proof of Stake (DPoS) mechanism makes it cheap for people and businesses to operate nodes and unlike Proof of Work (PoW), it doesn’t consume much electricity. Also, Lisk’s short 10-second block time and support for multisignature wallets make it an ideal foundation upon which to create an open source DEX ecosystem of the scale that we’re aiming for.

To support trading between any two tokens, DEX nodes for that market must sync with both blockchains (this allows them to verify all transactions and blocks themselves in a trustless manner); the Leasehold stack is optimized for this use case as it supports syncing with multiple blockchains in a scalable way by leveraging modern multi-core CPUs.
The strength and nature of the relationship between two tokens (I.e. mainchain/sidechain) can be determined by the number of DEX nodes which maintain a copy of both blockchains (I.e. which have installed modules for both blockchains) and the total trade volume across all of these DEXs.

Note that just like Lisk, all of the Leasehold technology is open source.
The following components are distributed under either MIT, Apache 2 or GPL open source licenses:

Leasehold Core: https://github.com/Leasehold/leasehold-core

This project allows anyone to run a node as part of Leasehold’s Delegated Proof of Stake (DPoS) blockchain to help verify transactions and forge blocks.

The key technology behind the leasehold-core project is a multi-process framework called LDEM which allows leasehold-core nodes to be extended with additional custom ‘sidechains’ as well as DEX functionality.

Any group of people can get together and turn their existing leasehold-core nodes into a DEX; they just need to install one additional module called lisk-dex; this module was initially written for Lisk and has since been optimized for leasehold-core (it supports both Lisk and Leasehold chains as well as other custom sidechains derived from them).

LDEM: https://github.com/jondubois/ldem

This multi-process framework is the foundation of leasehold-core; it is optimized for operating nodes which can support an arbitrary number of blockchains and DEX markets (in addition to the Lisk and Leasehold blockchains). Some features provided by LDEM include:

  • Process isolation — Different blockchains and DEX markets can be setup as modules which are launched in separate processes so that they don’t slow each other down when executed on modern multi-core CPUs.
  • Configuration and module templating — A single module (for example a blockchain or DEX module) can be reused to operate multiple distinct blockchains or DEX markets; this allows custom blockchains and custom DEX markets to be quickly and easily created from the same source code but using different settings/parameters. Only config file changes are necessary to create new blockchains and new DEX markets on existing leasehold-core nodes.
Config for LSH/LSK market
Config for CLSK/LSK market; Note that it reuses the same lisk-dex module as the LSH/LSK market above
  • Decentralized update mechanism — Blockchain updates are normally challenging to perform because they require a great deal of coordination between participants to avoid forks. LDEM’s decentralized update scheduling mechanism allows network participants to schedule future module updates in advance using simple update definition files; this ensures that all participating nodes will be updated at the same time without node operators having to be physically present to supervise their nodes at the time of the update.

For more info about LDEM, see the February edition of “Jon’s Lisk Update”: https://medium.com/@jonathangrosdubois/jons-lisk-update-february-2020-37f6b10d077d

Here is a list of some modules which can be installed on any regular leasehold-core node to extend its functionality:

Leasehold Chain: https://github.com/Leasehold/leasehold-chain

The leasehold-chain module is a fork of the lisk-chain module created by LiskHQ. Unlike lisk-chain, it is optimized to run as an independent process; this is key to achieving scalability as it allows different custom chain modules to run in parallel on multiple CPU cores on a single host.

It would not be a good idea for a node to run every available blockchain or DEX module, but it’s important for the DEX ecosystem that node operators are able to efficiently run several of them on a single host.

The leasehold-chain module encapsulates the core cryptographic and transaction processing functionality of the Lisk DPoS ledger and shares the same cryptography and address system.

Leasehold Blockchain as seen from Leasehold Explorer

Leasehold Net: https://github.com/Leasehold/leasehold-net

The leasehold-net module represents the network P2P layer of Leasehold — it is a fork of the lisk-network module which Jonathan (Jong) Gros-Dubois had been working on while working at LiskHQ (where he was P2P team lead).

The main difference between leasehold-net and the lisk-network module is that leasehold-net supports a feature called lisk-interchain by default.
The lisk-interchain feature is compatible with the Lisk protocol and it affects peer connection management and message routing between peers so that messages pertaining to a specific blockchain only reach nodes which are actively interested in that blockchain — This enables nodes to participate in multiple (Lisk or Leasehold-based) blockchains while sharing some of the underlying network infrastructure in a scalable way.

Nodes which participate in the same blockchains are more likely to be peers of each other. The more similar two nodes are (in terms of what modules they have in common), the more likely they are to be connected to each other as peers (since they have more overlapping interests).

Lisk DEX: https://github.com/jondubois/lisk-dex

The lisk-dex module was started by Jong to support decentralized trading between Lisk, Leasehold and other derived blockchains — It relies on a mechanism called ‘Federated 2-way peg’ which uses a pair of multisignature wallets across two different chains to act as a gateway for matching orders and executing trades across those two chains in a decentralized (federated) way. Some of the features supported by lisk-dex include:

  • Decentralized cross-chain trading with support for both Limit and Market orders.
  • DEX members can collect dividends for themselves by validating and signing cross-chain trades; this dividend/profit is derived from DEX trading fees.
  • Since it is open source, any group of people can get together and start a DEX market for any custom or existing blockchain.
  • Total on-chain transparency; all orders are visible on-chain in an immutable way; this total transparency allows any group of people to launch their own own token and also self-list their token against any existing blockchain in the ecosystem using their own DEX.
  • Since the full trading history is visible on-chain, the relative market price of two tokens can be calculated in a trustless way simply by looking at matching transactions across the two chains (that is how the lisk-dex-ui application renders its recent price chart); this creates a deterministic and immutable price history on the two blockchains.
  • Each trade is wallet-to-wallet; this means that users get to keep custody of their tokens until the point when they actually send an order transaction to the relevant DEX multisig wallet. A DEX can reuse a single multisig address for multiple markets or have a separate multisig address for each market.
  • After an order is placed on-chain (and strictly while the position is open), the tokens contained therein are in the custody of the relevant DEX federation (whose memberships and past performance can be easily verified on-chain by any network participant). Members of the DEX federation must always maintain majority consensus when signing trades and deducting fees; outliers will not receive any dividends; this consensus requirement, coupled with total on-chain transparency creates a strong incentive for each member to follow the same set of rules which match those that are promoted publicly. DEX trades are fully traceable across different chains.
  • No single DEX node/member in the federation is responsible for executing any trade; each node’s job is merely to sign-off on trades which that node deems to be valid; trades will only materialize once (and if) enough signatures have been collected.

More info about Lisk DEX can be found here:

Note that some minor technical details mentioned in these articles may have changed over the past few months but the fundamentals haven’t changed.

Lisk DEX UI: https://github.com/Leasehold/lisk-dex-ui

The lisk-dex-ui module was started by Lisk community member Jackson (Jax) Roberts and later picked up and further developed by Jong and more recently Sachin Shinde.

It’s a front-end application which can be run either as a desktop app or a browser-based web application. It allows users to place trades on any DEX which adheres to the Lisk DEX protocol: https://github.com/jondubois/lisk-dex#dex-protocol

The lisk-dex-ui front end is designed to minimize the amount of friction involved in participating in DEX markets. Anyone who owns any existing cryptocurrency will be able to convert it to Lisk (LSK) and then use that LSK to buy any sidechain token which is either directly or indirectly linked to it.

It is recommended for users to run the application on their own computer for maximum security but for more casual users, we will provide a web hosted UI.

It’s very low friction because no signup is required. The user can generate a wallet for any (Lisk-based) sidechain directly from the UI:

Lisk DEX UI never transmits passphrases over the network. Transactions/orders are always signed directly on the user’s machine and only the user knows their wallet passphrases. This same passphrase can be later used in Lisk Desktop or Leasehold Hub (wallet applications) to send tokens to other users on the same blockchain.

Leasehold Hub

leasehold-hub is the Leasehold wallet application which can be run on the user’s computer or as a web application. It allows users to send LSH tokens to other accounts on the same blockchain.

Leasehold Explorer

leasehold-explorer is an application which allows users to easily browse the Leasehold blockchain in more detail than what is offered by leasehold-hub.

Future tech

Overview

Leasehold’s vision for its DEX ecosystem is to enable multiple blockchains to connect to each other and form a hierarchy wherein different tokens can be easily exchanged between each other via DEXs. According to this model, the most valuable cryptocurrencies would be at or near the top of the hierarchy and are likely to have the highest market cap as well as highest transaction fees.

The high transaction fees on the top level chains combined with high levels of competition to secure top rankings on the lisk-dex-ui application should create incentives for such a hierarchy to form naturally.

It’s impossible to predict exactly how different blockchains will be connected to each other but Leasehold is betting that blockchains are going to be grouped by economic sectors. Leasehold therefore wants to secure a spot for itself as the basechain for the world’s real estate and also help the ecosystem grow in an organized and competitive way.

For more info, see https://medium.com/@jonathangrosdubois/lisk-dex-faqs-f5f81c49b99e

Leasehold Core

  • Gather feedback from the community to decide what additional features to implement.

Leasehold Chain

  • Improvements to increase the transactions per second (TPS) and simplify the logic. May use or adapt certain features from the upstream lisk-chain module (especially new address system and APIs) but the two modules are likely to diverge in various ways.

Lisk DEX

  • Add support for more HTTP endpoints for front end applications to use.
  • Gather feedback from the community to decide what additional features to implement.

Lisk DEX UI

  • Add support for crawling the base blockchain (basechain) network to discover new sidechain markets that are connected to the current blockchain via a compatible DEX. Automatically rank markets based on trade volumes and market cap (e.g. updated daily without relying any centralized points of trust).
  • Allow the user to easily switch the current basechain to allow them to easily navigate through the hierarchy of available sidechains and sub-sidechains; it would be similar to the way in which file systems work; opening a folder shows the user other folders which are more deeply nested in the hierarchy.
  • Add support for other blockchains which are not derived from Lisk or Leasehold chain but which support similar features.

General Purpose Wallet Client

  • There should be a generic blockchain wallet application which can be used to transfer tokens on any compatible blockchain (not just Lisk or Leasehold). This wallet application could be useful for smaller projects which do not have the resources or interest to create or customize their own wallet application.

Decentralized Fiat Gateway

  • Implement open source solutions to bring fiat into our new Lisk/Leasehold and custom DEX/sidechain ecosystem. It does not necessarily have to be completely trustless (that may be impossible given how banks and fiat payment gateways operate), but must be decentralized. A solution could be built on top of https://crypticle.io/

Better ways to gather real estate data

  • Leasehold needs access to the maximum amount of high quality data in order to make effective real estate purchasing decisions and to manage its properties in an optimal way. Initially we will use the APIs of centralized services but in the long term, it could make sense to partner with decentralized oracle services to ensure that we can get the most accurate data in a temper-proof way.

--

--