All Projects → IC3Hydra → Hydra

IC3Hydra / Hydra

Licence: MIT license
Framework for cryptoeconomic contract security, decentralized security bounties. Live on Ethereum.

Programming Languages

haskell
3896 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Hydra

neo-go
Go Node and SDK for the NEO blockchain
Stars: ✭ 104 (+44.44%)
Mutual labels:  smartcontracts
EthereumFoos
A Curated List Of Costly Ethereum Mistakes To Learn From (WIP)
Stars: ✭ 24 (-66.67%)
Mutual labels:  smartcontracts
libsubmarine
Implementation of a novel practical scheme for submarine commitments
Stars: ✭ 201 (+179.17%)
Mutual labels:  smartcontracts
Hledger
A reliable, user-friendly Plain Text Accounting tool with command line, terminal and web interfaces.
Stars: ✭ 1,887 (+2520.83%)
Mutual labels:  bounties
platform
FundRequest platform code (core)
Stars: ✭ 107 (+48.61%)
Mutual labels:  bounties
monetization-platforms
Crowdsourced list of monetization platforms for creators
Stars: ✭ 25 (-65.28%)
Mutual labels:  bounties
ipfs-docs
📚IPFS documentation platform
Stars: ✭ 196 (+172.22%)
Mutual labels:  bounties
Solidity
Solidity, the Smart Contract Programming Language
Stars: ✭ 13,691 (+18915.28%)
Mutual labels:  smartcontracts
Ethlist
The Comprehensive Ethereum Reading List
Stars: ✭ 3,576 (+4866.67%)
Mutual labels:  smartcontracts
awesome-waves
Curated list of awesome things for development on Waves blockchain.
Stars: ✭ 60 (-16.67%)
Mutual labels:  smartcontracts
blocky
Ethereum based smart contracts for IoT devices
Stars: ✭ 17 (-76.39%)
Mutual labels:  smartcontracts
pyrrha-consensus
Core set of Ethereum contracts for Pandora Boxchain functioning
Stars: ✭ 25 (-65.28%)
Mutual labels:  smartcontracts
mcat
a framework for developing ethereum smart contracts
Stars: ✭ 32 (-55.56%)
Mutual labels:  smartcontracts
tomomaster
TomoMaster provides a master professional level UI that brings governance power back to the users. Tomomaster allows users to vote for masternodes and apply to become a candidate
Stars: ✭ 50 (-30.56%)
Mutual labels:  smartcontracts
protocol
Covee protocol for decentralized teamwork
Stars: ✭ 18 (-75%)
Mutual labels:  smartcontracts
soltix
SOLTIX: Scalable automated framework for testing Solidity compilers.
Stars: ✭ 30 (-58.33%)
Mutual labels:  smartcontracts
auction-platform
A smartcontract Dapp with a web based UI that keeps track of contract data by adding it into blocks to be mined on a test network.
Stars: ✭ 19 (-73.61%)
Mutual labels:  smartcontracts
proveth
Generate & verify Merkle-Patricia-proofs for Ethereum
Stars: ✭ 89 (+23.61%)
Mutual labels:  smartcontracts

The Hydra ALPHA

Build Status

The Hydra is an Ethereum contract development framework for:

  • decentralized security and bug bounties
  • rigorous cryptoeconomic security guarantees
  • mitigating programmer and compiler error

Hydra introduces a concept called an exploit gap, a way for developers to turn crippling exploits into safe, decentralized bounty payments using a new form of fault tolerance called N-of-N Version Programming (NNVP) (not to be confused with N-Version Programming).

More general information about the Hydra is available on the website and in the paper.

[Warning]: The Hydra framework is an early research prototype, and is still undergoing the extensive testing, validation, and documentation processes required to recommend it for production. Please help us by trying to break the below bounties, and stay tuned for further release announcements!

Requirements and Install

The Hydra project requires Python3.6+. After installing Python, run python3.6 -m pip install -r requirements.txt to install all Python dependencies. Haskell and Haskell Stack are also required for the instrumenter; on Debian-based distros, these can be installed with apt-get install haskell-stack and tested by running stack test in the hydra/instrumenter directory.

Deploying a Production Bounty

An example of a production bounty deployment is in utils/rpc_deployment.py.

We plan on exposing a cleaner API for developers to deploy bounties soon. Currently, an example deployment script looks something like this:

# Point to all heads
heads = ['examples/ERC20/heads/' + file
		 for file in ('ERC20_florian.se', 'ERC20_florian.sol', 'ERC20_lorenz.sol', 'ERC20_phil.vy')]

# Change these
GETH_DATADIR = '/home/example/geth_mainnet'
creator_addr = "0x12345"
	
# Create a Hydra contract and deploy
d = RPCHydraDeployment(creator_addr, "hydra/metacontract/Hydra.sol", heads, GETH_DATADIR)
contracts = d.build_and_deploy(include_constructor=False, debug=False)

mc_abi = d.abi_object(heads[1])
mc_addr = '0x' + utils.encode_hex(contracts[0][0])

To use the testnet, simply pass a corresponding IPC to the node. Note that deployment is currently gas-heavy and uses a liberal gas price of 5 gwei.

Running Tests

How to run tests:

To run all tests, simply do python3.6 run_all_tests.py in the root of this repository.

Testing specific modules

  • MetaContract: Test the Meta Contract logic:

python3 -m hydra.test.test_hydra

  • ERC20: Run tests against each head individually:

Phil's test suite:

python3 -m examples.ERC20.test.erc20_tests_1

Florian's test suite:

python3 -m examples.ERC20.test.erc20_tests_2

Run both Phil's and Florian's test suites against the Hydra ERC20 contract:

python3 -m examples.ERC20.test.erc20_hydra_test

  • MontyHall: Run tests against each head individually:

python3 -m examples.MontyHall.test.mh_head_test

Differential testing on the heads:

python3 -m examples.MontyHall.test.differential_test

Run tests against the Hydra MontyHall contract:

python3 -m examples.MontyHall.test.mh_hydra_test

  • Simple ERC20 and MontyHall

Our paper describes a simplified Hydra framework without the automatic head instrumentation. Run tests against the Hydra ERC20 contract:

python3 -m examples.SimpleERC20.test.erc20_hydra_test

Run tests against the Hydra MontyHall contract:

python3 -m examples.SimpleMontyHall.test.mh_hydra_test

Acknowledgements

This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. .

We would also like to thank NSF CNS-1330599, CNS-1514163, CNS-1564102, and CNS-1704615, ARL W911NF-16-1-0145, and IC3 Industry Partners.

Any opinion, findings, and conclusions or recommendations expressed in this material are those of the authors(s) and do not necessarily reflect the views of the National Science Foundation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].