Cryptocurrency Mechanics and Decentralized Finance – Part 2� �Blockchain, Crypto Mechanics & Intro to Decentralized Finance
1
Florida West Coast Section
Cryptocurrency Mechanics and DeFi – Part 2�
Michael A. Ramalho, Ph.D.�IEEE Florida West Coast Section Blockchain Local Group Founding Chair�mar42@cornell.edu
Sponsored by FWCS Blockchain Local Group�Co-sponsored by IEEE FWCS:�CS, PES/IAS, SigProc/Comm, LM, WIE
Seminole Electric Cooperative, Inc.
October 15, 2025
OBJECTIVES (Part 1 – focus on crypto mechanics & technology):
OBJECTIVES (Part 2 – focus on Ethereum, and crypto applications):
2
© 2025 FWCS IEEE SP/COMM. All rights reserved.
DISCLAIMER:
Primarily a technical talk on blockchain mechanics, operation, and theory.
Technical Analysis and Appraisal - Use at your own risk.
3
© 2025 FWCS IEEE SP/COMM. All rights reserved.
Part 2 - TALK OUTLINE
4
© 2025 FWCS IEEE SP/COMM. All rights reserved.
What are Blockchains?
Blockchains are software-defined data structures in which:�
HEADER
PAYLOAD
Cryptocurrency Mechanics and DeFi – Part 2�
Newest Block
..... Older Blocks .....
6
Input_Data
“One-Way” Hash Function (SHA-256)
Output_Hash (256 bits for SHA-256)
Arbitrary Length Input
Advanced Encryption Standard (AES)
Deterministic value, but appears random relative to similar looking inputs.
Fixed-length Output (256 bits for SHA-256)
0x7F83B1657FF1FC53B92DC18148A1D65DFC2D4B1FA3D677284ADDD200126D9069
0x451CAE5B3608B3556D46E41809AFBF80C1ADBEC092504D6FE86FA31A22795525
Hello World!
Hello Vorld!
“W” and “V” in ASCII�are only one bit different!
On average, 128 of the 256 bits will be different. For ANY difference in input!�“The Avalanche Effect” of hashing.
HASHSHA-256
HASHSHA-256
Designed to be virtually impossible to go this way.
“One-Way Functions”
Easy to go this way. Output “appears random”.
Blocks are Chained Together with Cryptographic Hash Functions
Pioneer: Ralph Merkle (1979) - Invented Merkle Trees.
Top hash in a Merkle Tree is called the “Merkle Root”.
Merkle Root is in the header of a Bitcoin Block.
It creates a fingerprint for all transactions in a Bitcoin payload.
Cryptocurrency Mechanics and DeFi – Part 2�
Bitcoin: Cryptographic Hashes Also Tie All the Blocks Together
7
Cryptocurrency Mechanics and DeFi – Part 2�
PAYLOAD�(transactions here)
BLOCK (N-1)
Merkle Root
Hash of Previous�Block Header
HEADER�ELEMENTS
Hash
PAYLOAD�(transactions here)
BLOCK N
Merkle Root
Hash of Previous�Block Header
HEADER�ELEMENTS
Hash
PAYLOAD�(transactions here)
BLOCK (N+1)
Merkle Root
Hash of Previous�Block Header
HEADER�ELEMENTS
Hash
8
Public-Key�Cryptography�Basic Concept
Blockchain: Direct Participation is Facilitated by Public Key Cryptography
Cryptocurrency Mechanics and DeFi – Part 2�
“Not your Keys – Not your Crypto!”
Hardware�wallet/vault�(Ledger Nano X )
Public Permissionless Blockchain Consensus Algorithms
9
Cryptocurrency Mechanics and DeFi – Part 2�
Last week we learned that the inventors of blockchain (Drs. Haber & Stornetta in 1990)�realized that the inventor of Bitcoin’s Proof of Work (Satoshi Nakamoto in 2008)�and later the inventors of Proof of Stake (in 2012)* had “solved” their problem�of a single point of proof of the “linked hash blocks” information in blockchain by:
* - Sunny King and Scott Nadal in their whitepaper “PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake”
Bitcoin’s “Proof of Work” Consensus Algorithm Resolves Conflicts!
10
2 Different Miners “Solve Hash Problem” at Nearly the Same Time
B1
“Nakamoto Consensus” - A Natural Fit for Open Permissionless Systems (any node can join at any time).
A
New Block Every ~10 min
B2
C
3/4 miners work here – next block�expected in ~13.3 min ((4/3)*10)
1/4 miners work here - next block�expected in ~40 min (4*10)
X
Cryptocurrency Mechanics and DeFi – Part 2�
Bitcoin’s Consensus Exploited To Fix August 15, 2010 Overflow Error*
11
B1
A
Cryptocurrency Mechanics and DeFi – Part 2�
* - https://en.bitcoin.it/wiki/Value_overflow_incident
74638
74637
Overflow error (Created 184B BTC to 2 Addresses & 0.01 BTC Block Award)
Within 5 hours, new client forced a soft fork that rescinded block validity after the fact.
Unpatched clients continued to build on “Bad Chain”.
B2
Updated nodes begin to build on last valid block (according to new rules/checks).
Once update pushed to clients representing > 50% of hashpower, it was only�a matter of time until the “Good Chain” overtook the “Bad Chain” (~19 hours).
Community decided: “Bad Chain”
74691
NEW�74638
Result: It is as if the Bad Chain blocks never existed!
Bitcoin Lies:
Transaction�4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
“Good Chain”
Bitcoin Crypto Supply: The Math
12
Original Bitcoin Money Supply Design (it has not changed!)
Total BTC Limit = 10,500,000 [ 1 + 1/2 + 1/4 +1/8 + 1/16 ... ]
First four years
Next four years
... and so on ...
= 1
Total BTC Limit = 21,000,000 BTC
Cryptocurrency Mechanics and DeFi – Part 2�
Bitcoin Internal Data Representation: What are Satoshis?
13
1 BTC = 108 Satoshis = 0b101111101011110000100000000
21 M BTC = (21*106)*108 Sats = 0b111011101011111000001011010000001110100000000000000
1 USD = 102 Cents, where a US Cent is the smallest unit of account
49 binary places. Java’s only data type is IEEE 64-bit floating point has 52 bit mantissa (no loss of precision).
33rd position (33*4 = 132 years)
50 BTC = 50*108 Sats = 0b100101010000001011111001000000000
25 BTC = 28*108 Sats = 0b010010101000000101111100100000000
[A divide-by-2 operation in fixed point is equivalent to a shift right – until you lose precision]
Largest number that can be represented in a UNsigned, 32-bit integer (uint32) is the decimal equivalent�of 0xFFFFFFFFFFFFFFFF = 184.47*1017 Sats = 184.47*109 BTC = 184.47 Billion BTC
Largest number that can be represented in a Signed, 32-bit integer (int32) is the decimal equivalent�of 0x7FFFFFFFFFFFFFFF = 92.234*1017 Sats = 92.234*109 BTC = 92.234 Billion BTC�[NOTE: A math result of uint32 numbers larger this will cause overflow error if cast into int32.]
21 M BTC maximum allows ~4x overhead for “normal operations” (supply limit overhead/safety margin).
Cryptocurrency Mechanics and DeFi – Part 2�
14
Question: Why 21 Million BTC Cap? ..... Bitcoin’s Answer: Designed-in BTC scarcity.�(and has a safety/overhead margin of ~4x)
93.8% of the 21 Million BTC has�been mined already. Over next 4 years,�annualized increase is ~0.8%/yr.
One Epoch
Initial/original code DID NOT have this if statement!�[On some 64-bit machines “>> by 65” is same as “>>1” ... would restart Reward Era 1 again!]�Thus, with enough lead-time before a potential future event – the code CAN BE CHANGED!
Bitcoin’s monetary supply is open-source, for everyone to see and review.
Integer Truncation (result is “Reward Era” – 1)
“Epoch” (210,000)
Block Height
nSubsidy is Block Reward, halved by reward era (via right shifts)
Don’t people know that Bitcoin Governance can vote to change the code in the future?
Bitcoin Crypto Supply: In Code
2024-04-19
2023-04-29
Cryptocurrency Mechanics and DeFi – Part 2�
Blockchain Block Explorers: Bitcoin Example (https://www.blockchain.com/explorer/blocks/btc/918349)
15
Coinbase Transaction
Miner Name
0x00000000000000000000b41746bf85c75721dadb8fd9cb9758edc46836bbf57b
Block Award
Total Transaction Fees
Individual Transactions
0x3f0dd381d012af8bff5570d554fe528860219093222d340ea4289837b34c742a
Cryptocurrency Mechanics and DeFi – Part 2�
Answer to PoW Power Wastefulness: Proof of Stake (and derivatives)
16
Public Permissionless Blockchain Nodes (validators) are not fully autonomous! Major departure from Bitcoin design.
Image Credit:�https://www.coindesk.com/tech/2022/09/06/the-final-countdown-to-the-ethereum-merge-has-officially-begun/
Proof of Stake
Proof of Work
"Ethereum 1.0”
“Difficulty Bomb” triggered (PoW difficulty set too hard – no one can mint a block – PoW died).
“THE MERGE” - Ethereum's Transition from Ethereum 1.0 (PoW) to Ethereum 2.0 (PoS)
... BUT THIS IS DEBATABLE ... BECAUSE ...
Binance CEO requested validators to stop/blacklist a valid smart contract to stop a hack.�On October 4, 2022 ~$570 Million taken (ETH, POLY, BNB, AVA, and other crypto).�(https://www.cnbc.com/2022/10/07/more-than-100-million-worth-of-binances-bnb-token-stolen-in-another-major-crypto-hack.html#:~:text=Cryptocurrency%20exchange%20Binance%20temporarily%20suspended,in%20a%20tweet%20Thursday%20evening.).
Cryptocurrency Mechanics and DeFi – Part 2�
Ethereum “Merge” from PoW to PoS – Quick Look at Block Components
17
Ethereum�Pre-Merge�(similar to Bitcoin components)
Fundamentally Straightforward��A lot of testing to ensure�the merge went smoothly
Ethereum PROVED that�(energy-wasting) PoW�blockchains can�transition to PoS!
[ ... by changing�consensus algorithm]
Ethereum�Post-Merge
Additional “post-merge” fields (mostly) due to ”virtual machine” state required by smart contract functionality�(next slide).
Cryptocurrency Mechanics and DeFi – Part 2�
Ethereum Virtual Machines ⋍ {~Bitcoin Transaction Train + Smart Contracts}
18
A smart contract is a computerized transaction protocol that executes the terms of a contract. The general objectives of�smart-contract design are to satisfy common contractual conditions (such as payment terms, liens, confidentiality, and even enforcement), minimize exceptions both malicious and accidental, and minimize the need for trusted intermediaries.
All parties MUST TRUST smart contract!
Smart Contract Execution isn’t free ... It costs “gas”.
Cryptocurrency Mechanics and DeFi – Part 2�
Ethereum Virtual Machines (EVMs) – A Deeper Look
19
Gas fees are paid in Ethereum's native currency, ether (ETH).�Gas prices are specified in gwei (1 gwei = 0.000000001 ETH).
Image Credit: https://ethereum.org/en/developers/docs/gas/
Smart Contact is interpreted code – executed upon an ”event”.
Point 1: Only use external storage when absolutely required.
Point 2: Pass Enough Gas!
Cryptocurrency Mechanics and DeFi – Part 2�
Ethereum Smart Contracts (Solidity)
20
The first time this smart contract is called, the “constructor” instantiates the state needed on the blockchain (part of�“world state”). There is a cost (in gas) to instantiate state that will forever be on the blockchain – so don’t ever instantiate�local/temporary state on the blockchain!
Here, three things are required. If not met, the call/method�terminates and “reverts” any blockchain state to where it�was prior - but gas fees still consumed (as EVM executed it)!
Smart Contract execution can trigger other “events” and “errors”.
Default uint is uint256. Operations with unit32 cost more gas!
Cryptocurrency Mechanics and DeFi – Part 2�
Consensus Mechanism Summary: PoW vs PoS
21
”Proof-of-Work” Properties (“The Genius of Satoshi Nakamoto’s Bitcoin” – “Nakamoto Consensus”):
“Proof-of-Stake” Properties:
Cryptocurrency Mechanics and DeFi – Part 2�
Part 2 - TALK OUTLINE
22
© 2025 FWCS IEEE SP/COMM. All rights reserved.
Is Bitcoin a (Crypto)Currency? ... Things to ponder ...
23
Q: Are we surprised that “money” can have the form of entries on a blockchain (virtual currency)?
A: No. In the history of money – money took many physical forms.
Most Cryptocurrencies are governed by the organization members and are NOT influenced or controlled�by a central government (called Decentralized Autonomous Organizations, or DAOs).
Bitcoin Limit = 10,500,000 [ 1 + 1/2 + 1/4 +1/8 + 1/16 ... ]
Bitcoin supply is NOT tied to any “purchasing power” metric NOR controlled by a legal authority – Is it a currency?
Q: Has non-traditional “private money” ever been tried before.�A: The private Swiss ‘Ducat’ is described in Hayek’s book.
But: The Swiss Ducat announced the intension to modify the SUPPLY�of the Ducat in order that it’s “purchasing power” value is a constant.�Typically performed by the government authority (aka Central Bank).
Q: Can “a currency” be defined outside of a country-based authority?�A: Hayek also describes how “Denationalisation” of Money can occur (example: Maastricht Treaty and creation of Euro).
But: Organization responsible has historically been under the governance of some recognized legal authority!
Cryptocurrency Mechanics and DeFi – Part 2�
Is Bitcoin a (Crypto)Currency? No, But it certainly is “Money”
24
https://www.investopedia.com/terms/m/money.asp
The first types of money were commodities (their value changed over time)!��Their physical properties made them desirable as a medium of exchange.��In contemporary markets, money can include government-issued legal�tender or fiat money, money substitutes, fiduciary media (e.g., checks),�or “cryptocurrencies”.
Money is a liquid asset (asset easily turned into cash) used to facilitate transactions of value. Four tests:
IMHO – Bitcoin should have been called “Crypto-Money”
Cryptocurrency Mechanics and DeFi – Part 2�
Scaling Public Permissionless Blockchains ...
25
Cryptocurrency Mechanics and DeFi – Part 2�
* - Many crypto hacks target Layer 1 to Layer 2 interface.
Blockchain Governance and Challenges in Crypto Regulation
26
A Decentralized Autonomous Organization (a DAO) is a organization - represented by rules encoded as a computer program (smart contract) or in blockchain governance structure - that is:
[Member-directed communities without centralized leadership used for ANY purpose.]
Bitcoin’s Original Goal: To eliminate the need of a mutually acceptable trusted third party. Just trust the code.
But the blockchain code can be changed by the blockchain’s DAO governance!
PROBLEMS/CONCERNS/ISSUES:
Cryptocurrency Mechanics and DeFi – Part 2�
* - For US exchanges and US users, law enforcement can request your addresses.
Supply Policy for other Cryptocurrencies and Stablecoins ...
27
Litecoin: Algorithmic limit similar to Bitcoin (~clone of Bitcoin). 84 Million LTE cap.
Dogecoin: No limit. 10,000 DOGE minted per minute (~5 Billion new DOGE per year). ~Litecoin clone.
Solana: No limit, targets a “long-term inflation rate” (of 1.5%). Will create/burn SOL to accomplish this.
Crypto Supply (for Other Crypto):
Tether (USDT), USD Coin (USDC), TerraUSD (UST)*, Binance USD (BUSD), ...
May 13,�2022
(was 3rd�largest)
StableCoins (graphic from a deck presented in early 2022):
TerraUSD was a class of “algorithmic�Stablecoin” based on creation/burning�of underlying token LUNA.*
* - https://www.richmondfed.org/publications/research/economic_brief/2022/eb_22-24
UST failed as a result of cryptocurrency LUNA which used the Terra PoS blockchain.�Stake of LUNA on Terra dropped almost to zero – had to halt blockchain to resist further attack.
Cryptocurrency Mechanics and DeFi – Part 2�
Very different today - Stablecoins have come a LONG WAY since 2022!
28
US Stablecoin Legislation – GENIUS and CLARITY Acts
Cryptocurrency Mechanics and DeFi – Part 2�
GENUS ACT (signed into law July 18, 2025):
CLARITY (Digital Asset Market Clarity) Act (proposed, passed house, bipartisan):
If Tether were a county, it would rank 18th among foreign holders of U.S. Treasuries�($127 Billion as of July 2025).
29
Why Stake Your Crypto?
Cryptocurrency Mechanics and DeFi – Part 2�
Proof-of-Stake (PoS) crypto staking generalizations:
Pure Proof of Stake (PPoS): Algorand
* - Ethereum supply today is ~120M ETH.
30
Miscellany: What are CBDCs and Cryptocurrency Treasure Companies?
Cryptocurrency Mechanics and DeFi – Part 2�
31
Summary: Observations and Closing Prognostications
Bitcoin:
My Past Prognostications (1 & 3 have not occurred yet):
Ethereum/DeFi/Web 3:
My Prognostications:
Cryptocurrency Mechanics and DeFi – Part 2�
YOU MADE IT ...
32
© 2025 FWCS IEEE SP/COMM. All rights reserved.
33
START: Cryptographic Hash Functions Gone Wild!
Arbitrary Input Length
Fixed Length Output
Hash�Function
Michael A. Ramalho, Ph.D.�IEEE Florida West Coast Section Blockchain Community Founding Chair�mar42@cornell.edu
THANK�YOU
Permissionless
Decentralized
Trustless
Transparent
Censorship Resistant
Programmable
DeFi:
END: DeFi beginning to upset the Financial World Order!
Cryptocurrency Mechanics and DeFi – Part 2�
34
ASIDE: Bitcoin introduced Blockchain to the World in October 2008 - Right?
Pseudonym for one or more persons.
Merkel Root�(for block)
“Previous� Hash” in�Bitcoin�Header
Reference�[3]
1990
Stuart
Scott
Cryptocurrency Mechanics and DeFi – Part 1�
Publish hashes in NY Times!
Stuart
Bitcoin needed better technology�than New York Times!
Cryptocurrency Mechanics and Decentralized Finance – Part 2� �Blockchain, Crypto Mechanics & Intro to Decentralized Finance
35
Florida West Coast Section
Cryptocurrency Mechanics and DeFi – Part 2�
Michael A. Ramalho, Ph.D.�IEEE Florida West Coast Section Blockchain Local Group Founding Chair�mar42@cornell.edu
Sponsored by FWCS Blockchain Local Group�Co-sponsored by IEEE FWCS:�CS, PES/IAS, SigProc/Comm
Seminole Electric Cooperative, Inc.
October 15, 2025