If you bought $100 of gold and $100 btc in December of 2011, the gold would be worth $102, the bitcoin would be worth $1.7 Million (December 2021, Messari)
bitcoint does 300k settlements/day vs 800k/day for Fedwire, but bitcoin settlements are often batched so bitcoin network is already probably clearing more transactions (December 2021, Messari)
In the US we falir the equivielnt of 150TWh/day, that is over 8x as much energy as the BTC network uses in a year (December 2021, Messari)
Ethereum Name Service (ENS) and Unstoppable Domain Service (UNS) are 2 different services which surface information from domain records which are stored on the blockchain. Primarily both services make it easier to route payments to addresses but each service has additional capabilities.
Checkout my tool for resolving ENS/UNS domains here.
.34% of cryptocurrency transactions are illicit (Messari, December 2021), that is a smaller percentage than using traditional finance.
3.3 - Terms
Term
Definition
TradFi
Traditional Finance
DAO
Decentralized Autonomous Organization
4 - Hands On
Expirment Notes
4.1 - Login
Login flow using an ethereum wallet
Every ethereum wallet consists of a public key and private key, the private key is only known (or should only be known) by the owner of the wallet. Because of this we can validate wallet ownership by asking the owner to sign a generated message with their key and then validating that the signed message matches what we would expect using the public key.
Tools like Metamask allow us to interact with wallets using javascript. Metamask can manage the private keys itself or the private keys can be managed on a secure hardware wallet such as a ledger and anytime metamask needs to perform an operation that leverages the private key it will offload that part of the flow to the hardware wallet.
For the UI layer I chose to use ethers.js to make it easier to interact with the ethereum blockchain.
This is roughly the ui login code:
Initialize ethers provider/signer
constprovider=newethers.providers.Web3Provider(window.ethereum);// Initialize ethers
awaitprovider.send("eth_requestAccounts",[]);// Prompt to connect wallet (if not already connected)
constsigner=provider.getSigner();// Initialize signer
constaddress=awaitsigner.getAddress();// Get the connected address (multiple addresses can be managed by metamask)
constchallange=awaitgetChallenge(address);// Retrieve challenge from api (simple fetch api call)
constsignedChallenge=awaitsigner.signMessage(challange);// Ask to sign message, will prompt user in ui and on hardware wallet if connected
constjwt=awaitgetJwt(address,signedChallenge);// Retrieve jwt from api (simple fetch api call)
For the api I chose to use web3.py to make it easier to interact with the etherum block chain.
To create the challenge I simlply generate a uuid, the uuid is stored in the db (associated with the user who requested the challenge) and then returned to the user.
This is roughly the code to validate the signature:
Retrieve and validate challenge
stored_challenge=UserChallenge.get_challenge(addr).get("challenge")# get challenge from dbw3=Web3()# initial web3 libaccount=w3.eth.account.recover_message(# use stored challenge with signed challenge to retrieve addressencode_defunct(text=stored_challenge),signature=challenge_to_validate,)ifacct==addr:# ensure signing address matches challenge addressreturngenerate_jwt(addr)else:return401
5 - Helium
The People’s Network
Helium is a decentralized wireless network
Components
WHIP - Narrowband wireless protocol, cheap, long range, low power, open source,
Hotspots - provide wireless coverage, connect devices and routers
Devices - connect to hotspots using WHIP
Routers - internet deployed apps, recieve traffic from devices (via hotspots) and route them where they need to go. HA routers provided by the network but you can run your own
Concepts
Proof of coverage - For proving hotspots are proving wireless coverage to an area
Proof of serialization - To achieve time consensus, used to validate proof of coverage is real
Proof of location - For proving hotspots are where they say they are, uses TDoA (whitepaper pg 12)
Helium Consensus Protocol - Based off HoneyBadgerBFT, miners submit proofs which translate to scores for miners, best miners get elected to consensus group
Other Concepts
Full Node vs Light Client - full nodes have full history (routers), light clients only have a moving window of history (hotspots)