Giter Club home page Giter Club logo

2024-01-math-master's Introduction

First Flight #8: Math Masters

Contest Details

Prize Pool

  • High - 100xp

  • Medium - 20xp

  • Low - 2xp

  • Starts: January 25, 2024 Noon UTC

  • Ends: February 02, 2024 Noon UTC

Stats

  • nSLOC: 46
  • Complexity Score: 276

Math Master

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.

About

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.

Getting Started

Requirements

  • git
    • You'll know you did it right if you can run git --version and you see a response like git version x.x.x
  • foundry
    • You'll know you did it right if you can run forge --version and you see a response like forge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
  • Halmos
    • To know you've installed it run halmos --version and you should see something like `halmos 0.1.0 (816e00b 2023-03-16T00:05:26.396218Z)

Quickstart

git clone https://github.com/Cyfrin/2024-01-math-master
cd 2024-01-math-master
make

Usage

Testing

forge test

Test Coverage

forge coverage

and for coverage based testing:

forge coverage --report debug

Audit Scope Details

  • Commit Hash:
  • In Scope: (For this contest, just use the main branch)
Hash:

Compatibilities

  • Solc Version: 0.8.3 < 0.9.0
  • Chain(s) to deploy contract to:
    • Ethereum
  • Tokens:
    • None

Known Issues

None

2024-01-math-master's People

Contributors

equious avatar

Stargazers

Didier A. E. Gabiam avatar mulch avatar

Watchers

César Escribano avatar  avatar

Forkers

jauvany ceseshi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.