Research Pulse #94 12/05/2022

  1. Decentralized Finance (DeFi) Projects: A Study of Key Performance Indicators in Terms of DeFi Protocols’ Valuations (Direct Link)
    Authors: Dominik Metelski and Janusz Sobieraj

Decentralized finance (DeFi) protocols use blockchain-based tools to mimic banking, investment and trading solutions and provide a viable framework that creates incentives and conditions for the development of an alternative financial services market. In this respect, they can be seen as alternative financial vehicles that mitigate portfolio risk, which is particularly important at a time of increasing uncertainty in financial markets. In particular, some DeFi protocols offer an automated, low-risk way to generate returns through a “delta-neutral” trading strategy that reduces volatility. The main financial operations of DeFi protocols are implemented using appropriate algorithms, but unlike traditional finance, where issues of value and valuation are commonplace, DeFis lack a similar value-based analysis. The aim of this study is to evaluate relevant DeFi performance metrics related to the valuations of these protocols through a thorough analysis based on various scientific methods and to show what influences the valuations of these protocols. More specifically, the study identifies how DeFi protocol valuations depend on the total value locked and other performance variables, such as protocol revenue, total revenue, gross merchandise volume and inflation factor, and assesses these relationships. The study analyzes the valuations of 30 selected protocols representing three different classes of DeFi (i.e., decentralized exchanges, lending protocols and asset management) in relation to their respective performance measures. The analysis presented in the article is quantitative in nature and relies on Granger causality tests as well as the results of a fixed effects panel regression model. The results show that the valuations of DeFi protocols depend to some extent on the performance measures of these protocols under study, although the magnitude of the relationships and their directions differ for the different variables. The Granger causality test could not confirm that future DeFi protocol valuations can be effectively predicted by the TVLs of these protocols, while other directions of causality (one-way and two-way) were confirmed, e.g., a two-way causal relationship between DeFi protocol valuations and gross merchandise volume, which turned out to be the only variable that Granger-causes future DeFi protocol valuations.

Link to Paper

  • DeFi is a vibrant and nascent area that has experienced tremendous growth over the past few years. Nevertheless, it can be challenging to measure this growth due to the lack of well-established metrics to compare and contrast DeFi protocols.
  • This paper evaluates the most popular metrics employed- currently used by analysts, such as Total Value Locked (TVL), Protocol Revenue, Token Inflation, amongst others.
  • The authors look specifically at the correlations between these metrics and protocol valuation to see if either can be predictive of returns.
  1. QLAMMP: A Q-Learning Agent for Optimizing Fees on Automated Market Making Protocols
    Authors: Dev Churiwala and Bhaskar Krishnamachari

Automated Market Makers (AMMs) have cemented themselves as an integral part of the decentralized finance (DeFi) space. AMMs are a type of exchange that allows users to trade assets without the need for a centralized exchange. They form the foundation for numerous decentralized exchanges (DEXs), which help facilitate the quick and efficient exchange of on-chain tokens. All present-day popular DEXs are static protocols, with fixed parameters controlling the fee and the curvature - they suffer from invariance and cannot adapt to quickly changing market conditions. This characteristic may cause traders to stay away during high slippage conditions brought about by intractable market movements. We propose an RL framework to optimize the fees collected on an AMM protocol. In particular, we develop a Q-Learning Agent for Market Making Protocols (QLAMMP) that learns the optimal fee rates and leverage coefficients for a given AMM protocol and maximizes the expected fee collected under a range of different market conditions. We show that QLAMMP is consistently able to outperform its static counterparts under all the simulated test conditions.

Link to Paper

  • One of the biggest issues preventing the proliferation of Decentralized Exchanges is the lack of liquidity in some key markets. This contributes to asset prices within these DEXs being suboptimal relative to their centralized counterparts.
  • This is a particularly challenging issue because the entities currently providing liquidity to those markets consistently do so at a loss. This is predominantly due to a phenomenon referred to as Impermanent Loss (IL).
  • Many believe that in order to counter IL, the fee model employed by DEXs needs to be revamped. This paper, however, provides an interesting alternative. Rather than changing a DEX’s fee model, the authors propose a Machine Learning model that liquidity providers can use to optimize their fee revenue across markets.
  1. Demystifying Bitcoin Address Behavior via Graph Neural Networks
    Authors: Zhengjie Huang, Yunyang Huang, Peng Qian, Jianhai Chen, and Qinming He

Bitcoin is one of the decentralized cryptocurrencies powered by a peer-to-peer blockchain network. Parties who trade in the bitcoin network are not required to disclose any personal information. Such property of anonymity, however, precipitates potential malicious transactions to a certain extent. Indeed, various illegal activities such as money laundering, dark network trading, and gambling in the bitcoin network are nothing new now. While a proliferation of work has been developed to identify malicious bitcoin transactions, the behavior analysis and classification of bitcoin addresses are largely overlooked by existing tools. In this paper, we propose BAClassifier, a tool that can automatically classify bitcoin addresses based on their behaviors. Technically, we come up with the following three key designs. First, we consider casting the transactions of the bitcoin address into an address graph structure, of which we introduce a graph node compression technique and a graph structure augmentation method to characterize a unified graph representation. Furthermore, we leverage a graph feature network to learn the graph representations of each address and generate the graph embeddings. Finally, we aggregate all graph embeddings of an address into the address-level representation, and engage in a classification model to give the address behavior classification. As a side contribution, we construct and release a large-scale annotated dataset that consists of over 2 million real-world bitcoin addresses and concerns 4 types of address behaviors. Experimental results demonstrate that our proposed framework outperforms state-of-the-art bitcoin address classifiers and existing classification models, where the precision and F1- score are 96% and 95%, respectively. Our implementation and dataset are released, hoping to inspire others.

