(back to top) ⬆️
144 | 145 | # Section 1: EVM Assembly, Opcodes, Yul, & Huff | Horse Store 146 | 147 |
149 |
150 |
151 |
152 |
Horse StoreV1 (Solidity) | 162 |Horse StoreV2 (Solidity) | 163 |
---|---|
168 | View in Remix 169 | | 170 |171 | View in Remix 172 | | 173 |
(back to top) ⬆️
208 | 209 | 210 | # Section 2: Introduction to Formal Verification & Symbolic Execution | Math Master 211 | 212 |
214 |
215 |
216 |
217 |
(back to top) ⬆️
281 | 282 | 283 | # Section 3: Advanced Formal Verification | Gas Bad NFT Marketplace 284 | 285 |
287 |
288 |
289 |
290 |
(back to top) ⬆️
315 | 316 | # Congratulations 317 | 318 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed The Course! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 319 | 320 | ## Where do I go now? 321 | 322 | _Coming soon: The EVM, Assembly, and Formal Verification Course!!_ 323 | 324 | - Competititve Audits 325 | - [CodeHawks](https://codehawks.com) 326 | - We are working on many things to get you more deals. Stay tuned... 327 | - [Code4rena](https://code4rena.com/) 328 | - [Hats Finance](https://hats.finance/) 329 | - [CodeHawks Discord](https://discord.gg/cyfrin) 330 | - Start marketing your services 331 | - Twitter, Farcaster, LinkedIn, etc 332 | - Blogging: Medium, Mirror, etc 333 | - Bug Bounties 334 | - [Immunefi](https://immunefi.com/) 335 | - [Hats Finance](https://hats.finance/) 336 | 337 | ## Learning More 338 | - [Patrick Collins YouTube](https://www.youtube.com/c/patrickcollins) 339 | - [Solodit](https://solodit.xyz/) 340 | - [Block Threat Intelligence](https://newsletter.blockthreat.io?r=2mgsm7) (Referral Link) 341 | - [Consensys Diligence Newsletter](https://consensys.io/diligence/newsletter/) 342 | - [Owen Thurm YouTube](https://www.youtube.com/@0xOwenThurm) 343 | - [The Red Guild YouTube](https://www.youtube.com/channel/UC7bn5DeABT6zQz-bn6GS1Yw) 344 | - [Cyfrin YouTube](https://www.youtube.com/@CyfrinAudits) 345 | 346 | ## Disclosures 347 | 348 | The Cyfrin team runs CodeHawks, Cyfrin Updraft, and private security reviews. They are an advisor to the Peeranha project, and run various blockchain nodes like Chainlink & Ethereum. Additionally, they are responsible for the creation of the Aderyn and Solodit tools. 349 | 350 | # Thank you 351 | 352 | ## Sponsors 353 | 354 | - [Cyfrin](https://www.cyfrin.io/) 355 | - [Updraft](https://updraft.cyfrin.io/) 356 | - [CodeHawks](https://codehawks.com/) 357 | - [Solodit](https://solodit.xyz/) 358 | - [Arbitrum Foundation](https://arbitrum.foundation/) 359 | - [Chainlink Labs](https://chainlinklabs.com/) 360 | 361 | ## Lead Lecturers / Code Builders 362 | 363 | - [Patrick Collins | Cyfrin](https://twitter.com/PatrickAlphaC) 364 | 365 | ## Guest Lecturers 366 | 367 | - [Josselin from Trail of Bits](https://twitter.com/Montyly) 368 | - [Troy from Trail of Bits](https://twitter.com/0xalpharush) 369 | 370 | ## Special thanks 371 | 372 | - [hansfriese](https://twitter.com/hansfriese) 373 | - [carlitox477](https://twitter.com/carlitox477) 374 | - [0Kage](https://twitter.com/hansfriese) 375 | - [giovannidisiena.eth](https://twitter.com/giovannidisiena) 376 | - [Dacian](https://twitter.com/DevDacian) 377 | - [Alex Roan](https://twitter.com/alexroan) 378 | 379 | ## Huge Extra Thank YOU 380 | 381 | Thanks to everyone who is taking, participating in, and working on this course. These courses are passion project data dumps for everyone in the web3 ecosystem. 382 | 383 | Let's level up so we can keep web3 safer, and thank you again for taking this course! 384 | 385 | [](https://twitter.com/cyfrinaudits) 386 | [](https://www.youtube.com/@CyfrinAudits) 387 | 388 |(back to top) ⬆️
389 | -------------------------------------------------------------------------------- /chronological-updates.md: -------------------------------------------------------------------------------- 1 | Please visit [Cyfrin Updraft](https://web3education.dev/) for updates to the course content. -------------------------------------------------------------------------------- /how-to-answer-a-question.md: -------------------------------------------------------------------------------- 1 | # How to answer questions 2 | 3 | Thank you for wanting to answer questions! This is how we grow as a community :) 4 | 5 | 1. Make sure the question follows the "how-to-ask-a-good-question" guide 6 | 2. Make sure your answer unblocks the user 7 | 3. Remember, this is living documentation! 8 | 4. Format your answers, like in the `how-to-ask-a-question` guide. 9 | 10 | 11 | # 1. Make sure the question follows the "how-to-ask-a-good-question" guide 12 | 13 | If the question is poorly formatted and you know how to reformat it reformat it and ask them next time to format their code. 14 | 15 | If the question is posted in the wrong place (like a theoretical question posted on stackoverflow) kindly let them know that it's in the wrong place. 16 | 17 | If the question has already been asked and answered, answer with a link to the question that has already been asked and answered and ask if that solves the problem. 18 | 19 | If the problem has a poor title, doesn't make sense to others, etc, feel free to edit the question to what does if you can understand it. If not, you can answer saying "I don't quite understand what you're asking, could you reformat your question following the "how to ask a question" guide? 20 | 21 | If they used screenshots, feel free to ask them to copy-paste the code. 22 | 23 | Or, feel free to ignore it. This is a community run forum and no one is "entitled to" answers! Be nice, be respectful, and have fun. But if you do know how to help someone, a little "could you please refactor your question" can go a long way! 24 | 25 | ### Don't feel obliged to help right away if they are not asking well-formatted questions. Make them ask a well-formatted question first before you answer! 26 | 27 | But don't be a jerk about it. If they just need a little formatting touch up, just touch up their question for them. 28 | 29 | # 2. Make sure your answer unblocks them 30 | 31 | Often times, people will ask questions where the answer might be X, but they are trying to do Y. Try to anticipate what people are trying to do. Answer the question at face value, and then maybe give more information on where to go next. 32 | 33 | Often, giving a summary of your answer at the top with copy pasteable code, and then a "more information" is a best practice. 34 | 35 | # 3. Remember this is living documentation! 36 | 37 | Treat it as such. Go back and update answers if you find them! 38 | 39 | # 4. Format your answers, like in the `how-to-ask-a-question` guide. 40 | 41 | See that guide for more information. -------------------------------------------------------------------------------- /how-to-ask-a-question.md: -------------------------------------------------------------------------------- 1 | # How to ask a question 2 | 3 | > Note: Before reading this, you might want to read my guide on [top 6 tips to solve any software engineering error](https://medium.com/better-programming/top-6-tips-to-solve-any-software-engineering-error-a794a162fcaf). 4 | 5 | Also note, take this pledge: "I solemnly swear that after asking a question I will spend at least 5 minutes trying to answer someone else's question. I will consult the 'How to answer a question' page before I do so. " 6 | 7 | The internet is our documentation, and we want to treat is as such. **Every** *specific* question we have *should* be able to be found by typing it into a web search bar. 8 | 9 | Now, there are no "bad" questions, but there are poorly-formatted questions. A poorly formatted question has a low chance of being answered, poor chance of being discovered, and can "clutter up" forums and discussion boards. So let's make sure we strive for well-formatted questions! 10 | 11 | # Full Examples at the bottom! 12 | 13 | Here are the steps to ask a well-formatted question: 14 | 15 | 1. Search to see if the question has already been asked 16 | 2. Know where to post your question 17 | 3. Make a title that summarizes the problem 18 | 4. Introduce the problem before writing any code 19 | 5. Make sure you format code using backticks (```) and a language tag 20 | 6. Make sure you copy paste your code instead of using screenshots 21 | 7. Make sure your code is a minimal example 22 | 23 | 24 | # 1. Search to see if the question has already been asked 25 | 26 | ## Do not skip this step! 27 | 28 | We should think of the internet as one giant document. If a question has already been asked and you can find it on the first page of your search engine, it's good! Don't ask the question again! 29 | 30 | And if it's not on the first page of your search results, then **yes, you should 100% ask the question on a forum even if you know the answer.** 31 | 32 | We want every tech question ever to be: 33 | 34 | 1. Indexed by search engines 35 | 2. Easy to find 36 | 3. Easy to reproduce 37 | 38 | So that in 6 months when you forget the answer, you can just google it and it'll show up! 39 | 40 | We don't want there to be multiple questions, because that can fragment where people look! We want to add answers, comments, etc all in one place 41 | 42 | # 2. Know where to post your question 43 | 44 | I categorize questions into one of three: 45 | 46 | - Specific code based questions 47 | - Generic theoretical questions 48 | - "In the know", support, or emergency questions 49 | 50 | ## Specific code based questions 51 | 52 | These are what we strive for. These are reproducible questions that help the world. You'll want to put these questions in places like: 53 | 54 | - The "Q&A" discussions section of this course 55 | - stackoverflow 56 | - stack exchange ETH. 57 | 58 | These are questions that typically can have a "right" or "many right answers". Generally, these are not very opinionated questions. 59 | 60 | These are questions like "How to convert bytes32 to uint256". 61 | 62 | ## Generic Theoretical Questions 63 | 64 | These are questions that likely do not have a canonical answer. These are questions like "which blockchain should I deploy to?" or "How could I make a game that involves many random characters?". They belong in places like: 65 | 66 | - The "General" discussions section of this course 67 | - A generic forum like Reddit, Twitter 68 | - Discord (like some of the ones people have started here) 69 | 70 | Ideally, you put these on an indexed forum like reddit and the general discussions section instead of discord so others can do a web search for the problems. 71 | 72 | ## "In the know", support, or emergency questions 73 | 74 | These are very specific use cases and 99% of your questions will not be these kinds. These are questions like "we just got hacked, can you help us?", "Want to join my team", etc. They are questions that likely only apply to your situation and what you are doing. They belong in: 75 | 76 | - Discord DMs 77 | - Email 78 | - etc 79 | 80 | And should be used *very* sparingly. 81 | 82 | # 3. Make a title that summarizes the problem 83 | 84 | It should be minimal, searchable, indexable (by search engines). 85 | 86 | ## Examples: 87 | Bad: 88 | - I'm stuck, please help 89 | 90 | Good: 91 | - Could Not Detect Network using WSL & Ganache 92 | 93 | Bad: 94 | - hardhat error 95 | 96 | Good: 97 | - TypeError: Cannot read property 'length' of undefined - when deploying contract 98 | 99 | # 4. Introduce the problem before writing any code 100 | 101 | In the body of the question, say what you're trying to do, what you've done, and give a summary of your problem. 102 | 103 | With this course in the discussions tab, you may also give a timestamp of where you're getting the issue (in fact, please give a timestamp with a link to the location in the video). 104 | 105 | # 5. Make sure you format code using backticks (```) and a language tag 106 | 107 | You'll want to format your question so it's as easy as possible to read! Especially with your code snippets. 108 | 109 | Your code should show up like this: 110 | 111 | ```javascript 112 | // my code here 113 | ``` 114 | 115 | In your question, you'll type it like this: 116 | 117 | ```` 118 | ```javascript 119 | // my code here 120 | ``` 121 | ```` 122 | 123 | If it doesn't get formatted, you can edit your question (usually, you can click the three little dots at the top right of your question) to make it formatted nicely. 124 | 125 | # 6. Make sure you copy paste your code instead of using screenshots 126 | 127 | We want web crawlers to index every word you write, so even copy paste errors (and format them with 3 backticks!) 128 | 129 | 130 | # 7. Make sure your code is a minimal example 131 | 132 | There are two types of code questions: 133 | 134 | - Debug me 135 | - Specific questions 136 | 137 | Don't be a "Debug Me" 138 | 139 | ## Example of a poorly formatted question (a debug me question): 140 | 141 | Hi I'm confused my code isn't working here is all my code 142 | 143 | ```javascript 144 | // pretend I pasted like 300 lines of code here 145 | ``` 146 | 147 | ## Example of a much better question 148 | 149 | I'm getting `error x` on line 42 of my code: 150 | 151 | ```javascript 152 | const some_var = "dog" 153 | // this is the line that is erroring 154 | ``` 155 | 156 | [More information on reproducible code.](https://stackoverflow.com/help/minimal-reproducible-example) 157 | 158 | -------------------------------------------------------------------------------- /images/0kage.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/0kage.jpeg -------------------------------------------------------------------------------- /images/aderyn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/aderyn.png -------------------------------------------------------------------------------- /images/background-image-security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/background-image-security.png -------------------------------------------------------------------------------- /images/background-updated.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/background-updated.jpg -------------------------------------------------------------------------------- /images/backgroundv3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/backgroundv3.jpg -------------------------------------------------------------------------------- /images/boss-bridge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/boss-bridge.png -------------------------------------------------------------------------------- /images/course-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/course-background.jpg -------------------------------------------------------------------------------- /images/course-hero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/course-hero.jpg -------------------------------------------------------------------------------- /images/course-post2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/course-post2.jpg -------------------------------------------------------------------------------- /images/course-posts.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/course-posts.jpg -------------------------------------------------------------------------------- /images/curriculum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/curriculum.png -------------------------------------------------------------------------------- /images/gas-bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/gas-bad.png -------------------------------------------------------------------------------- /images/horse-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/horse-store.png -------------------------------------------------------------------------------- /images/math-master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/math-master.png -------------------------------------------------------------------------------- /images/mev-thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/mev-thumbnail.png -------------------------------------------------------------------------------- /images/password-store-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/password-store-logo.png -------------------------------------------------------------------------------- /images/puppy-png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/puppy-png.png -------------------------------------------------------------------------------- /images/red-guild-png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/red-guild-png.png -------------------------------------------------------------------------------- /images/t-swap-youtube-dimensions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/t-swap-youtube-dimensions.png -------------------------------------------------------------------------------- /images/the-red-guild.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/the-red-guild.jpeg -------------------------------------------------------------------------------- /images/tincho-is-a-monster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/tincho-is-a-monster.png -------------------------------------------------------------------------------- /images/tincho.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/tincho.jpeg -------------------------------------------------------------------------------- /images/top-10-attack-vectors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/top-10-attack-vectors.png -------------------------------------------------------------------------------- /images/top-attack-vectors-updated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/top-attack-vectors-updated.png -------------------------------------------------------------------------------- /images/updraft-landing-p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/updraft-landing-p.png -------------------------------------------------------------------------------- /images/vault-guardians-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/vault-guardians-logo.png -------------------------------------------------------------------------------- /images/vault-guardians.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyfrin/assembly-evm-opcodes-and-formal-verification-course/e1419bc2a33aaab477a797e810c1e55290d73e21/images/vault-guardians.png -------------------------------------------------------------------------------- /improvement_points.md: -------------------------------------------------------------------------------- 1 | 1. SEAL Drills --------------------------------------------------------------------------------