• Stars
    star
    202
  • Rank 193,691 (Top 4 %)
  • Language
    TypeScript
  • License
    GNU Affero Genera...
  • Created over 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Read and write to L1 with minimal latency and no trust tradeoffs.

DEPRECATED: DO NOT USE IN PRODUCTION โš ๏ธ

There are a number of bugs and unimplemented features that make this code unsuitable for production use. Seek out other tools.


Logo

Coverage Status Fuzz Tests Integration Tests Unit Tests

Nova gives your L2 contracts the power to read and write to L1 with minimal latency and no trust tradeoffs.

Architecture

Diagram

Testing

Below is a list of scripts used to test, fuzz, and measure the gas consumption of the Nova smart contracts. Many of these scripts are run automatically as part of our continuous integration suite.

Running Unit Tests

To fail tests when their gas snapshots are incorrect (default is only a warning), set the CI env var to true.

npm run unit-tests

Running Integration Tests

You must start up an instance of Optimism's "ops" repo before running integration tests.

npm run integration-tests

Updating Gas Snapshots

If you make a contribution that changes the gas usage of the contracts, you must run this command before committing.

npm run gas-changed

Running Unit Tests With Coverage

After running tests with coverage, an lcov report will be exported to coverage/index.html.

npm run coverage

Running Integration Tests On Kovan

You must set the PRIVATE_KEY and KOVAN_RPC_URL environment variables before running integration tests on Kovan.

npm run kovan-integration-tests

Fuzzing With Echidna

You must install Echidna before fuzzing.

npm run fuzz deep {{CONTRACT_NAME}}

Replace {{CONTRACT_NAME}} with a contract that is fuzzed in contracts/echidna. A full list can be found here:

https://github.com/Rari-Capital/nova/blob/master/.github/workflows/fuzz.yml#L13-L14

There are 3 fuzz "modes" setup for this project:

  • deep enters coverage guided inputs until it is halted manually.

    • It uses coverage guided fuzzing, which makes it quite slow.
    • It is the most comprehensive mode (if run for long enough).
  • long enters random inputs for 5 hours before halting.

    • It does not use coverage guided fuzzing.
    • Is less comprehensive than deep.
  • quick enters random inputs for 20 minutes before halting.

    • It does not use coverage guided fuzzing.
    • Is less comprehensive than long.

To use any of these modes simply run the command above but replace deep with the mode you wish to use (long,quick, or deep).

More Repositories

1

rari-dApp

Rari Capital's Web3 Portal.
TypeScript
151
star
2

vaults

Flexible, minimalist, and gas-optimized yield aggregator protocol for earning interest on any ERC20 token.
Solidity
141
star
3

golf-course

A list of common Solidity optimization tips and myths.
118
star
4

fuse-liquidator-bot

Liquidates unhealthy Fuse pool loans.
JavaScript
105
star
5

duppgrade

Update or revert to a specific DappTools commit with ease.
Shell
37
star
6

fuse-contracts

Smart contracts for Fuse by Rari Capital.
Solidity
27
star
7

rari-dApp-next

Rari Capital Dapp
TypeScript
26
star
8

RariSDK

โš™๏ธ An ethers interface for fuse and vaults.
TypeScript
25
star
9

rari-stable-pool-contracts

Smart contracts for the Rari Stable Pool.
HTML
24
star
10

optimistic-wrapped-withdraws

๐ŸŽ Wrap a L2 ERC20 withdrawal event as an ERC1155 subtoken on L1 ๐ŸŽ
TypeScript
17
star
11

fuse-prom-target

Serves data to Prometheus about Fuse
TypeScript
16
star
12

charity-vaults

Share interest from Vaults with charities, friends, and more.
Solidity
15
star
13

docs

Rari Capital Documentation
Vue
15
star
14

OVM-SafeERC20

OVM-safe version of OpenZepplin's SafeERC20.sol
Solidity
10
star
15

rari-governance-contracts

Smart contracts for the Rari Governance system.
Solidity
9
star
16

fuse-v2

Smart contracts for Fuse by Rari Capital.
Solidity
9
star
17

rari-tank-contracts

Smart Contracts for the Rari "Tanks" (Yield Farming With Borrowed Funds)
Solidity
7
star
18

semicen

Contracts for Rari's 'semicen' rebalancer system.
TypeScript
7
star
19

rari-components

A component library for Rari Capital's frontend properties
TypeScript
6
star
20

nova-interfaces

All the key Nova libraries and interfaces in one DappTools friendly repo!
Solidity
6
star
21

nova-invariants

Formal verification and fuzzing of Nova with DappTools.
Solidity
5
star
22

docs-info

Informational and education documentation for Rari Capital.
JavaScript
5
star
23

fuse-simulations

DappTools project for simulating Fuse parameter changes.
Solidity
5
star
24

charity-vaults-ui

User interface for charity vaults.
JavaScript
4
star
25

rari-yield-pool-contracts

Smart contracts for the Rari Yield Pool.
HTML
4
star
26

fuse-webhooks-bot

Serves data to Discord about Fuse
TypeScript
3
star
27

audit

Rari Capital has gone through several audits with Quantstamp to review the following smart contracts: Rari Stable Pool, Rari Yield Pool, Rari Ethereum Pool, and Rari Governance.
3
star
28

rari-tokens-generator

A CLI to generate a JSON file with all the token data Rari uses.
JavaScript
3
star
29

rari-improvement-proposals

The Rari Improvement Proposal Repository
3
star
30

fuse-v1

Smart contracts for Fuse V1 by Rari Capital.
Solidity
3
star
31

rari-ethereum-pool-contracts

Smart contracts for the Rari Ethereum Pool.
HTML
3
star
32

convex-ui

Leverage off your Curve LPs while keeping Convex Rewards (frontend for Fuse pool 156)
TypeScript
2
star
33

fuse-twap-bot

Computes TWAPs for Uniswap V2 pairs and posts to Fuse price oracles.
JavaScript
2
star
34

fuse-margin-interface

InstaLev Next.js Interface (https://github.com/Rari-Capital/fuse-margin)
TypeScript
2
star
35

rari-pool-together-contracts

PoolTogether Yield Interface for the Rari Capital ETH Pool
Solidity
1
star
36

rari-api

JSON-based HTTP API for Rari Capital.
JavaScript
1
star
37

fuse-margin

InstaLev: Margin trade on Fuse. Open leveraged longs/shorts on any asset.
TypeScript
1
star
38

fuse-sdk

JavaScript SDK for easy implementation of Fuse by Rari Capital.
JavaScript
1
star