Link to Paper

  • Blockchains are pseudonymous in nature. Observers can see the addresses involved in all transactions, and these addresses function as pseudonyms.

  • At times, it is crucial to understand who is the entity behind an on-chain address, especially in the event of systemic failures, such as the collapse of FTX. Frequently, this is done via so-called address classifiers.

  • This paper introduces a new tool called BAClassifier, which can automatically classify (or cluster) bitcoin addresses based on their behaviors. According to the authors, the BAClassifier outperforms existing bitcoin address classifiers, with a precision and F1-score of 96% and 95%, respectively.

  1. Securing the Ethereum from Smart Ponzi Schemes: Identification Using Static Features
    Authors: Zibin Zheng, Weili Chen, Zhijie Zhong, Zhiguang Chen, and Yutong Lu

Malware detection approaches have been extensively studied for traditional software systems. However, the development of blockchain technology has promoted the birth of a new type of software systemśdecentralized applications. Composed of smart contracts, a type of application that implements the Ponzi scheme logic (called smart Ponzi schemes) has caused irreversible loss and hindered the development of blockchain technology. These smart contracts generally had a short life but involved a large amount of money. Whereas identification of these Ponzi schemes before causing financial loss has been significantly important, existing methods suffer from three main deficiencies, i.e., the insufficient dataset, the reliance on the transaction records, and the low accuracy. In this study, we first build a larger dataset. Then, a large number of features from multiple views, including bytecode, semantic, and developers, are extracted. These features are independent of the transaction records. Furthermore, we leveraged machine learning methods to build our identification model, i.e., Multi-view Cascade Ensemble model (MulCas). The experiment results show that MulCas can achieve higher performance and robustness in the scope of our dataset. Most importantly, the proposed method can identify smart Ponzi scheme at the creation time.

Link to Paper

  • On-chain Ponzi schemes can be incredibly detrimental to the performance of a crypto network. For example, in 2018 an infamous project called FOMO 3D gamified Ponzi schemes and at times used upwards of 80% of Ethereum block space.

  • As such, tools that automatically identify Ponzis are critical to helping mature the ecosystem so that bad actors are pruned out, and block space is not wasted on toxic use cases.

  • This paper introduces an interesting set of on-chain heuristics that can automatically identify the patterns of a Ponzi scheme and flag users that are engaging in this activity.

  1. SATP: A simple and scalable protocol for virtual state channel networks
    Authors: Andrew Stewart, Colin Kennedy, Mike Kerzhner, George Knee, Matthias Geihs, and Sebastian Stammler

Virtual state channels allow peers to bootstrap existing connections to form a state channel network. We present Stateful Asset Transfer Protocol (SATP1 ), an amalgamation of two existing state channel protocols, Nitro and Perun, which considerately improves the practical application of virtual state channels, evangelizing an approach of security-by-simplicity. In special cases, we conjecture to have achieved theoretical optimal performance.

Link to Paper

  • Payment Channel Networks (PCNs), such as Bitcoin’s Lightning Network, have popularized the idea of using off-chain coordination mechanisms for use cases such as payments.

  • However, there are multiple applications beyond payments that make use of the very same construct. For example, there have been experiments on Ethereum’s Raiden Network that showcased how this technology can be used for smart contracts as well.

  • This paper discusses yet another evolution of PCN designs, the advent of virtual channels, which can considerably improve efficiency and reduce the cost of utilizing these layer two networks.

  1. Safety Verification of Declarative Smart Contracts
    Authors: Haoxian Chen, Lan Lu, Brendan Massey, Yuepeng Wang, and Boon Thau Loo

Smart contracts manage a large number of digital assets nowadays. Bugs in these contracts have led to significant financial loss. Verifying the correctness of smart contracts is therefore an important task. This paper presents a safety verification tool DCV that targets declarative smart contracts written in DeCon, a logic-based domain-specific language for smart contract implementation and specification. DCV is sound and fully automatic. It proves safety properties by mathematical induction and can automatically infer inductive invariants without annotations from the developer. Our evaluation shows that DCV is effective in verifying smart contracts adapted from public repositories, and can verify contracts not supported by other tools. Furthermore, DCV significantly outperforms baseline tools in verification time.

Link to Paper

  • Developing secure smart contracts can be a daunting task, especially given the intricacies of popular smart contract languages such as Solidity. Beyond development, proving that a smart contract is entirely secure may at times seem impossible.

  • In light of this challenge, there have been multiple approaches proposed to improve smart contract security, often through new programming languages. These programming languages use techniques such as formal verification to increase the security assurances of smart contracts.

  • This paper discusses an emerging, logic-based programming language called DeCon which has been specifically developed with security in mind. This language features a safety verification tool called DCV which can be used to provide security proofs for DeCon contracts.