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

Managing a legacy Dapp

Managing a legacy Dapp

1eecfce54b4f902784d046328935efd4?s=128

Makoto Inoue

March 09, 2018
Tweet

More Decks by Makoto Inoue

Other Decks in Programming

Transcript

  1. Managing a legacy Dapp @makoto_inoue BlockParty

  2. Topics - The legacy Dapp in action

  3. Topics - The legacy Dapp in action - Evolution of

    the code
  4. Topics - The legacy Dapp in action - Evolution of

    the code - Running on mainnet
  5. The legacy Dapp in Action

  6. - High expectation What is BlockParty? - Solving 50% problem

    Reality
  7. - High expectation - Harsh reality What is BlockParty? -

    Solving 50% problem https://www.nytimes.com/interactive/2017/01/20/us/politics/trump-inauguration-crowd.html
  8. What is BlockParty? - How?

  9. “I went to a party and got extra Ether as

    payout!!”
  10. Flow

  11. register(“@makoto_inoue”) Admin User

  12. attend([“0x123…”, “0x456…”, “0x789…”) Admin

  13. payback() Admin

  14. withdraw() User

  15. Meetups & Parties

  16. Meetups & Parties

  17. Meetups & Parties

  18. Attendance rate

  19. Payouts

  20. Edcon post conference lunch (19/2/2017)

  21. http://noblockno.party (11/3/2018)

  22. Evolution of the code

  23. The initial commit

  24. The initial commit

  25. The initial commit

  26. The code

  27. The code No version number No “payable” keyword No error

    when missing public
  28. The code

  29. throw vs return - No error message - Swallow all

    gas (used to be)
  30. throw vs return - Can emit Event - Potentially unsecure?

  31. The “Bloody October”

  32. The “Bloody October”

  33. Byzantine HF

  34. throw vs return => require/assert/revert

  35. Pull over Push

  36. The DAO (30th April - 17th June 2016 )

  37. 0xbb9bc244d798123f...

  38. The consequence

  39. The 7th day

  40. Did participants know about this?

  41. What should I do with the money?

  42. Did I donate?

  43. Then what happened?

  44. How did that happen?

  45. Am I the only fool?

  46. Share the best practices!!

  47. Share the best practices!!

  48. Running on mainnet

  49. Gas price, gas price, gas price

  50. The power of “default”

  51. Gas price, gas price, gas price

  52. The power of “default”

  53. The power of “default”

  54. The power of measuring

  55. The power of measuring

  56. But be careful...

  57. Summary

  58. Lessons learnt - Solidity evolves - “The best practices” evolve

    - You only learn certain stuff on mainnet
  59. How do you learn?

  60. Move fast And break things http://uslaunchreport.com

  61. Move fast And break things http://uslaunchreport.com http://giftrunk.com/gif/trampoline-pool-jump-fail

  62. How do you learn (by failing) - Stake small

  63. How do you learn (by failing) - Stake small -

    Know your customer (doesn’t have to be full ID check)
  64. How do you learn (by failing) - Stake small -

    Know your customer (doesn’t have to be full ID check) - Deploy often
  65. Thanks! @makoto_inoue http://ethcc.noblockno.party