Research Pulse Issue #19 06/28/21

  1. DC-PoET: Proof-of-Elapsed-Time Consensus with Distributed Coordination for Blockchain Networks
    Authors: Amitangshu Pal and Krishna Kant

Blockchain technology has gained a significant amount of interest in recent years due to its decentralized control, immutability, transparency and robustness. In this paper we propose an enhancement to BlockChain built using proof-ofelapsed-time (PoET) consensus protocol to further increase its efficiency and transaction throughput. The proposed scheme, called DC-PoET, exploits distributed coordination (DC) among the nodes to avoid unnecessary transmission of conflicting blocks inspired by a similar mechanism in WiFi networks. We show that DC-PoET can support around 465 transactions per seconds with 30 MB block size, and even higher for larger blocks. We have also developed detailed analytical modeling for the performance of DC-PoET scheme using a two-dimensional Markov Chain, along with the validation of such modeling using Matlab simulations. The security analysis of our proposed scheme is also discussed.


  1. IPFS-FAN: A Function-Addressable Computation Network
    Authors: Alfonso de la Rocha, Yiannis Psaras, and David Dias

Permissionless computation is one of the missing pieces in the web3 stack in order to have all the tools needed to “decentralise Internet services”. There are already proposals to embed computation in decentralised networks like smart contracts, or blockchain networks for computational offloading. Although technically sound, their computational model is too restrictive to be used for general purpose computation. In this paper, we propose a general architecture of a decentralised network for general-purpose and permissionless computation based on content-addressing. We present a proof-of-concept prototype and describe in detail its building blocks.


  1. Improving security for users of decentralized exchanges through multiparty computation
    Authors: Robert Annessi and Ethan Fast

Decentralized cryptocurrency exchanges offer compelling security benefits over centralized exchanges: users control their funds and avoid the risk of an exchange hack or maliciou s operator. However, because user assets are fully accessible by a secret key, decentralized exchanges pose significant internal security risks for trading firms and automated trading systems, where a compromised system can result in total loss of funds. Centralized exchanges mitigate this risk through API key based security policies that allow professional users to give individual traders or automated systems specific and customizable access rights such as trading or withdrawal limits. Such policies, however, are not compatible with decentralized exchanges, where all exchange operations require a signature generated by th e owner’s secret key. This paper introduces a protocol based upon multiparty computation that allows for the creation of API keys and security policies that can be applied to any existing decentralized exchange. Our protocol works with both ECDSA and EdDSA signature schemes and prioritizes efficient computation and communication. We have deployed this protocol on Nash exchange, as well as around several Ethereum-based automated market maker smart contracts, where it secures th e trading accounts and wallets of thousands of users.


  1. DIV: Resolving the Dynamic Issues of Zero-knowledge Set Membership Proof in the Blockchain
    Authors: Zihuan Xu and Lei Chen

Zero-knowledge set membership (ZKSM) proof is widely used in blockchain to enable private membership attestation. However, existing mechanisms do not fully consider dynamic issues in the blockchain scenario. Particularly, frequent addition/removal of set elements, not only brings the significant cost to keep public parameters up to date to provers and verifiers but also affects mechanism efficiency (e.g., generation time of the proof and verification, etc.).
In this paper, we propose DIV to shard elements on the blockchain into independent subsets with the same cardinality to reduce the effect of dynamic issues. However, due to the diverse proof frequency, an improper element-set assignment can result in frequently used elements being easily inferred and corrupted. Thus, we formalize the assignment problem under both element addition and removal cases as two optimization problems and prove their NP-hardness. For each problem, we consider two cases if each element proof frequency is known in advance by the set maintainer or not, and propose solutions with theoretical guarantees. We implement DIV on both Merkle tree and RSA-based ZKSM mechanisms to evaluate its efficiency and effectiveness and apply DIV on a ZKSM-based application named zkSync to demonstrate its applicability. Results show that DIV can achieveO(1) time/space cost on ZKSM under dynamic situations while protecting the information about frequently used elements. It also notably reduces the system latency of zkSync.


  1. Blockchain Oracle Design Patterns
    Author: Amirmohammad Pasdar, Zhongli Dong, and Young Choon Lee

