Skip to content

🥨 Contracts for Merkl, Angle Labs incentivization product for concentrated liquidity AMMs

License

Notifications You must be signed in to change notification settings

AngleProtocol/merkl-contracts

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 12, 2024
2b9c9df · Jan 12, 2024

History

62 Commits
Jan 12, 2024
Jan 30, 2023
Jan 12, 2024
Jan 12, 2024
Jan 10, 2024
Oct 19, 2023
Jan 12, 2024
Jan 12, 2024
Nov 8, 2022
Jun 27, 2023
Nov 28, 2022
Nov 2, 2023
Nov 8, 2022
Nov 8, 2022
Jan 12, 2024
Nov 2, 2023
Nov 2, 2023
Jan 30, 2023
Nov 2, 2023
Nov 2, 2023
Nov 8, 2022
Nov 8, 2022
Mar 7, 2023
Nov 2, 2023
Aug 4, 2023
Jan 10, 2024
Nov 8, 2022
Jan 12, 2024
Nov 8, 2022
Nov 17, 2023
Nov 2, 2023
Nov 8, 2022
Jan 12, 2024

Repository files navigation

Merkl Contracts Merkl Contracts

CI

This repository contains the smart contracts of the Merkl product developed by Angle.

It basically contains two contracts:

  • DistributionCreator: to which DAOs and individuals can deposit their rewards to incentivize a pool
  • Distributor: the contract where users can claim their rewards

You can learn more about the Merkl system in the documentation.

Setup

Install packages

You can install all dependencies by running

yarn
forge i

Create .env file

In order to interact with non local networks, you must create an .env that has, for all supported networks (Ethereum, Polygon and Arbitrum):

  • MNEMONIC
  • ETH_NODE_URI
  • ETHERSCAN_API_KEY

You can copy paste the .env.example file into .env and fill with your keys/RPCs.

Warning: always keep your confidential information safe.

Tests

Contracts in this repo rely on Hardhat tests. You can run tests as follows:

# Whole test suite
yarn hardhat:test

# Only one file
yarn hardhat:test ./test/hardhat/distributor/distributor.test.ts

You can also check the coverage of the tests with:

yarn hardhat:coverage

Deploying

yarn deploy mainnet

Foundry Installation

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

source /root/.zshrc
# or, if you're under bash: source /root/.bashrc

foundryup

To install the standard library:

forge install foundry-rs/forge-std

To update libraries:

forge update

Audits

The Merkl smart contracts have been audited by Code4rena, find the audit report here.

Media

Don't hesitate to reach out on Twitter 🐦