Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echidna tests #30

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ types
forge-cache
out
broadcast

# Echidna
corpus/
**/crytic-compile
**/crytic-export
**/corpus
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
![Reliquary](header.png "Reliquary")

> Designed and written by [Justin Bebis](https://twitter.com/0xBebis_) and Zokunei, with help from [Goober](https://twitter.com/0xGoober) and the rest of the [Byte Masons](https://twitter.com/ByteMasons) crew.

---

Reliquary is a smart contract system that is designed to improve outcomes of incentive distribution by giving users and developers fine grained control over their investments and rewards. It accomplishes this with the following features:
1) Emits tokens based on the maturity of a user's investment, separated in tranches.
2) Binds variable emission rates to a base emission curve designed by the developer for predictable emissions.
3) Supports deposits and withdrawals along with these variable rates, which has historically been impossible.
4) Issues a 'financial NFT' to users which represents their underlying positions, able to be traded and leveraged without removing the underlying liquidity.
5) Can emit multiple types of rewards for each investment as well as handle complex reward mechanisms based on deposit and withdrawal.

1. Emits tokens based on the maturity of a user's investment, separated in tranches.
2. Binds variable emission rates to a base emission curve designed by the developer for predictable emissions.
3. Supports deposits and withdrawals along with these variable rates, which has historically been impossible.
4. Issues a 'financial NFT' to users which represents their underlying positions, able to be traded and leveraged without removing the underlying liquidity.
5. Can emit multiple types of rewards for each investment as well as handle complex reward mechanisms based on deposit and withdrawal.

By binding tokens to a base emission rate you not only gain the advantage of a predictable emission curve, but you're able
to get extremely creative with the Curve contracts you write. Whether this be a sigmoid curve, a square root curve, or a
Expand All @@ -18,12 +21,28 @@ random curve, you can codify the user behaviors you'd like to promote.
Please reach out to [email protected] to report bugs or other funky behavior. We will proceed with various stages of production
testing in the coming weeks.


## Installation

This is a Foundry project. Get Foundry from [here](https://github.com/foundry-rs/foundry).

Please run the following command in this project's root directory to enable pre-commit testing:

```bash
ln -s ../../pre-commit .git/hooks/pre-commit
```

## Echidna

Echidna is a program designed for fuzzing/property-based testing of Ethereum smart contracts. Please refer to the doc for [installation](https://github.com/crytic/echidna#installation).

Run with:

```sh
echidna echidna/ReliquaryProperties.sol --contract ReliquaryProperties --config echidna/config1_fast.yaml
```

You can fine in `/echidna` 3 config files to run the fuzzer:

- 1< min | `config1_fast.yaml`
- 5< min | `config2_slow.yaml`
- 50 min | `config3_inDepth.yaml`
Loading
Loading