Upgrade to Pro — share decks privately, control downloads, hide ads and more …

スマートコントラクトの監査について

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for yudetamago yudetamago
September 25, 2018

 スマートコントラクトの監査について

Avatar for yudetamago

yudetamago

September 25, 2018
Tweet

More Decks by yudetamago

Other Decks in Technology

Transcript

  1. 4 監査対象になるもの(⼀例) スコープ ü セキュリティ ü トークンの仕様 ü トラストレス性 ü

    アーキテクチャ ü ⾔語の慣習 ü WPとの整合性 内容 ü コード本体 ü デプロイ⽤スクリプト ü ホワイトペーパー(WP) ü (テストコード) 参考: https://www.smartcontractsecurityalliance.com/
  2. アクセス制御の例(Proxy Pattern) 7 Main Contract Proxy Contract Deployer Another User

    onlyOwner onlyProxy Contract これを付ける 参考: https://blog.zeppelinos.org/proxy-patterns/
  3. unbounded loopの例 function addTokenGrant(address _grantee, uint256 _value) external onlyOwner {

    … for (uint i = 0; i < tokenGrantees.length; i++). { require(tokenGrantees[i] != _grantee); } 8 block gas limitを超えないように 常にループ回数の上限は確認する https://blog.zeppelin.solutions/kin-token-audit-121788c06fe これ