🤖 Self-studying AI, Big Data, Data Science •
TensorFlow, Scikit-learn, Keras, Python •
@numerai newbie •
#100DaysOfCode #100DaysOfDefi challenges •
May 27, 2022 • 9 tweets • 4 min read
Day 75 of #100DaysOfDeFI 🚀 today 3/4 of the challenge is done! 🎉 Also today I finish exploring Solidity vulnerabilities with learning about Denial of service (DoS) attacks 🦹🏼♀️ #womenwhocode#100DaysOfCode
How it works 🧵 1/ There are many ways to attack a smart contract and at some point create a DoS⚡
May 26, 2022 • 8 tweets • 4 min read
Day 74 of #100DaysOfDeFI 🚀 Today I learned about Delegate Call vulnerability in #Solidity 🦹🏼♀️ When using delegatecall opcode one should be careful because wrong usage will lead to unexpected results ⚠️ #womenwhocode#100DaysOfCode
How it works 🧵 1/ What delegatecall is? When contract A uses delegatecall to call contract B it means that the contract B code will be executed inside context of the contract A: storage, msg.sender, msg.value, msg.data, etc will be the A’s context.
May 25, 2022 • 5 tweets • 2 min read
Day 73 of #100DaysOfDeFI 🚀 Learned about Self Destruct vulnerability in #Solidity 🦹🏼♀️ Selfdestruct deletes the contract from the blockchain and and sends all Ether to a designated address 💸 In some scenarios it can lead to unexpected problems ❌ #100DaysOfCode
How it works 🧵 1/ Let’s see how it works with an example of a simple game 🎲 Players send to the contract 1 token 🪙 the one who deposits the fifth token wins 🏆
Game code 👇
May 24, 2022 • 7 tweets • 3 min read
Day 72 of #100DaysOfDeFI 🚀 Today I looked at arithmetic Over/Under Flows in #Solidity 👾 This vulnerability been secured by the current Solidity version 🦸♂️ Nevertheless, it is important to understand what it is and how to avoid it 👩🏻💻 #womenwhocode#100DaysOfCode
Summary 🧵 1/ An overflow in Solidity occurs when a number is incremented beyond its maximum value. For example, if we have a uint8 with a value of 255 and increment it by 1, it will “reset” and set a value to 0. Remember, the maximum value for uint8 is 255❗
May 23, 2022 • 11 tweets • 3 min read
Day 71 of #100DaysOfDeFI 🚀 looked at Re-Entrancy vulnerability🦹🏻 It is one of the most destructive attacks in the #Solidity smart contracts 💸 The untrusted contract that exploits the vulnerability is able to drain all user's funds 🚰 #100DaysOfCode
How it works 🧵 1/ To make it happen, there should be 2 contracts: a vulnerable contract and an attacker’s contract 👺
May 18, 2022 • 8 tweets • 3 min read
Day 68 of #100DaysOfDeFI 🚀 Today I worked on the Factory smart contract that is a part of the decentralized exchange architecture 💱 Factory creates and keeps track of all Pair contracts 👩🏻💻 #womenwhocode#100DaysOfCode
Summary 🧵 1/ The Factory will include:
🔷 createPair - create a Liquidity Pool;
🔷 adjustAmount - adjust a number of tokens using a formula;
🔷 getReserves - a getter function;
🔷 addLiquidity - add liquidity to the LP;
🔷 removeLiquidity - withdraw liquidity;
🔷 trade1for2 - swap tokens.
May 17, 2022 • 7 tweets • 3 min read
Day 67 of #100DaysOfDeFI 🚀 Today I continued creating a basic DEX 👩🏻💻 and focused on developing a Pair smart contract 👾 Pair represents the Liquidity Pool 🪙 it is in charge of swapping 💱 managing the liquidity pool and burning 🔥 #womenwhocode#100DaysOfCode
Summary 🧵 1/ In this example of the Pair smart contract I’ll implement the following methods:
🔶 getReservers - get quantities of each token;
🔶 updateReserves - update the tokens’ quantities;
🔶 swap - exchange two tokens;
🔶 withdrawTokens - send the tokens back to the LP.
May 16, 2022 • 6 tweets • 3 min read
Day 66 of #100DaysOfDeFI 🚀 Today and the following days I'll dive into DEXs implementation in #Solidity ⭐️ I’ll review the Uniswap smart contracts and create a decentralized exchange protocol 👩🏻💻 #womenwhocode#100DaysOfCode
Summary 🧵 1/ Uniswap smart contract architecture consists of Core and Periphery:
🔹 Core is used for storing and swapping the tokens, adding funds, getting rewards, etc;
🔹 Periphery interacts with the Core.
May 11, 2022 • 9 tweets • 4 min read
Day 63 of #100DaysOfDeFI 🚀 Today I learned how to deploy an NFT collection on a testnet 🤖 and uploaded a collection of watermelon houses generated with AI on OpenSea 🐳 special thanks to @javilop for creating these cute houses! 🍉 #womenwhocode#100DaysOfCode
Summary 🧵 1/ First, upload a collection of images on Pinata, I described it in detail on day 56 of the challenge 🔙
May 10, 2022 • 7 tweets • 4 min read
Day 62 of #100DaysOfDeFI 🚀 Today I continued deploying smart contracts on Ethereum testnet Rinkeby and uploaded a duck 🦆 NFT on OpenSea 👩🏻💻 #womenwhocode#100DaysOfCode
Summary 🧵 1/ First, prepare the jpeg file and metadata for the NFT. We’ll use Pinata platform for hosting files 🦙 A jpeg is an image we want to deploy as an NFT and a json file is the metadata. So, create an account in pinata.cloud and first upload the image.
May 9, 2022 • 9 tweets • 4 min read
Day 61 of #100DaysOfDeFI 🚀 Today I learned how to deploy tokens on Ethereum testnet 👾 for this I will use Rinkeby testnet and Remix IDE for developing smart contract 👩🏻💻 #womenwhocode#100DaysOfCode
Summary 🧵 1/ Use code from the day 57 of the challenge to create ERC20 tokens 👇
Feb 24, 2022 • 4 tweets • 3 min read
Day 9 of #100DaysOfDeFI 🚀 today exploring Zapper.fi. Zapper is a decentralized finance tool ⚒️ It allows users to monitor their assets💰 debts, liquidity pools, yield-farming 👨🌾 NFTs 🖼️ etc. in one place. #100DaysOfWeb3#WomenInCrypto
Summary 🧵 1. Creating an account is simple - you just need to connect your wallet to @zapper_fi
Summary 🧵 1. @coinbase
To open an account on Coinbase you’ll need pass an identity verification and add a payment method. After completing the steps you’ll be able to operate on it.
Wallet types 🧵 1. Software wallet #MetaMask is on of them. Users can access to the majority of #DeFi applications by connecting to MetaMask wallet. Installing MetaMask is intuitive and is available on metamask.io. I already have it!