50
平成27年7月14日 日本発、 ビットコインを超える NEMとは?

日本発、ビットコインを超える NEM とは?

Embed Size (px)

Citation preview

Page 1: 日本発、ビットコインを超える NEM とは?

平成27年7月14日

日本発、ビットコインを超える

NEMとは?

Page 2: 日本発、ビットコインを超える NEM とは?

とは?• New Economy Movement (新経済運動)www.nem.io

• 次世代ブロックチェーンプラットフォーム

• 3月31日より公開した

• 通貨の流通量は一定

• マイニングが無いことが特徴

• ブロックを作成するモチベーションは取引の際の手数料

Page 3: 日本発、ビットコインを超える NEM とは?

BLOCK CHAINとは?誠さんへ100円を送金する

“Let’s meet at Hachiko”

Send 500 XEM toab5f3cc…

投票したい候補者

車登録

Page 4: 日本発、ビットコインを超える NEM とは?

BLOCK CHAINとは?誠さんへ100円を送金する

“Let’s meet at Hachiko”

Send 500 XEM toab5f3cc…

選挙に何々さんを選ぶ

車登録参加者全員が、ひとつの共通した

データベースを保持する

Page 5: 日本発、ビットコインを超える NEM とは?

BLOCK CHAINとは?誠さんへ100円を送金する

“Let’s meet at Hachiko”

Send 500 XEM toab5f3cc…

選挙に何々さんを選ぶ

車登録分散形合意形成システムに基づいて、データをブロックに入れて、

P2Pネットワークで共有する

Page 6: 日本発、ビットコインを超える NEM とは?

BLOCK CHAINとは?誠さんへ100円を送金する

“Let’s meet at Hachiko”

Send 500 XEM toab5f3cc…

選挙に何々さんを選ぶ

車登録

モノのインターネットではいろんなメーカーからの機械の情報を共有しようとする場合、一つのメーカーが開発したシステムを信用せず、分散形合意形成システム、いわゆるブロック・チェーンを用いて、情報を共有する

Page 7: 日本発、ビットコインを超える NEM とは?

何故NEMか?

Page 8: 日本発、ビットコインを超える NEM とは?

非常に利便性の高い開発者向けAPIを準備http://bob.nem.ninja/docs/

import'requests'

