Dear @davido;
This donkey does not in anyway represent the people of the north, we from the north and Nigeria in particular really commend what you did and will be willing to support you on this cause.
Don't bother yourself with the opinion of this donkey, we will deal with him from here.
Best regard;
A fan, and a patriotic citizen.
Thank you.
48 hours have passed… and the moment of truth has arrived. 🎃
The mystery behind the silent shelves has been revealed - Wild West. 🤠
Quest #3
👻 Enter the Spirit Harvest Vault and find the bug… if you dare
How to do uniswapV2 by yourself without any tutorial 🧵 (Save it for later)
Stage 1 :-Prerequisites
Step 1. Complete solidity and foundry fundamentals by @CyfrinUpdraft or anything you like.
2. Learn ERC20 and build it from scratch (Not by importing). You can use openzeppelin ERC20 contract for that.
Stage2- UniswapV2 core
3. Open uniswap v2-core repo (https://t.co/OSVHRHr29S) and inside contracts/interfaces you will find all the interfaces written, write it and try to get an idea of it using common sense and AI.
4. Write UniswapV2ERC20.sol (That's why I told to learn ERC20 first, you will need it here) and try to understand permit function (very important)
5. Write UniswapV2pair.sol, try to understand mint, swap, and burn function (In order). This is the main logic of uniswapV2 contract, understand it and you will know much of how uniswapV2 works.
6. Write UniswapV2Factory.sol. This is short but crucial. It's the place where you deploy pair contract. Focus on create2 opcode (It's beautiful)
7. Write MockERC20 contracts. This must be written as you need to deploy tokens before creating a pair out of it (You need it because you are not using mainnet address of ERC20 like USDC,etc). Deploy your own Mock token with your desired name and symbol. You will need the address of these token to deploy factory contract.
8. Write tests between step3- step6 and also use remix initially to test the contracts. But remember if you proceed ahead of step 8 then dont write much test as you will be using router to call functions in pair and factory contract.
Stage 3 :- Router/Periphery contract
You can stop here but the thing is users dont directly interact with this contract . Uniswap has intentionally created a contract on top of it called uniswap-periphery (https://t.co/7v1OzOYUtx). Understand it to reach next level
9. You just need to write Router02.sol and one WETH (weth9.sol) mock in this step. It wont be much difficult if you did Stage 2 well.
10. Write a lot of tests. It will help you understand the contracts much better along with testing skills getting better.
Note:- You dont need to write Router01.sol as it's just a subset of Router02.sol created to migrate peoples fund from one uniswap version to another. I wrote it and wasted my time.
Resources and suggestions 👇
1. This repo will save you a lot of time when you get stuck. It's my 3 weeks of hardwork
https://t.co/I8YKVN4FCn
2. Make google and AI your friend.
3. Took me 3 weeks to do it (from step2). So have patience and keep learning through lots of trial and error.
4. Completing it will make you very fast in terms of learning if you do it right.
As a beginner security auditor
Please remember:
Not to use AI heavily during learning process.
> You need develop "attacker mindset"
> You need have "deep code familiarity"
> You need learn "code reasoning"
Over-reliance on AI can lead to superficial knowledge
GM CT 🤍
Cysic ComputeFi is giving true ownership without limits
Empowering users, not platforms.
Tag your most active mutual
Let’s see who’s really building with you