Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Hedera API: Cryptocurrency 101 | Hedera18

175 views

Published on

YouTube Video
https://youtu.be/OI7oT9Knnlc

Speaker
Craig Drabik | Technical Lead | TxMQ, Inc.

Abstract
Hedera Cryptocurrency is a Hedera Hashgraph platform service that allows decentralized application developers to pay for services on the Hedera public network. With the Hedera API, developers can pay node fees, service fees, and transaction fees required by their dapp, as well as incorporate the Hedera cryptocurrency into their dapp. Due to expert efficiency and low fees, Hedera Hashgraph is the first DLT to make cryptocurrency microtransactions practical. In this session, Craig Drabik, Technical Lead at TxMQ, Inc., will take a deep dive into the Hedera API from a cryptocurrency perspective, conduct live API demonstrations, and talk real-world use cases.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Hedera API: Cryptocurrency 101 | Hedera18

  1. 1. CraigDrabik Technical Lead
  2. 2. Hedera API: Cryptocurrency 101
  3. 3. OVERVIEW Roles that cryptocurrency plays on Hedera
 Basic Concepts: Transaction Lifecycle,
 Accounts, Keys, Signatures
 Hedera Cryptocurrency API Services
 Hedera Cryptocurrency Goodies
  4. 4. Why Does Hedera Need a Cryptocurrency?
  5. 5. Security Why Crypto? Cryptocurrency has an important role in securing the network by providing economic barriers to certain kinds of attacks and disruptions • Nodes must be staked, and nodes’ votes are weighted by stake • Fees for transactions discourage transaction-based attacks • Encourages efficient use of resources by DApps 6
  6. 6. Incentivize Participation Why Crypto? Network participants provide computing resources to anyone with a key pair. The survival of the network relies on the ongoing operation of each node. • Node Fees: Nodes receive payments from clients for transactions they submit to the network • Network Fees: Nodes receive incentive payments for participating in consensus • Service Fees: Nodes receive payments for services such as storing files or executing smart contracts
  7. 7. Micropayments Why Crypto? Hedera payments are fast, secure, and very low cost • Fees for services can be very small, on the order of fractions of a cent • There are no banking, credit card, or 3rd party fees. • Transfers are instantaneous 8
  8. 8. Basic Hedera Concepts
  9. 9. •Accounts •Keys and Signatures •Transaction Lifecycle Building Blocks Hedera Cryptocurrency
  10. 10. A Hedera account is: • An identifier • The key or keys associated with an account • Thresholds for: ‣ When a record is automatically generated ‣ When the recipient of a transfer must counter-sign • Auto-renew period Hedera Accounts
  11. 11. Hedera Keys Hedera keys can be.. • ECDSA384, RSA3072, or ED25519 format keys • A smart contract can act as a key • A key list • A “threshold key list” • A nested structure of the above*
  12. 12. Hedera Signatures Hedera natively supports multi-sig. Signatures must match the account’s key structure • Transactions for a single-key account must be signed by that key • Transactions for a list of keys must be signed by all keys in the list • Transactions for a threshold key list must be signed by enough keys in the list • Signatures for nested key structures must match the key structure
  13. 13. Hedera Transaction Lifecycle
  14. 14. Hedera Cryptocurrency API
  15. 15. Hedera Cryptocurrency API Operations • Create or delete an account • Update account information • Transfer funds • Proxy stake • Claims
  16. 16. Hedera API: Account Transactions To create a Hedera account.. • The account must be created and funded by another account • The account number is generated by the network • The account is associated with a shard and realm
  17. 17. Hedera API: Account Transactions To delete a Hedera account.. • The delete is a “soft delete” • The account isn’t destroyed until it can no longer auto-renew • The ability to generate a record containing a state proof requires the account to continue to exist for a certain period of time
  18. 18. Demo: Create an Account
  19. 19. Hedera API: Crypto Transactions • Get account balance • Transfer funds • Add or revoke claims
  20. 20. Hedera API: Transfer Lists Transfers on Hedera have the ability to bundle multiple payers and payees in a single transfer transaction • Limited to 10 accounts* • Can include payers and payees in any combination • Must be zero-sum
  21. 21. Demo: Transfer Funds
  22. 22. Use Case: Corporate Acquisition
  23. 23. Hedera API How to sell a company on Hedera Consider a scenario where Hooli has entered into negotiations to purchase Pied Piper. Both companies have agreed to use Hedera to document that both companies agree to the sale, and to make payment. • Pied Piper is a small company, but the sale still needs a majority of the business leaders to agree to the sale • Hooli is a big company, and the acquisition must have sign-off from the CEO, finance, risk, and the board
  24. 24. Hedera API How to sell a company on Hedera Pied Piper’s signature requirement can be modeled using a threshold key list. • Pied Piper sets up an account on Hedera. Richard, Monica, Jared, Dinesh, and Gilfoyle all supply their public keys for the list. • Three of the five must sign in order for the sale to continue.
  25. 25. Hedera API How to sell a company on Hedera Hooli’s situation is more complicated. The CEO and CFO must agree individually, the board needs a majority vote, and risk requires the unanimous approval of their leadership to approve the acquisition. •At the top level, we use a key list that requires signatures from every key in the list. •The CEO and CFO keys are traditional
 single-party keys •Risk’s key is itself a key list that requires
 signatures from every key in the list •The board’s key is itself a threshold key list
 that requires signatures from a majority
 of board members
  26. 26. Hedera API How to sell a company on Hedera Both sides must produce valid signatures that
 match the accounts’ specific structures or the transaction will be rejected by the network. 
 Payment will only be made if… •Three of Richard, Monica, Jared, Dinesh, and
 Gilfoyle must sign AND •Gavin must sign AND •Hooli’s CFO must sign AND •Every risk leader must sign AND •A majority of the Hooli board must sign …otherwise the transaction will be rejected by the network and funds will not be transferred
  27. 27. Questions

×