(57.14%) out of 70 contracts we have good condition
coverage scores.
6 CONCLUSION
The main objective of this work is to certify the smart
contract wrt. the condition coverage analysis. It is
very important to test smart contracts by looking at
the critical business in the blockchain. If an incor-
rect contract or bug in the contract exists, then there
is a high chance of losing the expensive assets. In this
paper, we proposed a novel approach to compute con-
dition coverage for a smart contract using a solidity
compiler with a bounded model checker. We tested
70 contracts and showed that for 40 contracts i.e.,
57.14% have optimal or maximal condition coverage
scores. However, the rest 30 contracts were incom-
plete due to resource issues. We will explore other
techniques such as Fuzzing and Symbolic execution
for a more detailed analysis.
ACKNOWLEDGEMENT
This work is sponsored by IBITF, Indian Institute of
Technology (IIT) Bhilai, under the grant of PRAYAS
scheme, DST, Government of India.
REFERENCES
Akca, S., Rajan, A., and Peng, C. (2019). Solanalyser: A
framework for analysing and testing smart contracts.
In 2019 26th Asia-Pacific Software Engineering Con-
ference (APSEC), pages 482–489. IEEE.
Andesta, E., Faghih, F., and Fooladgar, M. (2020). Testing
smart contracts gets smarter. In 2020 10th Interna-
tional Conference on Computer and Knowledge Engi-
neering (ICCKE), pages 405–412. IEEE.
Azure (2021). Azure. https://github.com/Azure-Samples/
blockchain/tree/master/blockchain-workbench/
application-and-smart-contract-samples.
Ballot.sol (2021). Ballot.sol. https://docs.soliditylang.org/
en/v0.4.24/solidity-by-example.html.
Benitez, S., Cogan, J., and Russo, A. (2020). Short paper:
Blockcheck the typechain. In Proceedings of the 15th
Workshop on Programming Languages and Analysis
for Security, pages 35–39.
Buterin, V. et al. (2014). A next-generation smart contract
and decentralized application platform. white paper,
3(37).
Clarke, E., Kroening, D., and Lerda, F. (2004). A tool for
checking ANSI-C programs. In TACAS, pages 168–
176. Springer.
Clarke, E., Kroening, D., and Yorav, K. (2003). Behavioral
consistency of C and Verilog programs using bounded
model checking. In 40th DAC, pages 368–371. ACM
Press.
Dannen, C. (2017). Introducing Ethereum and solidity, vol-
ume 318. Springer.
escrow.sol (2021). escrow.sol. https://www.geeksforgeeks.
org/what-is-escrow-smart-contract/.
etherscan (2021). etherscan. https://etherscan.io/.
Jiang, B., Liu, Y., and Chan, W. (2018). Contractfuzzer:
Fuzzing smart contracts for vulnerability detection.
In 2018 33rd IEEE/ACM International Conference on
Automated Software Engineering (ASE), pages 259–
269. IEEE.
Liu, Y., Li, Y., Lin, S.-W., and Yan, Q. (2020). Modcon: a
model-based testing platform for smart contracts. In
Proceedings of the 28th ACM Joint Meeting on Eu-
ropean Software Engineering Conference and Sym-
posium on the Foundations of Software Engineering,
pages 1601–1605.
Mossberg, M., Manzano, F., Hennenfent, E., Groce, A.,
Grieco, G., Feist, J., Brunson, T., and Dinaburg, A.
(2019). Manticore: A user-friendly symbolic execu-
tion framework for binaries and smart contracts. In
2019 34th IEEE/ACM International Conference on
Automated Software Engineering (ASE), pages 1186–
1189. IEEE.
Nguyen, T. D., Pham, L. H., Sun, J., Lin, Y., and Minh, Q. T.
(2020). sfuzz: An efficient adaptive fuzzer for solid-
ity smart contracts. In Proceedings of the ACM/IEEE
42nd International Conference on Software Engineer-
ing, pages 778–788.
payments.sol (2021). payments.sol. https://github.
com/joaquin-alfaro/ethereum-payment-vuejs/blob/
develop/dapp/contracts/Payments.sol.
Praitheeshan, P., Pan, L., Yu, J., Liu, J., and Doss, R.
(2019). Security analysis methods on ethereum smart
contract vulnerabilities: a survey. arXiv preprint
arXiv:1908.08605.
ptest.sol (2021). ptest.sol. https://www.npmjs.com/
package/solfuzz.
Sánchez-Gómez, N., Morales-Trujillo, L., and Valderrama,
J. T. (2019). Towards an approach for applying early
testing to smart contracts. In WEBIST, pages 445–453.
Wen, Z. A. and Miller, A. (2016). Scanning live ethereum
contracts for the “unchecked-send” bug. Hacking Dis-
tributed.
Wood, G. et al. (2014). Ethereum: A secure decentralised
generalised transaction ledger. Ethereum project yel-
low paper, 151(2014):1–32.
CC-SolBMC: Condition Coverage Analysis for Smart Contracts Using Solidity Bounded Model Checker
395