req'='requests.get(‘http://104.156.232.219:7890/account/get/forwarded?address=NC2ZQKEFQIL3JZEOB2OZPWXWPOR6LKYHIROCR7PK')'

req.json(){"u'account':"{u'address':"u'NALICE2A73DLYTP4365GNFCURAUP3XVBFO7YNYOW',"

""u'balance':"15794218396666,"

""u'harvestedBlocks':"1181,"

""u'importance':"0.0015975939387324564,"

""u'label':"None,"

""u'publicKey':"u'bdd8dd702acb3d88daf188be8d6d9c54b3a29a32561a068b25d2261b2b2b7f02',"

""u'vestedBalance':"15792456424453},"

""u'meta':"{u'cosignatories':"[],"

""u'cosignatoryOf':"[],"

""u'remoteStatus':"u'ACTIVE',"

""u'status':"u’LOCKED'}"}

Page 9: 日本発、ビットコインを超える NEM とは?

マルチシグなどの取引の安全性を保証する機能をシステムレベルでサポート

Page 10: 日本発、ビットコインを超える NEM とは?

マイニング無し

Page 11: 日本発、ビットコインを超える NEM とは?

数多くのテストに耐えた信頼性が高いシステム

Page 12: 日本発、ビットコインを超える NEM とは?

NEMモザイクタイル誠さんへ100円を送金する

“Let’s meet at Hachiko”

Send 500 XEM toab5f3cc…

投票したい候補者

車登録

Page 13: 日本発、ビットコインを超える NEM とは?

ブロックチェーン上ドメイン名level 1

level 2 level 2

level 3level 3 level 3

microsoft.windows

level 1 domain mosaic name

Page 14: 日本発、ビットコインを超える NEM とは?

レーティングによる評判

• 商取引には信用情報が不可欠

• ドメイン名に付ける

• 取引に重みを付けたレーティングすることが可能

Page 15: 日本発、ビットコインを超える NEM とは?

ノード(サーバー)を立ち上がるモチベーションがないため、ビットコインのノードの数が大変減少している

0

100000

200000

300000

400000

2013年5月 2013年9月 2015年6月

Page 16: 日本発、ビットコインを超える NEM とは?

ノード(サーバー)を立ち上がるモチベーションがないため、ビットコインのノードの数が大変減らしている

0

100000

200000

300000

400000

2013年5月 2013年9月 2015年6月

NEMでは、超高速度ネットワーク・レイヤーを作成した人に、報酬をあげることで、ノードを立ち上げるモチベーションとする

Page 17: 日本発、ビットコインを超える NEM とは?

NEM超速度ネットワーク• Sybil攻撃を防止するため、3,000,000XEM以上がアカウントにあれば、参加できる

• モバイルアプリが利用可能

• 将来:高速度分散型ledgerもしく並列ブロックチェーン

Page 18: 日本発、ビットコインを超える NEM とは?
Page 19: 日本発、ビットコインを超える NEM とは?

公開鍵暗号について• 公開鍵と秘密鍵があって、秘密鍵でメッセージなどを署名したら、誰でも分かる公開鍵を使って、署名を確認できる

• メッセージなどを暗号化させる際、自分の秘密鍵を利用して、相手の公開鍵に向けて暗号化をして、相手は相手の秘密鍵を利用して復号できる

Page 20: 日本発、ビットコインを超える NEM とは?

公開鍵暗号についてへの へのもへ

への へのもへ

Aさん

Bさん

メッセージ「契約を同意する」を送信する

秘密鍵を利用してBさんの公開鍵に暗号化する

秘密鍵を利用してAさんからのメッセージを復号する

Page 21: 日本発、ビットコインを超える NEM とは?

公開鍵の例:

秘密鍵の例:

71fc5b675058d55fd81eb6fe91f6e3bc321bab752720416fb38aa7a0d1d0515a

00b3b8cf802ea687ee1e0f249e442ae82ee02b8b82e4cb3900092601603c658351

• 楕円曲線はいろんなあり、NEMはEd25519、

(http://ed25519.cr.yp.to/)を利用する

Page 22: 日本発、ビットコインを超える NEM とは?

ADDRESSES

• ベース32エンコーディングされたデータ:

• ネットワーク・バイト

• 160ビット公開鍵のハッシュ

• 4バイトchecksum

例:NDMAKO-TODH4O-XMQCAG-ZWWPVL-RUVOCL-

XXKOSK-FUJA

Page 23: 日本発、ビットコインを超える NEM とは?

取引{''' "timeStamp":'9111526,''' "amount":'1000000000,''' "signature":'"651a19ccd09c1e0f8b25f6a0aac5825b0a20f158ca4e0d78f2abd904a3966b6e3599a47b9ff199a3a6e1152231116fa4639fec684a56909c22cbf6db66613901",''' "fee":'3000000,''' "recipient":'"TDGIMREMR5NSRFUOMPI5OOHLDATCABNPC5ID2SVA",''' "type":'257,''' "deadline":'9154726,''' "message":''' {''' ' "payload":'"74657374207472616e73616374696f6e",''' ' "type":'1''' },''' "version":'g1744830463,'' "signer":'"a1aaca6c17a24252e674d155713cdf55996ad00175be4af02a20c67b59f9fe8a"''}

Page 24: 日本発、ビットコインを超える NEM とは?

マルチシグ• アカウントから取引を作成したい際、ブロックチェーンで取引をアクセプトするまで、複数アカウントからの署名が必要である

• 現金と同様に暗号通貨でも、送金したお金は戻すことが出来ない為、秘密鍵が失うとお金も失うことにつながるが、マルチシグを利用することで安全・安心が保証される

Page 25: 日本発、ビットコインを超える NEM とは?

M-OF-N マルチシグ

• Nの中で、M数の署名することが必要

• 例:5アカウントの中で三つが署名するが必要

• 特に取引所に使って欲しい

Page 26: 日本発、ビットコインを超える NEM とは?

確率的ビザンチン合意形成 (中本合意形成)

• 中本哲史が提案した分散形合意形成アルゴリズムであり、皆で共有しているデータが正確であることを証明するもの

• それぞれのプルーフ・オブ・「何々」のアルゴリズムは中本合意形成を実現していて、参加者から次のブロックの作成者を決定するものである

Page 27: 日本発、ビットコインを超える NEM とは?

プルーフ・オブ・ワーク(POW)• ビットコインの代表的な「マイニング」

• アルゴリズム:

• minerは取引集合をブロックに入れて、ブロックの全部のデータをハッシュする

• →ハッシュは難易度より低かったら、オッケー!終わりとして、新しいブロックを作成する

• →ハッシュは難易度より高かったら、ダメなので、「nonce」という数字を変更する

• 繰り返す

Page 28: 日本発、ビットコインを超える NEM とは?

プルーフ・オブ・ワーク(POW)• ビットコインは代表的な「マイニング」

• アルゴリズム:

• minerは取引集合をブロックに入れて、ブロックの全部のデータをハッシュする

• →ハッシュはdifficultyより低かったら、オッケー!終わりとして、新しいブロックを作成する

• →ハッシュはdifficultyより高かったら、ダメなので、「nonce」という数字を変更する

• 繰り返す

参加者の計算力を合わせて、ブロックのデータが正しいとの証明になる

(ワークの証明)

Page 29: 日本発、ビットコインを超える NEM とは?

POWの問題点• マイニング団体が力を持つことができれば、嘘のデータをブロックに入れることが可能、いわゆるダブル・スペンド攻撃の恐れがある

• P2Pノードを立ち上がるモチベーションがない

• ブロック作成者だけが手数料などを得られる

• 電力が非常に無駄になる。地球の環境破壊につながる。お金もかかる(中国のあるところでは電気代が月8万米ドル!)

Page 30: 日本発、ビットコインを超える NEM とは?

POWの一般的な働きPoWはminerらの計算力を示す確率分布からサンプルを取って、次のブロックの作成者を決定する

Page 31: 日本発、ビットコインを超える NEM とは?

POWの問題の解決に向けて

計算力の確率分布からサンプルするのではなく、電力を無駄にしない分布からサンプルする

Page 32: 日本発、ビットコインを超える NEM とは?

PROOF-OF-STAKE(取得した権利の残高の証明)

• 計算力の分布からブロックの作成者を決定せず、アカウント取得した権利の残高の分布を利用する

• これから説明するProof-of-Importanceと同様なので、ここではPoSの説明は省略する

• 問題:お金持ちがブロック作成者になると、参加資格の取得に不公平が生じる

Page 33: 日本発、ビットコインを超える NEM とは?

重要性の証明(PROOF-OF-IMPORTANCE; POI)

• NEMが開発したアルゴリズム

• 経済に関するユーザー自身の重要性によって次のブロックを誰が収穫(作成)するのかを確率的に決める

• PoSと同じ様であるが、残高ではなく、重要性を計算に利用する

Page 34: 日本発、ビットコインを超える NEM とは?

取引グラフ

• 非常に重要なデータ

Page 35: 日本発、ビットコインを超える NEM とは?

POIでブロックの作成の仕方

5.2 Block score

The score for a block is derived from its di�culty and the time (in seconds) that haselapsed since the last block:

score = di�culty ≠ time elasped since last block (block score)

5.3 Block creation

The process of creating new blocks is called harvesting. The harvesting account gets thefees for the transactions in the block. This gives the harvester an incentive to add asmany transactions to the block as possible. Any account that has a vested balance of atleast 10,000 XEM is eligible to harvest.

To check if an account is allowed to create a new block at a specific network time, thefollowing variables are calculated:

h = H(generation hash of previous block, public key of account)interpreted as 256-bit integer

t = time in seconds since last blockb = 8999999999 · (importance of the account)d = di�culty for new block

and from that the hit and target integer values:

hit = 254

-----lnA

h

2256

B-----

target = 264

b

dt

The account is allowed to create the new block whenever hit < target. In the caseof delegated harvesting, the importance of the original account is used instead of theimportance of the delegated account.

Since target is proportional to the elapsed time, a new block will be created after acertain amount of time even if all accounts are unlucky and generate a very high hit.

Also note that hit has an exponential distribution. Therefore, the probability to createa new block does not change if the importance is split among many accounts.

Page 18 of 54

5.2 Block score

The score for a block is derived from its di�culty and the time (in seconds) that haselapsed since the last block:

score = di�culty ≠ time elasped since last block (block score)

5.3 Block creation

The process of creating new blocks is called harvesting. The harvesting account gets thefees for the transactions in the block. This gives the harvester an incentive to add asmany transactions to the block as possible. Any account that has a vested balance of atleast 10,000 XEM is eligible to harvest.

To check if an account is allowed to create a new block at a specific network time, thefollowing variables are calculated:

h = H(generation hash of previous block, public key of account)interpreted as 256-bit integer

t = time in seconds since last blockb = 8999999999 · (importance of the account)d = di�culty for new block

and from that the hit and target integer values:

hit = 254

-----lnA

h

2256

B-----

target = 264

b

dt

The account is allowed to create the new block whenever hit < target. In the caseof delegated harvesting, the importance of the original account is used instead of theimportance of the delegated account.

Since target is proportional to the elapsed time, a new block will be created after acertain amount of time even if all accounts are unlucky and generate a very high hit.

Also note that hit has an exponential distribution. Therefore, the probability to createa new block does not change if the importance is split among many accounts.

Page 18 of 54

hit < targetの場合、参加者はブロックを作成できる

Page 36: 日本発、ビットコインを超える NEM とは?

NEMのブロック難易度計算

20,000 25,000 30,000 35,000 40,000 45,000 50,000 55,000 60,00056

58

60

62

64

66

block heightse

cond

s

block times average over 360 blocks

Figure 4: Main net average block times over 360 blocks

If only one block is available, then the block has a predefined initial di�culty of 1014.Otherwise, the di�culty is calculated from the last n blocks the following way:

d = 1n

nÿ

i=1

(di�culty of block i) (average di�culty)

t = 1n

nÿ

i=1

(time to create block i) (average creation time)

di�culty = d60t

(new di�culty)

If the new di�culty is more than 5% greater or smaller than the di�culty of the lastblock, then the change is capped to 5%.

Additionally, di�culties are kept within certain bounds. The new di�culty is clampedto the boundaries if it is greater than 1015 or smaller than 1013.

Simulations and the NEM beta phase have shown that the algorithm produces blockswith an average time of 60 ± 0.5 seconds.

The slow change rate of 5% makes it hard for an attacker with considerably less than50% importance to create a better chain in secret since block times will be considerablyhigher than 60 seconds for the beginning of his secret chain.

Page 17 of 54

平均難易度平均ブロック間の時間新しい難易度

新しい難易度が前のブロックより5%以上と違ったら、5%までとする

Page 37: 日本発、ビットコインを超える NEM とは?

ブロック間の時間• 理想的には60秒、実際にばらつきがある

• ブロック難易度で決める

• NEM:60秒+/-0.5秒

20,000 25,000 30,000 35,000 40,000 45,000 50,000 55,000 60,00056

58

60

62

64

66

block height

seco

nds

block times average over 360 blocks

Figure 4: Main net average block times over 360 blocks

If only one block is available, then the block has a predefined initial di�culty of 1014.Otherwise, the di�culty is calculated from the last n blocks the following way:

d = 1n

nÿ

i=1

(di�culty of block i) (average di�culty)

t = 1n

nÿ

i=1

(time to create block i) (average creation time)

di�culty = d60t

(new di�culty)

If the new di�culty is more than 5% greater or smaller than the di�culty of the lastblock, then the change is capped to 5%.

Additionally, di�culties are kept within certain bounds. The new di�culty is clampedto the boundaries if it is greater than 1015 or smaller than 1013.

Simulations and the NEM beta phase have shown that the algorithm produces blockswith an average time of 60 ± 0.5 seconds.

The slow change rate of 5% makes it hard for an attacker with considerably less than50% importance to create a better chain in secret since block times will be considerablyhigher than 60 seconds for the beginning of his secret chain.

Page 17 of 54

Page 38: 日本発、ビットコインを超える NEM とは?

P2Pデータネットワーク• ビットコインやNEMなどはP2Pでデータを通信して、全てのノードは全てのブロックいわゆるデータを持つ

Page 39: 日本発、ビットコインを超える NEM とは?

ピアとブロック・チェーン同期• ピアがハンド・シェークを合格すると同期が始まる

• ピアのブロック・チェーンのスコア値が自分より高かったら、ピアから400個のブロックまで受信する

• 全てのブロックが取得するまで繰り返す

Page 40: 日本発、ビットコインを超える NEM とは?

BLOCKCHAIN UNWINDING• 正確なブロックを複数あり得るので、ブロックチェーンも複数あり得る為、一番スコア値が高いチェーンだけが存在することとする

• ピアと同期する際、ピアのチェーンの方が高いスコア値を持ちの場合、自分のチェーンから360ブロック(約6時間)までアンワインド(消除)して、書き換える

• これはソフト・フォークと言い、度々発生するものである

Page 41: 日本発、ビットコインを超える NEM とは?

EIGENTRUST++:P2Pネットワークの安全化を向上する

• ブロック・チェーン・プラットフォームではNEMしか利用されていない

• ピアから嘘のデータを受け取った際に、その情報を他のピアと共有することで、ピアの信頼性を計算するアルゴリズムである

• 全てのノードは起動する際、秘密鍵を利用して、公開鍵と付属することになるので、ノードが証明するIDがある

Page 42: 日本発、ビットコインを超える NEM とは?

• 悪意あるピアが常に虚偽データだけを送信する場合のシムレーション結果

0% 10% 20% 30% 40% 50% 60% 70% 80% 90%0

20

40

60

80

0

0.5

0.9

1.1

1.7

1.9

2.3

3

3.3

3.6

0

10

20

30

40

50

60

70

80

90

percentage of malicious nodes

perc

enta

gefa

iled

calls

0% honest data, 0% honest feedback

Eigentrust++Uniform trust

Figure 6: Simulation with attacking nodes that are always dishonest

6.5 Benefits of the reputation system

Having a reputation system for nodes allows nodes to select their communication partneraccording to the trust values for other nodes. This should also help balance the load ofthe network because the selection of the communication partner only depends on a node’shonesty but not its importance.

Simulations show that the algorithm reduces the number of failed interactions consid-erably. If malicious nodes only provide dishonest data and dishonest feedback they areeasily identified (Figure 6).

But even if the malicious nodes collude to give other malicious nodes a high trust valueand provide false data and feedback only to a certain percentage, the trust algorithm stillcuts down the percentage of failed interactions (Figure 7).

Page 24 of 54

EIGENTRUST++

Page 43: 日本発、ビットコインを超える NEM とは?

EIGENTRUST++

0% 10% 20% 30% 40% 50% 60% 70% 80% 90%0

10

20

30

40

50

0

0.4

1

1.7

2.4

3.4

4.9

6.7

8.6

18.9

0

6

12

18

24

30

36

42

48

54

percentage of malicious nodes

perc

enta

gefa

iled

calls

40% honest data, 40% honest feedback

Eigentrust++Uniform trust

Figure 7: Simulation with attacking nodes that are sometimes dishonest

Page 25 of 54

• 悪意ピアが6割虚偽データを送信した場合のシムレーション結果

Page 44: 日本発、ビットコインを超える NEM とは?

KNOWLEDGE PYRAMID

データ情報

智慧知識

アカウント残高等

取引

computation・Dapps

intelligencecrypto 3.0

crypto 2.0

1.0

Page 45: 日本発、ビットコインを超える NEM とは?

2020東京五輪にて• NEMフォン

• 電話や情報通信の全てを暗号化

• 旅券はブロックチェーン上に乗せる

• NEMのノードは分散型インタネットを実現させ、世界どこでも無料なインタネットを利用できる

• 外国人でも他国の通貨を両替せずに日本で買い物できる

• 現段階では税金は特に課税されていないが、政府がブロックチェーン上でJPYのモザイクタイルを作成し、スマートコントラクトによりJPYの取引から手数料が直接得る

• 処方箋はブロックチェーン上で取れる。外国人は日本でも受け取れる

• 身分証明書にもなる

Page 46: 日本発、ビットコインを超える NEM とは?

2020東京五輪にて• モノのインターネット

• メダルの部屋はM-of-Nマルチシグ鍵を利用する

• トイレを使うと自動的に計算して、暗号されたデータはNEMアカウントまで送る

Page 47: 日本発、ビットコインを超える NEM とは?

NEMを利用する会社• 取引所

• 送金サービス

• PhotoMead

• インスタグラムみたいが、写真を商売できる

• Yamfy

Page 48: 日本発、ビットコインを超える NEM とは?

マトメに• ブロック・チェーン技術は分散形情報通信全般に有用な技術であり、送金に限定されない

• 活用の仕方次第で人を活性化する技術となる

• NEMという次世代プラットフォームにより、経済活動及び情報通信に革命を起こすことに目指す

Page 49: 日本発、ビットコインを超える NEM とは?

NODE EXPLORER

http://www.nodeexplorer.com/

Page 50: 日本発、ビットコインを超える NEM とは?

NEMBEX

http://nembex.nem.ninja