Blockchain is a form of distributed ledger technology (DLT) where data is shared among users connected over the internet. Transactions are data state changes on the blockchain that are permanently recorded in a secure and transparent way without the need of a third party. Besides, the introduction of smart contracts to the blockchain has added programmability to the blockchain and revolutionized the software ecosystem leading toward decentralized applications (DApps) attracting businesses and organizations to employ this technology. Although promising, blockchains and smart contracts have no access to the external systems (i.e., off-chain) where real-world data and events resides; consequently, the usability of smart contracts in terms of performance and programmability would be limited to the onchain data. Hence, blockchain oracles are introduced to mitigate the issue and are defined as trusted third-party services that send and verify the external information (i.e., feedback) and submit it to smart contracts for triggering state changes in the blockchain. In this paper, we will study and analyze blockchain oracles with regard to how they provide feedback to the blockchain and smart contracts. We classify the blockchain oracle techniques into two major groups such as voting-based strategies and reputation based ones. The former mainly relies on participants’ stakes for outcome finalization while the latter considers reputation in conjunction with authenticity proof mechanisms for data correctness and integrity. We then provide a structured description of patterns in detail for each classification and discuss research directions in the end.


  1. VPN-Zero: A Privacy-Preserving Decentralized Virtual Private Network
    Authors: Matteo Varvello, Inigo Querejeta Azurmendi, Antonio Nappa, Panagiotis Papadopoulos, Goncalo Pestana, and Benjamin Livshits

Distributed Virtual Private Networks (dVPNs) are new solutions aiming to solve the trust-privacy concern of a VPN’s central authority by leveraging a distributed architecture. In this paper, we discuss the requirements of a successful dVPN system and we present VPN-Zero: a dVPN system with strong privacy guarantees that provides traffic accounting and has minimal performance impact on its users.
VPN-Zero guarantees that a dVPN node only carries traffic it has “allowlisted”, without revealing its allowlist or knowing the traffic it tunnels. This is achieved via three main innovations: (a) an attestation mechanism which leverages TLS to certify a user visit to a specific domain, (b) a zero-knowledge proof to certify that some incoming traffic is authorized (e.g., falls in a node’s allowlist, without disclosing the target domain), and (c) a dynamic chain of VPN tunnels to both increase privacy and guarantee service continuation while traffic certification is in place. The paper demonstrates VPN-Zero functioning when integrated with two production systems: BitTorrent’s Distributed Hash Table and ProtonVPN. Early evaluation results show that the median setup time of VPN-Zero is about 10 seconds.


  1. An Analysis of Transaction Handling in Bitcoin
    Authors: Befekadu G. Gebraselase, Bjarne E. Helvik, and Yuming Jiang

Bitcoin has become the leading cryptocurrency system, but the limit on its transaction processing capacity has resulted in increased transaction fee and delayed transaction confirmation. As such, it is pertinent to understand and probably predict how transactions are handled by Bitcoin such that a user may adapt the transaction requests and a miner may adjust the block generation strategy and/or the mining pool to join. To this aim, the present paper introduces results from an analysis of transaction handling in Bitcoin.
Specifically, the analysis consists of two-part. The first part is an exploratory data analysis revealing key characteristics in Bitcoin transaction handling. The second part is a predictability analysis intended to provide insights on transaction handling such as (i) transaction confirmation time, (ii) block attributes, and (iii) who has created the block. The result shows that some models do reasonably well for (ii), but surprisingly not for (i) or (iii).


  1. IBATCH: Saving Ethereum Fees via Secure and Cost-Effective Batching of Smart-Contract Invocations
    Authors: Yibo Wang, Qi Zhang, Kai Li, Yuzhe Tang, Jiaqi Chen, Xiapu Luo, and Ting Chen

This paper presents IBATCH, a middleware system running on top of an operational Ethereum network to enable secure batching of smart-contract invocations against an untrusted relay server offchain. IBATCH does so at a low overhead by validating the server’s batched invocations in smart contracts without additional states. The IBATCH mechanism supports a variety of policies, ranging from conservative to aggressive batching, and can be configured adaptively to the current workloads. IBATCH automatically rewrites smart contracts to integrate with legacy applications and support large-scale deployment.
We built an evaluation platform for fast and cost-accurate transaction replaying and constructed real transaction benchmarks on popular Ethereum applications. With a functional prototype of IBATCH, we conduct extensive cost evaluations, which shows IBATCH saves 14.6% ∟ 59.1% Gas cost per invocation with a moderate 2-minute delay and 19.06% ∟ 31.52% Ether cost per invocation with a delay of 0.26 ∟ 1.66 blocks.


  1. ÐArcher: Detecting On-Chain-Off-Chain Synchronization Bugs in Decentralized Applications
    Authors: Wuqi Zhang, Lili Wei, Shuqing Li, Yepang Liu, and Shing-Chi Cheung

