Git Product home page Git Product logo

aave-interest-rate-update's Introduction

AAVE ETH Interest Rate Strategy Update

This repository contains the payload to update the AAVE V2 WETH Liquity Pool interest rate strategy.

Specification

The Proposal Payload does the following:

  1. Sets the new interest rate strategy address.

The new interest rate strategy is deployed here: https://etherscan.io/address/0x853844459106feefd8C7C4cC34066bFBC0531722

The changes are as follows:

==========================================
| Parameter	   Current (%)	Proposed (%)
==========================================
| Uoptimal	  |   70       |  80     |
------------------------------------------
| Base	          |   0        |  0      |
------------------------------------------
| VARIABLE RATES                         |
------------------------------------------
| Slope1	  |   3.0      |   5.75  |
------------------------------------------
| Slope2	  |   100      |   80    |
------------------------------------------
| Reserve Factor  |   10       |   15    |
------------------------------------------
| STABLE RATES                           |
------------------------------------------
| Slope1	  |   4.0      |   4.0   |
------------------------------------------
| Slope2	  |   100      |   80    |
------------------------------------------
| Reserve Factor  |   10       |   15    |
------------------------------------------

The function used to set the strategy comes from the @aave-address-book library

  /**
   * @dev Sets the interest rate strategy of a reserve
   * @param asset The address of the underlying asset of the reserve
   * @param rateStrategyAddress The new address of the interest strategy contract
   **/
  function setReserveInterestRateStrategyAddress(
    address asset,
    address rateStrategyAddress
  ) external;
  1. Sets the new reserve factor for the liquidity pool:

The function used to set the reserve factor comes from the @aave-address-book library

/**
   * @dev Updates the reserve factor of a reserve
   * @param asset The address of the underlying asset of the reserve
   * @param reserveFactor The new reserve factor of the reserve
   **/
  function setReserveFactor(address asset, uint256 reserveFactor) external;

Installation

It requires Foundry installed to run. You can find instructions here Foundry installation.

To set up the project manually, run the following commands:

$ git clone https://github.com/llama-community/aave-interest-rate-update.git
$ cd aave-interest-rate-update/
$ npm install
$ forge install

Setup

Duplicate .env.example and rename to .env:

  • Add a valid mainnet URL for an Ethereum JSON-RPC client for the RPC_MAINNET_URL variable.
  • Add a valid Private Key for the PRIVATE_KEY variable.
  • Add a valid Etherscan API Key for the ETHERSCAN_API_KEY variable.

Commands

  • make build - build the project
  • make test [optional](V={1,2,3,4,5}) - run tests (with different debug levels if provided)
  • make match MATCH=<TEST_FUNCTION_NAME> [optional](V=<{1,2,3,4,5}>) - run matched tests (with different debug levels if provided)

Deploy and Verify

  • make deploy-payload - deploy and verify the payload
  • make deploy-proposal- deploy proposal on mainnet

To confirm the deploy was successful, re-run your test suite but use the newly created contract address.

aave-interest-rate-update's People

Contributors

efecarranza avatar

Watchers

 avatar  avatar

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.