Shuze Liu, Farhad Mohsin, Lirong Xia, O. Seneviratne
{"title":"Strengthening Smart Contracts to Handle Unexpected Situations","authors":"Shuze Liu, Farhad Mohsin, Lirong Xia, O. Seneviratne","doi":"10.1109/DAPPCON.2019.00034","DOIUrl":null,"url":null,"abstract":"Decentralized application users may face unexpected situations that the smart contract implementing the application should handle, but cannot, because the smart contract cannot be modified once it is deployed. Therefore, we need 'stronger' smart contracts with flexible structures that are resilient in such unexpected situations. In this paper, we propose a generic mechanism to strengthen smart contracts and handle possible unexpected situations. Given a smart contract, this mechanism automatically generates an action list which offers actions as interfaces to change parameters of smart contracts and a voting system that utilizes a limited voter group randomly chosen from the peers. Each action in the action list can change a corresponding parameter of smart contracts. The actions, when approved by the majority, are executed to change the parameters. When users face unexpected situations in a transaction, they choose some actions as the solution and pass them to the voting system. Since a smart contract has finite parameters, there are finite actions. By arranging and combining these actions, our mechanism offers solutions that can handle wide-ranging unexpected situations. Also, to execute a solution, the majority of voters need to approve it, thus not violating the protocol of the original smart contract. Voters are rewarded based on quadratic rules for peer prediction, which makes telling true preferences the only way to maximize rewards. Using machine learning, we predict users' preferences based on the voting records. The predictions are provided as default values for future votes to avoid users' need to vote manually each time.","PeriodicalId":434018,"journal":{"name":"2019 IEEE International Conference on Decentralized Applications and Infrastructures (DAPPCON)","volume":"32 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"6","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 IEEE International Conference on Decentralized Applications and Infrastructures (DAPPCON)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/DAPPCON.2019.00034","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 6
Abstract
Decentralized application users may face unexpected situations that the smart contract implementing the application should handle, but cannot, because the smart contract cannot be modified once it is deployed. Therefore, we need 'stronger' smart contracts with flexible structures that are resilient in such unexpected situations. In this paper, we propose a generic mechanism to strengthen smart contracts and handle possible unexpected situations. Given a smart contract, this mechanism automatically generates an action list which offers actions as interfaces to change parameters of smart contracts and a voting system that utilizes a limited voter group randomly chosen from the peers. Each action in the action list can change a corresponding parameter of smart contracts. The actions, when approved by the majority, are executed to change the parameters. When users face unexpected situations in a transaction, they choose some actions as the solution and pass them to the voting system. Since a smart contract has finite parameters, there are finite actions. By arranging and combining these actions, our mechanism offers solutions that can handle wide-ranging unexpected situations. Also, to execute a solution, the majority of voters need to approve it, thus not violating the protocol of the original smart contract. Voters are rewarded based on quadratic rules for peer prediction, which makes telling true preferences the only way to maximize rewards. Using machine learning, we predict users' preferences based on the voting records. The predictions are provided as default values for future votes to avoid users' need to vote manually each time.