Since the emergence of Ethereum, blockchain-based decentralized applications (DApps) have become increasingly popular and important. To balance the security, performance, and costs, a DApp typically consists of two layers: an on-chain layer to execute transactions and store crucial data on the blockchain and an off-chain layer to interact with users. A DApp needs to synchronize its offchain layer with the on-chain layer proactively. Otherwise, the inconsistent data in the off-chain layer could mislead users and cause undesirable consequences, e.g., loss of transaction fees. However, transactions sent to the blockchain are not guaranteed to be executed and could even be reversed after execution due to chain reorganization. Such non-determinism in the transaction execution is unique to blockchain. DApp developers may fail to perform the on-chain-off-chain synchronization accurately due to their lack of familiarity with the complex transaction lifecycle.
In this work, we investigate the challenges of synchronizing on-chain and off-chain data in Ethereum-based DApps. We present two types of bugs that could result in inconsistencies between the on-chain and off-chain layers. To help detect such on-chain-off-chain synchronization bugs, we introduce a state transition model to guide the testing of DApps and propose two effective oracles to facilitate the automatic identification of bugs. We build the first testing framework, ÐArcher, to detect on-chain-off-chain synchronization bugs in DApps. We have evaluated ÐArcher on 11 popular real-world DApps. ÐArcher achieves high precision (99.3%), recall (87.6%), and accuracy (89.4%) in bug detection and significantly outperforms the baseline methods. It has found 15 real bugs in the 11 DApps. So far, six of the 15 bugs have been confirmed by the developers, and three have been fixed. These promising results demonstrate the usefulness of ÐArcher.


  1. An Empirical Study of DeFi Liquidations: Incentives, Risks, and Instabilities
    Authors: Kaihua Qin, Liyi Zhou, Pablo Gamito, Philipp Jovanovic, and Arthur Gervais

Financial speculators often seek to increase their potential gains with leverage. Debt is a popular form of leverage, and with over 39.88B USD of total value locked (TVL), the Decentralized Finance (DeFi) lending markets are thriving. Debts, however, entail the risks of liquidation, the process of selling the debt collateral at a discount to liquidators. Nevertheless, few quantitative insights are known about the existing liquidation mechanisms.
In this paper, to the best of our knowledge, we are the first to study the breadth of the borrowing and lending markets of the Ethereum DeFi ecosystem. We focus on Aave, Compound, MakerDAO, and dYdX, which collectively represent over 85% of the lending market on Ethereum. Given extensive liquidation data measurements and insights, we systematize the prevalent liquidation mechanisms and are the first to provide a methodology to compare them objectively. We find that the existing liquidation designs well incentivize liquidators but sell excessive amounts of discounted collateral at the borrowers’ expenses. We measure various risks that liquidation participants are exposed to and quantify the instabilities of existing lending protocols. Moreover, we propose an optimal strategy that allows liquidators to increase their liquidation profit, which may aggravate the loss of borrowers.


  1. CeFi vs. DeFi — Comparing Centralized to Decentralized Finance
    Authors: Kaihua Qin, Liyi Zhou, Yaroslav Afonin, Ludovico Lazzaretti, and Arthur Gervais

To non-experts, the traditional Centralized Finance (CeFi) ecosystem may seem obscure, because users are typically not aware of the underlying rules or agreements of financial assets and products. Decentralized Finance (DeFi), however, is making its debut as an ecosystem claiming to offer transparency and control, which are partially attributable to the underlying integrity-protected blockchain, as well as currently higher financial asset yields than CeFi. Yet, the boundaries between CeFi and DeFi may not be always so clear cut.
In this work, we systematically analyze the differences between CeFi and DeFi, covering legal, economic, security, privacy and market manipulation. We provide a structured methodology to differentiate between a CeFi and a DeFi service. Our findings show that certain DeFi assets (such as USDC or USDT stablecoins) do not necessarily classify as DeFi assets, and may endanger the economic security of intertwined DeFi protocols. We conclude this work with the exploration of possible synergies between CeFi and DeFi.


  1. A^2MM: Mitigating Frontrunning, Transaction Reordering and Consensus Instability in Decentralized Exchanges
    Authors: Liyi Zhou, Kaihua Qin, and Arthur Gervais

