The 9 Keys To Developing Secure Smart Contracts

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024

Комментарии • 7

  • @latenightai3146
    @latenightai3146 6 месяцев назад +5

    1. Less code.
    2. Spend considerable time thinking about the design.
    3. Only allow the user to interact with the protocol exactly how we expect.
    4. Handle all cases, insolvent liquidations.
    5. Avoid for loops (where possible).
    6. Never use parallel data structures.
    7. External Calls.
    a. DoS
    b. Gas Griefing
    c. return data
    d. reentrancy
    8. Post-checks (invariant checks.
    9. Documentation
    Thanks Owen for covering this up.

  • @alexbabits770
    @alexbabits770 6 месяцев назад +2

    I took a break from auditing to build my own project for fun/learning after getting inspired by all the codebases I audited. I have a lot more respect for good devs who are security minded and can write condensed clean code.
    I had a fairly straightforward idea, and figured it would be like 200-300 LOC. I did all the mistakes, jumping in without a lot of thought on structure, and had to refactor its architecture many times. It's ~500 SLOC with very sound architecture and cleanliness now. There were so many edge cases and bugs that I thought of and fixed during the building phase though, which I'm proud of, and also gave ideas for audits.
    I realized that invariants can be one of the creative parts of auditing. During building I realized "Oh yeah, X should never change. Or Y should always be true". And they aren't all obvious immediately, and sometimes require deep understanding of the possible states and goal of the protocol.

    • @0xOwenThurm
      @0xOwenThurm  6 месяцев назад

      100%
      Invariant driven development is a very interesting idea

  • @deficrypto1234
    @deficrypto1234 4 месяца назад

    It will be interesting to know how Mutation testing works with less or verbose code.

  • @SK-vg3mw
    @SK-vg3mw 6 месяцев назад

    Thank you Sir!

    • @0xOwenThurm
      @0xOwenThurm  6 месяцев назад +1

      Ty for watching ser!

  • @kwameantwi8429
    @kwameantwi8429 5 месяцев назад

    🔥