Skip to main content
QUICK REVIEW

[논문 리뷰] Formalising and verifying smart contracts with Solidifier: a bounded model checker for Solidity

Pedro Antonino, A. W. Roscoe|arXiv (Cornell University)|2020. 02. 07.
Security and Verification in Computing참고 문헌 38인용 수 9
한 줄 요약

이 논문은 Solidity를 위한 유한 모델 체커인 Solidifier를 제시한다. 이는 Solid 언어를 사용해 언어의 핵심 부분을 형식화하고, 이를 Boogie로 번역하여 Corral을 통해 검증한다. 이는 주어진 깊이까지 실행 경로를 체계적으로 탐색함으로써 메모리 별칭 및 스토리지 레이아웃 문제와 같은 의미적 성질 위반을 정확하게 탐지할 수 있도록 한다. 이는 정밀도와 의미적 충실도 면에서 기존 도구를 능가하면서도 경쟁 가능한 성능을 유지한다.

ABSTRACT

The exploitation of smart-contract vulnerabilities can have catastrophic consequences such as the loss of millions of pounds worth of crypto assets. Formal verification can be a useful tool in identifying vulnerabilities and proving that they have been fixed. In this paper, we present a formalisation of Solidity and the Ethereum blockchain using the Solid language and its blockchain; a Solid program is obtained by explicating/desugaring a Solidity program. We make some abstractions that over-approximate the way in which Solidity/Ethereum behave. Based on this formalisation, we create Solidifier: a bounded model checker for Solidity. It translates Solid into Boogie, an intermediate verification language, that is later verified using Corral, a bounded model checker for Boogie. Unlike much of the work in this area, we do not try to find specific behavioural/code patterns that might lead to vulnerabilities. Instead, we provide a tool to find errors/bad states, i.e. program states that do not conform with the intent of the developer. Such a bad state, be it a vulnerability or not, might be reached through the execution of specific known code patterns or through behaviours that have not been anticipated.

연구 동기 및 목표

  • 코드 취약성으로 인한 치명적인 재정적 손실을 방지하기 위해 스마트 계약 검증의 신뢰성을 확보하기 위한 핵심적인 필요성 해결.
  • 저수준의 복잡성을 추상화하면서도 핵심 동작을 유지하는 Solidity의 대표적인 부분집합에 대한 형식적 의미 기반 제공.
  • 패턴 기반 취약성 탐지에 의존하지 않고 의미적 성질 위반을 탐지하는 도구 개발.
  • Solidity의 비표준 메모리 모델과 스토리지 레이아웃을 충실하게 모델링함으로써 형식 검증의 정확도 향상.
  • 정밀도, 속도, 의미적 충실도 측면에서 기존 도구와의 비교를 통해 Solidifier 평가.

제안 방법

  • Solid 언어를 사용해 Solidity의 핵심 부분을 형식화하여, 더 명확한 의미론을 얻기 위해 구문을 간소화하고 당사자 구문을 제거.
  • Solid 프로그램을 중간 검증 언어인 Boogie로 번역하여 형식적 추론 가능하게 함.
  • 사용자가 정의한 깊이까지 모든 실행 경로를 기호적으로 탐색하기 위해 Boogie를 대상으로 하는 유한 모델 체커인 Corral 사용.
  • 별칭 및 결정론적 레이아웃 행동을 정확히 포착하기 위해 Solidity의 메모리 모델과 스토리지 레이아웃을 특별히 주의 깊게 인코딩.
  • 사용자가 정의한 의미적 성질(예: 불변식, 안전 조건)을 정의하여 모델 체킹 중 위반 여부를 검사.
  • 탐색 깊이와 성능 간의 균형을 유지하면서도 거짓 긍정을 최소화하기 위해 Corral에 맞춤 설정을 구성.

실험 결과

연구 질문

  • RQ1간소화된 언어(Solid)에서 Solidity 의미론을 형식화하면 저수준의 EVM 기반 접근 방식보다 더 정밀한 검증을 가능하게 할 수 있는가?
  • RQ2Solidifier는 Mythril, VeriSol, solc-verify와 같은 기존 도구와 비교해 의미적 성질 위반 탐지 정밀도에서 어떻게 비교되는가?
  • RQ3Solidifier는 얼마나 정확하게 Solidity의 메모리 모델과 스토리지 레이아웃 의미론을 구현하는가?
  • RQ4작은 유한 경계를 가진 유한 모델 체킹이 실질적으로 일반적인 스마트 계약 버그를 탐지하는 데 충분한가?
  • RQ5사용자가 정의한 의미적 성질은 알려진 코드 패tern을 넘어서는 취약성을 드러내는가?

주요 결과

  • Solidifier는 Solidity 의미론의 Boogie 표현이 더 정확하기 때문에 solc-verify보다 정밀도가 높으며, 거짓 긍정이 더 적게 발생한다.
  • Solidifier는 VeriSol과 같은 다른 Boogie 기반 도구와 유사한 성능을 보이며, 특히 별칭 및 스토리지 레이아웃 행동을 포착하는 데서 뛰어난 의미적 충실도를 보였다.
  • Aliasing 및 StorageDeterministicLayout 벤치마크에서 몇 개의 함수 호출만으로도 위반 사항을 성공적으로 탐지함으로써, 작은 경계를 가진 유한 모델 체킹이 일반적인 버그 탐지에 효과적임을 시사한다.
  • 평가 결과, 고수준 의미론을 형식화하고 사용자 정의 성질을 검증하는 Solidifier의 접근 방식은 패턴 기반 기호 실행이나 과도하게 근사한 검증보다 더 신뢰할 수 있는 결과를 도출한다.
  • 결과적으로, 별칭 및 레이아웃 관련 문제와 같은 미세한 이슈를 정확히 탐지함으로써, Solidifier가 다른 도구보다 Solidity의 메모리 모델을 더 충실하게 모델링하고 있음을 입증한다.
  • Solidifier의 검증 속도는 다른 도구들과 경쟁 가능하며, 고정밀도 검증이 성능에 큰 영향을 주지 않는다는 것을 시사한다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.