5/5
--- The term "WAD" frequently appears, raising the question: What exactly is a "WAD"? Originally introduced in dapptools as part of the DS test system, "WAD," along with "RAY" and "RAD," gained popularity through platforms like MakerDAO and Compound. These terms are crucial in understanding fixed-point decimals in digital token systems. #### Definition and Usage of WAD, RAY, and RAD - **WAD**: Represents a token with 18 decimal places. For instance, "WAD" is used to denote `1E18` or one followed by eighteen zeros, making it a common standard in digital tokens for representing decimals. - **RAY**: Denotes a higher precision level, specifically `1E27` — 27 decimal places. - **RAD**: Used for extremely high precision, equating to `1E45` — 45 decimal places. These terms are integral to operations involving fixed-point decimals in blockchain and digital currency technologies. The usage of "WAD" specifically helps in handling tokens where precise calculations are necessary, particularly when dealing with decimals. #### Historical Context and Clarifications The name "WAD" is not an acronym but is humorously compared to a bundle of paper, banknotes, or documents, similar to a thick stack of index cards—a "WAD" of numbers, so to speak. This comparison emphasizes the compactness and substantial quantity of data or value these terms represent in digital form. ### Practical Applications In practical scenarios, "WAD" and its counterparts are used for mathematical operations involving tokens with a fixed number of decimal places, as seen in various digital currency protocols. Understanding these terms is essential for developers working with digital tokens and blockchain technology, especially those implementing or interacting with systems that require precise decimal handling. Let's talk about versioning on the next lesson.
A brief overview of WAD, RAY and RAD in solidity. The lesson covers what these terms mean, and how they are used to define the number of decimal places for different tokens.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Assembly
Writing smart contracts using Huff and Yul
Ethereum Virtual Machine OPCodes
Formal verification testing
Smart contract invariant testing
Halmos, Certora, Kontrol
Security researcher
$49,999 - $120,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Guest lecturers:
Josselin Feist
Head of Blockchain at Trail of Bits
Last updated on May 28, 2025
Solidity Developer
Assembly and Formal VerificationDuration: 30min
Duration: 4h 38min
Duration: 3h 57min
Duration: 1h 56min
Course Overview
About the course
Assembly
Writing smart contracts using Huff and Yul
Ethereum Virtual Machine OPCodes
Formal verification testing
Smart contract invariant testing
Halmos, Certora, Kontrol
Security researcher
$49,999 - $120,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Guest lecturers:
Josselin Feist
Head of Blockchain at Trail of Bits
Last updated on May 28, 2025