Badger-Finance / badger-system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bounty: Badger-system utils library

sajanrajdev opened this issue · comments

commented

Badger is a firm believer of the power of open source and the importance of it for building a decentralized world. For this reason, since its inception, the team has opted to open up its main repository, badger-system. This Python (Brownie) and Solidity based repository contains all of Badger's smart contracts and multiple helper functions and tools that facilitate Badger's development, testing and deployment processes. Because of this valuable tools, most of the development of the multiple areas of the Badger infrastructure have taken place off of this repository.

As Badger's technical team expands, the different areas of the BadgerDAO infrastructure grow in complexity and size. This has made a repository fragmentation of the badger infrastructure's codebase inevitable. Unfortunately, these new repositories are missing out on the opportunity to take advantage of the powerful tools that live on badger-system.

This is where you come in…

There is an opportunity to dig into the badger-system repository and compile all of the different helper functions and tools into an easily accessible python library. This library will be instrumental to support Badger's efficient development process and to increase the accessibility of Badger's tools to the larger open source community.

Tools to include and reference code:

  1. Systems: Connection to infrastructure required for interacting with different protocols. These are very handy for writing tests and scripts. It should be able to support the different networks in which protocols exists (reference):
  • BadgerSystem
  • UniswapSystem
  • SushiswapSystem
  • CurveSystem
  • DiggSystem
  • AragonSystem
  • AaveSystem
  • CompoundSystem
  1. Helpers: These are tools made to facilitate several process from deployment, testing and scripting operational tasks.
  • Deployer: Deployment wrappers for infrastructure contracts (reference - These haven't been developed in badger-system - But would be a nice to have):
  • Registry: Returns contracts addresses from badger-registry based on several keys or vaults/strategies based on their author or release status. The badger registry exists on Ethereum, Polygon and Arbitrum (Badger-Registry repo - implementation reference.
  • Proxy utils: proxy deployment and management functions (reference).
  • Gas utils: Brownie gas strategies for production deployment (reference).
  • Coingecko utils: price fetchers (reference).
  • Network manager: Chain network management tools (reference).
  • Time utils: Simple helpers to conveniently manage time in fork environments. Specially handy for testing and scripting (refernece).
  • Token utils: Helpers for tracking token balances throughout script executions (reference).
  • Digg utils: Helpers for working with Digg fragments/shares design (reference1 & reference2).
  • txTimer: Tool used to track and report on transaction execution time (reference).
  • Constants: Several constants used by Badger dev team (reference).
  • Misc: A few misc functions that may come handy - approx, to_tabulate, val (reference).
  1. Testing:
  • Snapshot manager: Powerful tool to check and printout the state of a smart contract at every single stage of a test suite execution. It contains several component but mainly relies on the SnapShot manager library and the specific resolver file developed per implementation. The library should include the SnapShot manager and users willl develop the resolvers on a case by case basis (Although implemented on badger-system, it has already been simplified and extracted into the badger-strategy-mix-v1 - See docs for usage).
  • Simulation manager: Powerful tool that leverages the SnapShot manager and contract resolver to simulate random testing scenarios based on input parameters - number of events, number of actors, what actors (reference).
  • Test Asset generator: Distribute from whales, distribute test ether or swap from ETH (reference1 & (reference2 - swap from ETH may need development).

The library should be compiled into a python package and it should include proper documentation for the usage of the different functions/objects it contains. As you will notice, a lot of these tools rely on brownie and web3 so these two packages should be included and supported.

Lastly, this will be an evergrowing open source project which will require periodical and constant maintenance and updates. This project can (and probably should) be developed by a team or community. Badger will compensate to all contributors for any ongoing work.

Bounty:
100, 50, and 25 badger for the top 3 submissions of merit + upto 500 Baadger for a library useful enough that we adopt it with up to 1000 Badger to finish and maintain the project over the next 6 months to a year.

This is about building tooling for our developers so come talk to us about how we use them in our Builder Discord: https://discord.gg/Tf2PucrXcE

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 600.0 BADGER (11916.0 USD @ $19.86/BADGER) attached to it.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 2 weeks from now.
Please review their action plans below:

1) shakotn has started work.

badger-utils python library that stores helpers and utility functions for Python-based badger projects

Learn more on the Gitcoin Issue Details page.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 600.0 BADGER (11430.00 USD @ $16.73/BADGER) has been submitted by:


Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 36 minutes from now.
Please review their action plans below:

1) ratik21 has started work.

badger-system utils library with proper documentation for the usage of the different functions/objects it contains.

Learn more on the Gitcoin Issue Details page.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 600.0 BADGER (9012.00 USD @ $15.02/BADGER) has been submitted by:

  1. @shakotn

@Tritium-VLK please take a look at the submitted work:


Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 600.0 BADGER (7428.00 USD @ $11.66/BADGER) attached to this issue has been approved & issued to @SHAKOTN.