1 of 19

push.org/bootcamp

2 of 19

Understanding Smart Contract Development and Web3 Wallets

Session 2

push.org/bootcamp

3 of 19

Coming up…

1:00 PM

Understanding public key cryptography & digital signatures

1:15 PM

Evolution and Types of web3 wallet

1:30 PM

Setting up a web3 wallet

1:50 PM

Introduction to smart contract development

2:20 PM

Break

3: 00 PM

Introduction Smart Contract Security

push.org/bootcamp

4 of 19

Understanding public key cryptography & digital signatures

​

Definition : Cryptography is the practice of developing and using coded algorithms to protect and obscure transmitted information so that it may only be read by those with the permission and ability to decrypt it. Put differently, cryptography obscures communications so that unauthorized parties are unable to access them. - IBM

​

Types

  • Symmetric Cryptography
  • Asymmetric Cryptography

Introduction to Cryptography

push.org/bootcamp

5 of 19

Understanding public key cryptography & digital signatures

​

Source - Grokking Bitcoin

push.org/bootcamp

6 of 19

Evolution of web3 Wallets

“At a high level, a wallet is a software application that serves as the primary user interface to Ethereum. The wallet controls access to a user’s money, managing keys and addresses, tracking the balance, and creating and signing transactions” - Mastering Ethereum

​

​

Need of Web3 wallets

  • Storing private key securely
  • Multi Chain asset management
  • Better UX / DevX for interaction with dapps

Source - 101blockchains.com

push.org/bootcamp

7 of 19

Types of Wallets

Hot Wallets

  • Browser Wallets - Metamask
  • Desktop Wallets - Electrum
  • Mobile Wallets - Trust

Cold Wallets

  • Hardware Wallets
  • Paper Wallets

Security Comparison: Cold wallets offer superior security with offline storage, minimizing risk of cyber attacks.

​

Accessibility Aspect: Hot wallets provide instant access for frequent transactions, ideal for daily use.

​

Convenience Consideration: Cold wallets are convenient for storing large amounts securely over time.

​

push.org/bootcamp

8 of 19

Types of Wallets

Custodial Wallets

  • Third party (usually a crypto exchange) is responsible for managing your private keys.
  • Easy recovery in case user forgets the password
  • Better UX since no signatures are required from user again and again
  • Loss / blocking of funds in case of third party crisis or bankruptcy. Eg - FTX, Vauld

Non - Custodial or Self Custodial Wallets

  • Owner is responsible for for storing and managing your private keys
  • Recovery not possible in case private keys / seed phrase is lost.
  • User needs to sign for every onchain action affecting UX
  • No need to trust any third party

push.org/bootcamp

9 of 19

Types of Wallets

Smart Contract Wallets

  • Programmable wallets built on top of smart contracts ie smart contracts are used to manage assets on blockchain.
  • Enables features like social recovery, threshold signatures etc
  • Usually more gas expensive since every transaction is called by smart contracts. Eg - Safe, Argent wallet etc.

Multi Party Computation ( MPC ) Wallets

  • Uses MPC technology to secure cryptocurrency transactions by splitting the private key across multiple parties. No single party can access the complete key alone, requiring collective authorization for transactions.
  • Reduces risk by distributing key management.
  • Low transaction costs as compared to smart contract wallets

​

Account Abstraction - Moving away from EOA’s

push.org/bootcamp

10 of 19

Setting up a Web3 Wallet

  • Setting up Metamask
  • Adding different chains
  • Sending transactions
  • Adding custom tokens
  • Interacting with blockchain using explorer and dapps

push.org/bootcamp

11 of 19

Introduction to Smart Contract Development

Which Language to Choose ?

Which chain should I build on ?

Source - defillama

push.org/bootcamp

12 of 19

Introduction to Smart Contract Development

​

Smart Contract Development Frameworks / Tools

​

​

push.org/bootcamp

13 of 19

Introduction to Smart Contract Development

​

​

Introduction to Remix IDE

push.org/bootcamp

14 of 19

Introduction to Smart Contract Development

​

​

Enough talk, Let's start Coding

​

​

push.org/bootcamp

15 of 19

Introduction to Smart Contract Development

​

​

Oracles

​

​

Definition:

Blockchain oracles are entities that connect blockchains to external systems, thereby enabling smart contracts to execute based upon inputs and outputs from the real world. - Chainlink

​

Use Cases:

  • DeFi
  • Dynamic NFTs
  • Gaming
  • Insurance

​

Discussing The Oracle Problem

​

push.org/bootcamp

16 of 19

Introduction to Smart Contract Security

Why is it important ?

push.org/bootcamp

17 of 19

Introduction to Smart Contract Security

​

  • Logical Errors in code
  • Reentrancy attacks
  • Integer Overflow / Underflow attacks
  • Front Running
  • Oracle Manipulation

​

Let's explore some of the attacks

push.org/bootcamp

18 of 19

Introduction to Smart Contract Security

​

​

  • Requirements and expectations from the smart contract should be clear before writing the code.
  • Best coding practices should be followed.
  • Solidity version should be selected carefully with no known vulnerabilities.
  • There must be proper unit and integration testing.
  • Fuzzing can be used to identify edge cases.
  • Contracts must be audited from reputed organizations / reputed smart contract researchers before deployment to mainnet.

What can be done

push.org/bootcamp

19 of 19

push.org/bootcamp