LoginSignup
1
1

More than 1 year has passed since last update.

Tezos をデリゲートする

Posted at

Tezos では、ブロックチェーンのブロックを生成することを Baking と呼び、それをする人を Baker と呼ぶ。 BitCoin に於けるマイナーのようなもので、このブロック生成作業( Baking と呼ばれる)に従事すると手数料を受け取ることができるらしい。

加えて(というかこっちが Baker であることの主要な利点なのかもしれないけど)、 Baker は Tezos ネットワークにおけるオンチェーンガバナンスの投票を行う権利を持つ。今後の Tezos をどうするのか、という意志決定に一枚噛むことができるというわけだ。

Baker

Baker になるには、 1roll 以上の Tezos を保有している必要がある。保有する Tezos が多ければ多いほど、 Baking の機会が多く回ってくるようになっていて、その分手数料を沢山もらえるという寸法だ。

しかし Tezos の 1roll は今のところ 8000 XTZ である(2021年8月現在のレートだと日本円で400万円くらい)。結構な初期投資をしないと Baker にはなれない。

デリゲート

では、 1roll 未満の Tezos しか持たない人は Tezos に関して何の権利も持てないかというと、そんなことは無くて、デリゲートと呼ばれる仕組みで影響を及ぼすことができる。

デリゲートというのは、言葉通り、自身の保有する Tezos を他の Baker に委任( Delegate )する操作らしい。この委任された Tezos は、委任先の Baker の保有 Tezos の一部として数えられるのだけど、 Baker はその Tezos を取引に使ったりすることはできず(自分のものじゃないからね)、デリゲートした者は好きなタイミングでその Tezos を取り戻すことができる。
委任先の Baker が Baking や Endorsement (生成されたブロックを検証する作業)を行い報酬を得た場合、その報酬は、デリゲートを行っている者に(多分)デリゲートした Tezos の分量に応じて分配される。

つまりデリゲートを通じて、全ての Tezos 保有者は Baking や Endorsement の報酬を得ることができるし、デリゲートされた Baker は見かけ上の保有 Tezos を増やすことで、ブロック生成件を得やすくなったり、投票における重みを増したりできるわけだ。

前回私が試しに1万円で購入した Tezos は僅か 30 XTZ で、とても Baker にはなれないが、デリゲートすることは可能である。

というわけで、この Tezos をデリゲートしてみよう。

デリゲートを行う

保有する Tezos を適当な Baker にデリゲートしてみる。

デリゲート先の Baker を決める

TZSTATS ( Tezos のブロックエクスプローラ)を使って、適当な Baker を探してみる。左のメニューから Baker について調べることができる。
正直それぞれの数字の見方がよくわからないし、どういう基準でデリゲートすれば報酬を獲得しやすくなるかも計算できていないのだが、何となく信頼度が高そうでデリゲート最低額が保有 Tezos よりも多くないものの中から一つ選んでみる。

これにしよう。
https://tzstats.com/tz1ei4WtWEMEJekSv8qDnu9PExG6Q8HgRGr3

保有 Tezos をデリゲートする

デリゲートはアカウント単位で行う。持っている Tezos の一部だけをデリゲートしたいのであれば、別にアカウントを作ってそちらに送金する必要があるのだろうが、今回は保有 Tezos 全額をデリゲートするので今あるアカウントをそのまま使う。

コマンドラインからデリゲートを行う。
まずは dry run してみよう。

$ tezos-client -E http://127.0.0.1:8732 set delegate for cedretaber to tz1ei4WtWEMEJekSv8qDnu9PExG6Q8HgRGr3 --dry-run
Disclaimer:
  The  Tezos  network  is  a  new  blockchain technology.
  Users are  solely responsible  for any risks associated
  with usage of the Tezos network.  Users should do their
  own  research to determine  if Tezos is the appropriate
  platform for their needs and should apply judgement and
  care in their network interactions.

