Mahdi Fooladgar

h-index3
2papers
73citations

2 Papers

4.9CRNov 8, 2019Code
On Incentive Compatible Role-based Reward Distribution in Algorand

Mehdi Fooladgar, Mohammad Hossein Manshaei, Murtuza Jadliwala et al.

Algorand is a recent, open-source public or permissionless blockchain system that employs a novel proof-of-stake byzantine consensus protocol to efficiently scale the distributed transaction agreement problem to billions of users. In addition to being more democratic and energy-efficient, compared to popular protocols such as Bitcoin, Algorand also touts a much high transaction throughput. This paper is the first attempt in the literature to study and address this problem. By carefully modeling the participation costs and rewards received within a strategic interaction scenario, we first empirically show that even a small number of nodes defecting to participate in the protocol tasks due to insufficiency of the available incentives can result in the Algorand network failing to compute and add new blocks of transactions. We further show that this effect can be formalized by means of a mathematical model of interaction in Algorand given its participation costs and the current (or planned) reward distribution/sharing approach envisioned by the Algorand Foundation. Specifically, on analyzing this game model we observed that mutual cooperation under the currently proposed reward sharing approach is not a Nash equilibrium. This is a significant result which could threaten the success of an otherwise robust distributed consensus mechanism. We propose a novel reward sharing approach for Algorand and formally show that it is incentive-compatible, i.e., it can guarantee cooperation within a group of selfish Algorand users. Extensive numerical and Algorand simulation results further confirm our analytical findings. Moreover, these results show that for a given distribution of stakes in the network, our reward sharing approach can guarantee cooperation with a significantly smaller reward per round.

6.9SEDec 10, 2019Code
Testing Smart Contracts Gets Smarter

Erfan Andesta, Fathiyeh Faghih, Mahdi Fooladgar

Smart contracts are immutable, verifiable, and autonomous pieces of code that can be deployed and ran on blockchain networks like Ethereum. Due to the immutability nature of blockchain, no change is possible on a deployed smart contract or a verified transaction. On the other hand, there are millions of dollars carried by smart contracts in Ethereum blockchain, and hence, a faulty smart contract can lead to a huge monetary loss. Therefore, it is important for smart contract developers to fully test and check the correctness of their code before deploying it on the blockchain. In this paper, we propose a testing mechanism for smart contracts in Solidity language, based on mutation testing. We analyzed a comprehensive list of known bugs in Solidity smart contracts, and designed 10 classes of mutation operators inspired by the real faults. Our experimental results show that our proposed mutation operators can regenerate 10 of 15 famous faulty smart contracts, which have resulted in millions of dollars loss. The results show the effectiveness of our proposed mutation operators in detecting real faults in Solidity smart contracts. We have also extended {\em Universal Mutator } tool with our mutation operators, so that it can automatically generate mutants for smart contracts written in Solidity.