Skip to content

Euler Earn, An ERC4626 vault for passive yield earning.

License

Notifications You must be signed in to change notification settings

euler-xyz/euler-earn

Repository files navigation

Euler Earn

Introduction

Euler Earn is an open source protocol for permissionless risk curation on top of ERC4626 vaults(strategies). Although it is initially designed to be integrated with Euler V2 vaults, technically it supports any other vault as long as it is ERC4626 compliant.

The Euler Earn in itself is an ERC4626 vault, and any risk curator can deploy one through the factory. Each vault has one loan asset and can allocate deposits to multiple strategies. Euler Earn vaults are noncustodial and immutable instances, and offer users an easy way to provide liquidity and passively earn yield.

For more details, please refer to the whitepaper and the low-level spec.

Local Development

InheritanceDiagram

Euler Earn comes with a comprehensive set of tests written in Solidity, which can be executed using Foundry.

To install Foundry:

curl -L https://foundry.paradigm.xyz | bash

This will download foundryup. To start Foundry, run:

foundryup

To clone the repo:

git clone https://github.com/euler-xyz/euler-earn

Build

forge build

Test

To run the unit-tests and the e2e test:

FOUNDRY_PROFILE=test forge test

To run the fuzz tests:

FOUNDRY_PROFILE=fuzz forge test

To run the invariants tests:

FOUNDRY_PROFILE=invariant forge test

To run foundry coverage:

FOUNDRY_PROFILE=coverage forge coverage --report summary

To run echidna based fuzzing:

echidna test/echidna/CryticERC4626TestsHarness.t.sol --contract CryticERC4626TestsHarness --config test/echidna/config/echidna.config.yaml

To run symbolic tests using Halmos:

halmos --match-contract EulerEarnSymbolicTest --storage-layout=generic --test-parallel --solver-parallel --solver-timeout-assertion 0

Enigma Dark Invariants

invariant-suite-overview.png

To know more about the invariants suite overview and architecture, please read the Enigma overview and internal docs.

To run echidna property mode:

make echidna

To run echidna assertion mode:

make echidna-assert

To run medusa:

make medusa

Format

forge fmt

Smart Contracts Documentation

forge doc --serve --port 4000

Scripts

You can find foundry scripts inside the /script dir to interact with Euler Earn protocol. For more details, please check the scripts usage document.

Security

This software is experimental and is provided "as is" and "as available".

No warranties are provided and no liability will be accepted for any loss incurred through the use of this codebase.

Always include thorough tests when using Euler Earn protocol to ensure it interacts correctly with your code.

All audits are stored in the audits' directory.

Known limitations

Refer to this doc for a list of known limitations and security considerations.

License

Licensed under the Business Source License 1.1.

About

Euler Earn, An ERC4626 vault for passive yield earning.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages