Git Product home page Git Product logo

aave-asteth-incentives-controller's Introduction

AAVE Incentives Controller For AStETH Asset

This repository contains an implementation of incentives controller for AStETH token in AAVE protocol. AAVE protocol allows the use of incentives controllers in their AToken, VariableDebtToken, and StableDebtToken contracts to distribute rewards on a token mint, burn or transfer. Lido's integration in AAVE uses a custom implementation of AToken - AStETH.

Core Contracts

AaveAStETHIncentivesController.sol

Contains logic to the linear distribution of reward tokens across holders of AStETH, proportional to the number of tokens the user hold. Contract inherits from the OpenZeppelin's Ownable contract and implements Unstructured Storage pattern to simplify future updates of incentivization logic. The contract uses RewardsUtils library to reusable and convenient work with rewards

RewardsUtils.sol

Provides structs and a library for convenient work with staking rewards distributed in a time-based manner.

Project Setup

To use the tools provided by this project, please pull the repository from GitHub and install its dependencies as follows. It is recommended to use a Python virtual environment.

git clone https://github.com/lidofinance/aave-asteth-incentives-controller.git
cd aave-asteth-incentives-controller
npm install
poetry install
poetry shell

Compile the smart contracts:

brownie compile # add `--size` to see contract compiled sizes

Testing

The fastest way to run the tests is:

brownie test

Run tests with coverage and gas profiling:

brownie test --coverage --gas

Scripts

deploy.py

Contains script to deploy and setup RewardsManager and AaveAStETHIncentivesController contracts. Deployed RewardsManager used as rewards distributor in the AaveAStETHIncentivesController contract.

initialize_staking_token.py

Contains script to finalize deployment of AaveAStETHIncentivesController. This script must be run after deployment of AStETH token, to set address of stakingToken. As part of the initialization transfers ownership to Lido's Agent.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.