Giter VIP home page Giter VIP logo

2023-09-vyper-compiler's Introduction

Vyper 0.3.10rc3 Compiler - Competition Details

Contest Details

  • Total Prize Pool: $150,000(+) USDC
    • HM: 95%
    • L: 5%
  • Starts: September 14, 2023
  • Ends: November 4th, 2023
  • nSLOC: ~14,644

The donation address for prizes is:

  • eth:0x18996AdDe10E9AC12e47e5D6a0F486793fad2c15 (vyper-contest.eth)
  • Any EVM Chain: 0xf71d2231bc1309db6419F82afD8157ea858ADd8C

Vyper Compiler Walkthrough

About the Contest

In Scope:

  • Everything in ./vyper (~15,000 nSLOC)
  • Vyper Commit Hash:
    • 3b310d5
    • Aka the 0.3.10rc3
      • All the code for this commit is also located in this repo

Out of scope:

  • Anything outside ./vyper folder
  • Any issue in the repo labeled "bug" is a known bug, and any issue merged or closed from past versions of vyper is a known bug, and does not qualify.
  • EVM version related bugs. For example, the following finding would not qualify:
Vyper 0.3.9 defaults to shanghai which adds the PUSH0 opcode and which is not yet supported on many chains like Optimism. This can lead to dangerous creation and runtime failures.

Known Issues

You can see the list of known issues here.

Judging

Due to the sensitivity of the contest, judging for this contest will be private, and conducted by the Cyfrin team, VSA (Vyper Security Alliance), and the contest will likely involve additional external participants.

Scoring:

For this contest, we are looking exclusively for Highs & Mediums. There will be no Informational / QA prize pool.

  • H/M - 95%
  • L - 5%

You can check the total prize pool here: 0x18996AdDe10E9AC12e47e5D6a0F486793fad2c15

Severity Rating

We will use the matrix in the CodeHawks documentation to decide severity, but here are some examples.

Severity Rating Examples

High

  • High Impact: Reentrancy locks are in the wrong storage slot
  • High Likelihood: Always

Medium

  • High Impact: Compiler puts reentrancy lock at the wrong spot
  • Low Likelihood: Only when the contract address starts with 0x0000, your codebase is exactly 4,567 lines long, and has a very specific function name.

Low

  • Low Impact: An extra INVALID Opcode is added at the end of metadata
  • Low Likelihood: If the first text in the codebase is "snek snek snek snek is king"

Invited Hawk

This is our first contest that will include a paid "Invited Hawk". We are excited to welcome obront.eth to this contest! He will be paid an additional flat fee from outside the prize pool.

Additional context:

  • The codegen and optimizer sections are critical because it creates/modifies the output EVM code, so if you're looking for Highs, that's likely where you'll find them.
  • Access control - handing the user unintended powers - is a focus of potential attack
  • It's likely that if the compiler produces EVM opcodes/bytecode that is not correct, it could be considered a H/M even if it's not apparent. So please submit your lows.

We will be working closely with the Vyper Security Alliance on submissions.

Sponsors


Lido Yearn Curve
Cyfrin UnoRe


Vyper compiler security audit competition starts 14th September with $150k worth of bounties. See the competition on CodeHawks and find more details in this blog post.

Build Status Documentation Status Discord

PyPI Docker

Coverage Status Language grade: Python

Getting Started

See Installing Vyper to install vyper. See Tools and Resources for an additional list of framework and tools with vyper support. See Documentation for the documentation and overall design goals of the Vyper language.

See Learn.Vyperlang.org for learning Vyper by building a Pokémon game. See try.vyperlang.org to use Vyper in a hosted jupyter environment!

Note: Vyper is beta software, use with care

Installation

See the Vyper documentation for build instructions.

Compiling a contract

To compile a contract, use:

vyper your_file_name.vy

generate bytecode

vyper -f bytecode file-name.vy > file-name.bin

generate abi

vyper -f abi file-name.vy > file-name.abi

There is also an online compiler available you can use to experiment with the language and compile to bytecode and/or IR.

Note: While the vyper version of the online compiler is updated on a regular basis it might be a bit behind the latest version found in the master branch of this repository.

Testing (using pytest)

(Complete installation steps first.)

make dev-init
python setup.py test

Contributing

  • See Issues tab, and feel free to submit your own issues
  • Add PRs if you discover a solution to an existing issue
  • For further discussions and questions, post in Discussions or talk to us on Discord
  • For more information, see Contributing

2023-09-vyper-compiler's People

Contributors

jacqueswww avatar iamdefinitelyahuman avatar charles-cooper avatar fubuloubu avatar davidknott avatar davesque avatar tserg avatar jakerockland avatar vbuterin avatar nrryuya avatar pipermerriam avatar skellet0r avatar ben-kaufman avatar jamesray1 avatar whb07 avatar pcaversaccio avatar jackiexu avatar yograterol avatar trocher avatar adrianhacker-pdx avatar patrickalphac avatar madelineau avatar saikat041 avatar hskang9 avatar jessebmiller avatar gbisaga avatar fulldecent avatar pdaian avatar dan-nolan avatar benber86 avatar

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.