The math MASTERS are titans of the algebraic and gas efficient. This small library of hyper-optimized functions hopes to allow developers to make better codebases!
High - 100xp
Medium - 20xp
Low - 2xp
Starts: January 25, 2024 Noon UTC
Ends: February 02, 2024 Noon UTC
This codebase was inspired by the solady, obront.eth, and solmate codebases. Huge thanks to karma for the help on FV with Halmos.... which may be a hint.
We will teach how to do Formal Verification and assembly in the upcoming Cyfrin Updraft course.
Welcome to the future of web3! We, the math MASTERS are titans of the algebraic and gas efficient. We have created a small library called MathMasters
where we have the following functions/terms defined:
WAD
: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)mulWad
: Equivalent to (x * y) / WAD
rounded down.mulWadUp
: Equivalent to (x * y) / WAD
rounded up.sqrt
: Returns the square root of x
.We hope that people will use our hype optimized functions to make better codebases.
We are especially concerned with any function doing something "weird" at the EVM/assembly level. We would consider any of the following a valid LOW severity rating:
We expect any solidity project using version ^0.8.3
or above should be able to use our codebase. If not, that should be considered a vulnerability as well.
This is a great chance to test out your fuzzing and Formal Verification skills.
git --version
and you see a response like git version x.x.x
forge --version
and you see a response like forge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
halmos --version
and you should see something like `halmos 0.1.0 (816e00b 2023-03-16T00:05:26.396218Z)git clone https://github.com/Cyfrin/2024-01-math-master
cd 2024-01-math-master
make
forge test
forge coverage
and for coverage based testing:
forge coverage --report debug
Hash:
0.8.3 < 0.9.0
None
None
Rank | Username | ||||
1 | k kiqo | 612 | 3 (0) | 0 (0) | 3 |
2 | c ceseshi | 612 | 3 (0) | 0 (0) | 3 |
3 | s | 612 | 3 (0) | 0 (0) | 3 |
4 | o octeezy | 612 | 3 (0) | 0 (0) | 3 |
5 | B | 571 | 2 (0) | 0 (0) | 2 |
6 | 8 808Nestor | 480 | 2 (0) | 0 (0) | 0 |
7 | s stefanlatinovic | 414 | 2 (0) | 0 (0) | 3 |
8 | a abhishekthakur | 412 | 2 (0) | 0 (0) | 3 |
9 | e easyFloyd | 408 | 2 (0) | 0 (0) | 2 |
10 | 0 | 408 | 2 (0) | 0 (0) | 2 |
11 | A AcT3R | 408 | 2 (0) | 0 (0) | 2 |
12 | K | 408 | 2 (0) | 0 (0) | 2 |
13 | n | 408 | 2 (0) | 0 (0) | 2 |
14 | 0 0xloscar01 | 408 | 2 (0) | 0 (0) | 2 |
15 | H Honour | 408 | 2 (0) | 0 (0) | 2 |
16 | R Ritos | 408 | 2 (0) | 0 (0) | 2 |
17 | i iLoveMiaGoth | 400 | 2 (0) | 0 (0) | 0 |
18 | X XORs33r | 400 | 2 (0) | 0 (0) | 0 |
19 | p piatoss | 400 | 2 (0) | 0 (0) | 0 |
20 | n | 400 | 2 (0) | 0 (0) | 0 |
21 | w wiasliaw | 208 | 1 (0) | 0 (0) | 2 |
22 | S Sungyuk1 | 208 | 1 (0) | 0 (0) | 2 |
23 | m merv | 208 | 1 (0) | 0 (0) | 2 |
24 | e ereynier | 208 | 1 (0) | 0 (0) | 2 |
25 | 0 0x4non | 208 | 1 (0) | 0 (0) | 2 |
26 | k kryptonomousB | 204 | 1 (0) | 0 (0) | 1 |
27 | j jerseyjoewalcott | 200 | 1 (0) | 0 (0) | 0 |
28 | T Turetos | 200 | 1 (0) | 0 (0) | 0 |
29 | s secoalba | 200 | 1 (0) | 0 (0) | 0 |
30 | 4 4th05 | 200 | 1 (0) | 0 (0) | 0 |
31 | A APex | 200 | 1 (0) | 0 (0) | 0 |
32 | p | 200 | 1 (0) | 0 (0) | 0 |
33 | K Kaiziron | 8 | 0 (0) | 0 (0) | 2 |
34 | T TorpedopistolIxc41 | 8 | 0 (0) | 0 (0) | 2 |
35 | w wafflemakr | 8 | 0 (0) | 0 (0) | 2 |
36 | h happyformerlawyer | 8 | 0 (0) | 0 (0) | 2 |
37 | L | 8 | 0 (0) | 0 (0) | 2 |
38 | C Coffee | 4 | 0 (0) | 0 (0) | 1 |