{"id":13421683,"url":"https://github.com/IC3Hydra/Hydra","last_synced_at":"2025-03-15T10:31:19.263Z","repository":{"id":69179806,"uuid":"109271753","full_name":"IC3Hydra/Hydra","owner":"IC3Hydra","description":"Framework for cryptoeconomic contract security, decentralized security bounties.  Live on Ethereum.","archived":false,"fork":false,"pushed_at":"2018-03-02T15:03:45.000Z","size":341,"stargazers_count":73,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-27T22:27:51.986Z","etag":null,"topics":["bounties","ethereum","security","smartcontracts"],"latest_commit_sha":null,"homepage":"https://thehydra.io/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IC3Hydra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-11-02T13:58:32.000Z","updated_at":"2024-08-12T19:10:03.000Z","dependencies_parsed_at":"2023-05-01T16:03:29.209Z","dependency_job_id":null,"html_url":"https://github.com/IC3Hydra/Hydra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IC3Hydra%2FHydra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IC3Hydra%2FHydra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IC3Hydra%2FHydra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IC3Hydra%2FHydra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IC3Hydra","download_url":"https://codeload.github.com/IC3Hydra/Hydra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243718937,"owners_count":20336590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bounties","ethereum","security","smartcontracts"],"created_at":"2024-07-30T23:00:28.189Z","updated_at":"2025-03-15T10:31:19.258Z","avatar_url":"https://github.com/IC3Hydra.png","language":"Haskell","funding_links":[],"categories":["Software Development","Developer Tools","Roadmap"],"sub_categories":["Risk Management"],"readme":"# The Hydra ALPHA\n\n[![Build Status](https://travis-ci.org/IC3Hydra/Hydra.svg?branch=master)](https://travis-ci.org/IC3Hydra/Hydra)\n\nThe Hydra is an [Ethereum](https://ethereum.org) contract development framework for: \n\n- decentralized security and bug bounties\n- rigorous cryptoeconomic security guarantees\n- mitigating programmer and compiler error\n\nHydra introduces a concept called an **exploit gap**, a way for developers to turn \ncrippling exploits into safe, decentralized bounty payments using a new form of\nfault tolerance called **N-of-N Version Programming (NNVP)** (not to be confused\nwith N-Version Programming). \n\nMore general information about the Hydra is available [on the website](https://thehydra.io/)\nand [in the paper](https://thehydra.io/paper.pdf).\n\n**[Warning]: The Hydra framework is an early research prototype, and is still \nundergoing the extensive testing, validation, and documentation processes required \nto recommend it for production. Please help us by trying to break the below \nbounties, and stay tuned for further release announcements!**\n\n## Requirements and Install\n\nThe Hydra project requires Python3.6+.  After installing Python, run\n``python3.6 -m pip install -r requirements.txt`` to install all Python\ndependencies.  Haskell and Haskell Stack are also required for the instrumenter;\non Debian-based distros, these can be installed with ``apt-get install haskell-stack``\nand tested by running ``stack test`` in the ``hydra/instrumenter`` directory.\n\n## Deploying a Production Bounty\n\nAn example of a production bounty deployment is in ``utils/rpc_deployment.py``.\n\nWe plan on exposing a cleaner API for developers to deploy bounties soon.  Currently,\nan example deployment script looks something like this:\n\n```\n# Point to all heads\nheads = ['examples/ERC20/heads/' + file\n\t\t for file in ('ERC20_florian.se', 'ERC20_florian.sol', 'ERC20_lorenz.sol', 'ERC20_phil.vy')]\n\n# Change these\nGETH_DATADIR = '/home/example/geth_mainnet'\ncreator_addr = \"0x12345\"\n\t\n# Create a Hydra contract and deploy\nd = RPCHydraDeployment(creator_addr, \"hydra/metacontract/Hydra.sol\", heads, GETH_DATADIR)\ncontracts = d.build_and_deploy(include_constructor=False, debug=False)\n\nmc_abi = d.abi_object(heads[1])\nmc_addr = '0x' + utils.encode_hex(contracts[0][0])\n```\n\nTo use the testnet, simply pass a corresponding IPC to the node.  Note that deployment\nis currently gas-heavy and uses a liberal gas price of 5 gwei.\n\n## Running Tests\nHow to run tests:\n\nTo run all tests, simply do ``python3.6 run_all_tests.py`` in the root of this repository.\n\n### Testing specific modules\n\n- MetaContract:\nTest the Meta Contract logic:\n\n`python3 -m hydra.test.test_hydra`\n\n- ERC20: \nRun tests against each head individually:\n\nPhil's test suite:\n\n`python3 -m examples.ERC20.test.erc20_tests_1`\n\nFlorian's test suite:\n\n`python3 -m examples.ERC20.test.erc20_tests_2`\n\nRun both Phil's and Florian's test suites against the Hydra ERC20 contract:\n\n`python3 -m examples.ERC20.test.erc20_hydra_test`\n\n- MontyHall:\nRun tests against each head individually:\n\n`python3 -m examples.MontyHall.test.mh_head_test`\n\nDifferential testing on the heads:\n\n`python3 -m examples.MontyHall.test.differential_test`\n\nRun tests against the Hydra MontyHall contract:\n\n`python3 -m examples.MontyHall.test.mh_hydra_test`\n\n- Simple ERC20 and MontyHall\n\n[Our paper](https://thehydra.io/paper.pdf) describes a simplified Hydra \nframework without the automatic head instrumentation. Run tests against the \nHydra ERC20 contract:\n\n`python3 -m examples.SimpleERC20.test.erc20_hydra_test`\n\nRun tests against the Hydra MontyHall contract:\n\n`python3 -m examples.SimpleMontyHall.test.mh_hydra_test`\n\n# Acknowledgements\n\nThis material is based upon work supported by the National Science \nFoundation Graduate Research Fellowship under Grant No. .\n\nWe would also like to thank NSF CNS-1330599, CNS-1514163, CNS-1564102, \nand CNS-1704615, ARL W911NF-16-1-0145, and IC3 Industry Partners.\n\nAny opinion, findings, and conclusions or recommendations expressed in \nthis material are those of the authors(s) and do not necessarily \nreflect the views of the National Science Foundation.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIC3Hydra%2FHydra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIC3Hydra%2FHydra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIC3Hydra%2FHydra/lists"}