The asset trading volume on blockchain-based exchanges (DEX) increased substantially since the advent of Automated Market Makers (AMM). Yet, AMMs and their forks compete on the same blockchain, incurring unnecessary network and block-space overhead, by attracting sandwich attackers and arbitrage competitions. Moreover, conceptually speaking, a blockchain is one database, and we find little reason to partition this database into multiple competing exchanges, which then necessarily require price synchronization through arbitrage.
This paper shows that DEX arbitrage and trade routing among similar AMMs can be performed efficiently and atomically onchain within smart contracts. These insights lead us to create a new AMM design, an Automated Arbitrage Market Maker, short A 2MM DEX. A2MM aims to unite multiple AMMs to reduce overheads, costs and increase blockchain security. With respect to Miner Extractable Value (MEV), A2MM serves as a decentralized design for users to atomically collect MEV, mitigating the dangers of centralized MEV relay services.
We show that A2MM offers essential security benefits. First, A 2MM strengthens the blockchain consensus security by mitigating the competitive exploitation of MEV, therefore reducing the risks of consensus forks. A2MM reduces the network layer overhead of competitive transactions, improves network propagation, leading to less stale blocks and better blockchain security. Through trade routing, A2MM reduces the predatory risks of sandwich attacks by taking advantage of the minimum profitable victim input. A2MM also offers financial benefits to traders. Failed swap transactions from competitive trading occupy valuable block space, implying an upward pressure on transaction fees. Our evaluations shows that A2MM frees up 32.8% block-space of AMM-related transactions. In expectation, A 2MM’s revenue allows to reduce swap fees by 90%.
We hope that our work engenders further innovation in the space of efficient and censorship-resilient exchanges, which by design democratizes MEV and let the people trade.



This was one of the most fun Research Pulse issues to date, lots of truly novel publications came out this week, which is a great sign for the industry.

In An Empirical Study of DeFi Liquidations: Incentives, Risks, and Instabilities, the authors provide a systematic analysis of liquidation mechanisms across major DeFi protocols, namely, Aave, Compound, MakerDAO, and dYdX. A truly novel framework to evaluate these mechanisms is described, which enables DeFi money markets to be compared objectively. The authors then propose an optimal strategy that allows liquidators to increase their liquidation profit, which may aggravate the loss of borrowers. A must-read if you are interested in mechanism design.

In Improving security for users of decentralized exchanges through multiparty computation, the authors describe a protocol that can improve the custody policies of DeFi users through multiparty computation, or MPC. Ethereum does not support multi-signature wallets natively, but there has been a visible trend amongst DeFi power users to circumvent that limitation via MPC protocols. These protocols emulate multi signatures off-chain through sophisticated cryptography, thereby increasing security.

In Blockchain Oracle Design Patterns, the authors provide a taxonomy for on-chain oracles and classify existing reporting techniques. The authors provide an interesting literature review of the oracle design space and the trade-offs that have been discovered as these systems evolved.

In ÐArcher: Detecting On-Chain-Off-Chain Synchronization Bugs in Decentralized Applications, the authors investigate the challenges of synchronizing on-chain and off-chain data in popular Ethereum applications, such as MetaMask. Such bugs occur when, for example, the application updated off-chain state prematurely when a transaction was still pending, and that later caused problems because the transaction failed to execute. They present an interesting framework to detect an application’s susceptibility to these synchronization bugs with high precision.

Finally, in A^2MM: Mitigating Frontrunning, Transaction Reordering and Consensus Instability in Decentralized Exchanges, the authors provide a novel structure for a decentralized exchange. Rather than an Automated Market Maker, they call this system an Automated Arbitrage Market Maker as it features a built-in MEV collector that attempts to democratize arbitrage opportunities. A fascinating read for those interested in MEV democratization.


1 Like