Node is bootstrapped.
Estimated storage: no bytes added
Estimated gas: 1000 units (will add 100 for safety)
Estimated storage: no bytes added
Enter password for encrypted key:
Operation: 0x4c3086493369c49b54775dfeae125c4cb5cfcf95c0276ec2eb00d42c854f55d56b003a51d241cb4c2943e63fe6aacf275b246bd22a00e802f2979409e8070000377913de0900c4e6c056c4313e719d18d8e5a23627653728730fd3da67ef6fae6e003a51d241cb4c2943e63fe6aacf275b246bd22a008702f3979409cc0800ff00d12d9375bec33b9bfab7e3072de6d3ff01e414e6e32b8bb4e4370aa72ecc58d2baa835fbaec7e7efd183e08b1b57f847c1e651b3a8a629f5ac70a2007283ce1a0f84ec8295a6a17bc6cc5241e2f7af93d9f17608
Operation hash is 'op3gjgvmHxq2YHdDVciKpX69nD6axbxSUGMijygWQ7nMMaGDoHF'
Simulation result:
  Manager signed operations:
    From: tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK
    Fee to the baker: ꜩ0.00036
    Expected counter: 19205106
    Gas limit: 1000
    Storage limit: 0 bytes
    Balance updates:
      tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK .................. -ꜩ0.00036
      fees(the baker who will include this operation,385) ... +ꜩ0.00036
    Revelation of manager public key:
      Contract: tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK
      Key: edpku4evGPQSM4aXCjSvGrWu7Szfq6mKHYWqJpomWgeM2SGeNyht83
      This revelation was successfully applied
      Consumed gas: 1000
  Manager signed operations:
    From: tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK
    Fee to the baker: ꜩ0.000263
    Expected counter: 19205107
    Gas limit: 1100
    Storage limit: 0 bytes
    Balance updates:
      tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK .................. -ꜩ0.000263
      fees(the baker who will include this operation,385) ... +ꜩ0.000263
    Delegation:
      Contract: tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK
      To: tz1ei4WtWEMEJekSv8qDnu9PExG6Q8HgRGr3
      This delegation was successfully applied
      Consumed gas: 1000

デリゲートするにも手数料がかかることがわかる。

特に問題無さそうなので、このままデリゲートしてしまおう。

$ tezos-client -E http://127.0.0.1:8732 set delegate for cedretaber to tz1ei4WtWEMEJekSv8qDnu9PExG6Q8HgRGr3
Disclaimer:
  The  Tezos  network  is  a  new  blockchain technology.
  Users are  solely responsible  for any risks associated
  with usage of the Tezos network.  Users should do their
  own  research to determine  if Tezos is the appropriate
  platform for their needs and should apply judgement and
  care in their network interactions.

Node is bootstrapped.
Estimated storage: no bytes added
Estimated gas: 1000 units (will add 100 for safety)
Estimated storage: no bytes added
Enter password for encrypted key:
Operation successfully injected in the node.
Operation hash is 'op2pPEEEdkpSKgjkAfZye7fuaA7HAeHtAPzQUGHQaRpeLwuJ2Hu'
Waiting for the operation to be included...
Operation found in block: BKx8vgSSCd2Lmsg8p1BzU6F9ZghYc7vc9rERJjcAUPB9JaJVmau (pass: 3, offset: 2)
This sequence of operations was run:
  Manager signed operations:
    From: tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK
    Fee to the baker: ꜩ0.00036
    Expected counter: 19205106
    Gas limit: 1000
    Storage limit: 0 bytes
    Balance updates:
      tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK ............. -ꜩ0.00036
      fees(tz1gfArv665EUkSg2ojMBzcbfwuPxAvqPvjo,385) ... +ꜩ0.00036
    Revelation of manager public key:
      Contract: tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK
      Key: edpku4evGPQSM4aXCjSvGrWu7Szfq6mKHYWqJpomWgeM2SGeNyht83
      This revelation was successfully applied
      Consumed gas: 1000
  Manager signed operations:
    From: tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK
    Fee to the baker: ꜩ0.000263
    Expected counter: 19205107
    Gas limit: 1100
    Storage limit: 0 bytes
    Balance updates:
      tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK ............. -ꜩ0.000263
      fees(tz1gfArv665EUkSg2ojMBzcbfwuPxAvqPvjo,385) ... +ꜩ0.000263
    Delegation:
      Contract: tz1QxPuHn7Vrpz6qqGzGGUUgaQqSVnXcgPyK
      To: tz1ei4WtWEMEJekSv8qDnu9PExG6Q8HgRGr3
      This delegation was successfully applied
      Consumed gas: 1000

The operation has only been included 0 blocks ago.
We recommend to wait more.
Use command
  tezos-client wait for op2pPEEEdkpSKgjkAfZye7fuaA7HAeHtAPzQUGHQaRpeLwuJ2Hu to be included --confirmations 30 --branch BLJPKiyvRUhyrwphdDKBCibNgf93hineKQwtL2hvHmqz9u4umPp
and/or an external block explorer.

さて、自分のアカウントを確認する。

$ tezos-client -E http://127.0.0.1:8732 get balance for cedretaber
Disclaimer:
  The  Tezos  network  is  a  new  blockchain technology.
  Users are  solely responsible  for any risks associated
  with usage of the Tezos network.  Users should do their
  own  research to determine  if Tezos is the appropriate
  platform for their needs and should apply judgement and
  care in their network interactions.

29.999377 ꜩ

減っているのは手数料の分だ。
デリゲートしても、 Tezos 自体は自分のアカウントに残っていることがわかる。

TZSTATS で自分のアカウントを確認すれば、いつ報酬が発生するのか、いつ支払われるのかを確認することができる。
どのくらい報酬が入るのか、楽しみに待っていよう。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1