How To Contribute To Open Source Crypto Projects

How To Contribute To Open Source Crypto Projects

Rahul Ravindran

Open source contributions are a great way to learn, engage and understand how some of the biggest crypto startups actually function. Regardless if you are a complete beginner or a software veteran – there is always an opportunity to contribute and help the engine powering the crypto revolution. In this article, we will look at a step by step technical guide for contributing to open source crypto projects.

Interesting crypto open source projects

Uniswap:

Uniswap is one of the most influential decentralized finance protocol that is used to exchange cryptocurrencies.The protocol facilitates automated transactions between cryptocurrency tokens on the Ethereum blockchain through the use of smart contracts.

Uniswap Github

Compound Finance:

Compound is an algorithmic, autonomous interest rate protocol built for developers, to unlock a universe of open financial applications.

Compound FInance Github

You can find tons of projects by following this github topic.

But, why contribute to open source?

Understanding why people contribute to opensource can be a little counterintuitive at first – let’s look at why should you consider contributing:

1. Improve your technical skill: It’s hard to improve your technical skill set once you have covered the basic 101 training unless you work on real world projects. This is probably one of the biggest reason why people contribute to open source projects.

2. Get Paid for efforts: This is especially true for the crypto community. Most projects offer generous rewards in form of tokens for your effort – which can really appreciate in value for right projects.

3. Get Industry Insights: Even if you are an experienced software developer, open source projects should give you industry insights on how world class softwares that touches millions of people is written and maintained. It can also give you an understanding of the tools of the trade that can greatly improve your productivity.

4. Grow your network: Open source by definition is a community effort and you’ll inevitably meet people from your field and you could also benefit from paid work that might come your way.

5. Supercharge your Resume: Open source is the ultimate show not tell signal in your resume. Most reputable companies greatly value open source contributions. So if your end goal is to get a well paying job, open source is a great place to start.

6. It’s empowering to be able to make changes, even small ones: You don’t have to become a lifelong contributor to enjoy participating in open source. Have you ever seen a typo on a website, and wished someone would fix it? On an open source project, you can do just that. Open source helps people feel agency over their lives and how they experience the world, and that in itself is gratifying.

According to a 2016 Future of Open Source Survey Results by BlackDuck, around 67% of participation in open source has been to fix bugs and add new features, and 59% of developers participate in open source to gain a competitive edge.

What are the kinds of contributions you can make?

Following are the various kinds of contributions you could start making:

Report Bugs: If you consume an open source project and encounter a bug you should create an issue with detailed information about the bug and the steps to reproduce it. That way someone you make the community aware and anyone interested can fix it.

Fix a bug: You can also browse the list of issues in the project repositories and fix a bug

Request a new feature: If you think an important feature is missing you could suggest it to the community.

Add a new feature: You could also add a feature yourself. This is a great opportunity to learn more about the project.

Update documentation: There is a great chance the documentation of the project is not upto date given the pace at which open source operates. You can help your fellow users by offering to add relevant documentation to the project. This also serves a good starting point.

Seriously, [documentation] is mega-important. The documentation so far has been great and has been a killer feature of Babel. There are sections that could certainly use some work and even the addition of a paragraph here or there is extremely appreciated. — @kittens, “Call for contributors”

Review a pull request: If you are an experienced developer you could review a pull request and ensure it meets the contribution guidelines. There is generally a shortage of reviewers given the influx of pull requests from people wanting to contribute.

Anatomy of an open source project

Every open source community is different yet many open source projects follow a similar organizational structure. Understanding the different community roles and overall process will help you get quickly oriented to any new project.

A typical open source project has the following types of people:

Author: The person/s or organization that created the project

Owner: The person/s who has administrative ownership over the organization or repository (not always the same as the original author)

Maintainers: Contributors who are responsible for driving the vision and managing the organizational aspects of the project (They may also be authors or owners of the project.)

Contributors: Everyone who has contributed something back to the project

Community Members: People who use the project. They might be active in conversations or express their opinion on the project’s direction

Bigger projects may also have subcommittees or working groups focused on different tasks, such as tooling, triage, community moderation, and event organizing. Look on a project’s website for a “team” page, or in the repository for governance documentation, to find this information.

A project also has documentation. These files are usually listed in the top level of a repository.

LICENSE: By definition, every open source project must have an open source license. If the project does not have a license, it is not open source.

README: The README is the instruction manual that welcomes new community members to the project. It explains why the project is useful and how to get started.

CONTRIBUTING: Whereas READMEs help people use the project, contributing docs help people contribute to the project. It explains what types of contributions are needed and how the process works. While not every project has a CONTRIBUTING file, its presence signals that this is a welcoming project to contribute to.

CODE_OF_CONDUCT: The code of conduct sets ground rules for participants’ behavior associated and helps to facilitate a friendly, welcoming environment. While not every project has a CODE_OF_CONDUCT file, its presence signals that this is a welcoming project to contribute to.

Other documentation: There might be additional documentation, such as tutorials, walkthroughs, or governance policies, especially on bigger projects.

Finally, open source projects use the following tools to organize discussion. Reading through the archives will give you a good picture of how the community thinks and works.

Issue tracker: Where people discuss issues related to the project.

Pull requests: Where people discuss and review changes that are in progress.

Discussion forums or mailing lists: Some projects may use these channels for conversational topics (for example, “How do I…“ or “What do you think about…“ instead of bug reports or feature requests). Others use the issue tracker for all conversations.

Synchronous chat channel: Some projects use chat channels (such as Slack or IRC) for casual conversation, collaboration, and quick exchanges.

Prerequisite

Get to know git & github

Git is a version control software that almost all open source projects use a version control system, a tool that helps with merging new code into the project (the main “repository”). Usually, the collaboration is centred around a website that hosts the central repository. These websites include Github, Bitbucket and Gitlab, though Github is by far the most popular.

We’ll need to create a GitHub account, and install git. We’ll use these tools to publicly merge new code into the open source repository.

Here are links to few resources to get you started:

Git & GitHub Crash Course For Beginners — Traversy Media

Git and GitHub Tutorials for Beginners — The Net Ninja

Set up git on your computer

Books on open source development:

A classic book about OSS is The Cathedral and the Bazaar. It explores “bazaar” style development, a bottom-up approach that gives power to the developers and the users. Comparing it with the “cathedral” style, a top-down approach where the power lies with managers and product owners.

It’s these ideas that gave rise to work approaches such as that described in the Agile Manifesto. But no matter how much corporations have tried to emulate a “bazaar” approach to development, they can’t do it quite so well as open source projects.

Getting started with blockchain development

If you are an absolute beginner then try starting a bit smaller with a more basic guide: Setting up an Ethereum Development Environment. If you are focusing on any other blockchain, you could read up their developer documentation to set up the local development environment.

Making your first contribution

Before going further, I advise you to read the code of conduct and the contribution guidelines. Please read them carefully before you start contributing because it explains what is expected from you. It also describes the workflow required to make contributions. The Open-Source guide has a great article on this subject — Your Code of Conduct.

1. Find a project

Finding a project to contribute to is a difficult task. I advise you to start small and pick a small project at first. Why? Things move faster in a small project, and it’s more likely to get your first contribution. But if you feel adventurous, you can start with a bigger project!

Moving further, there are a handful of useful websites which you can use to find projects and issues suited for beginners. Here is a non-exhaustive list:

goodfirstissues.com — This website is great because it only contains issues that are suited for first time contributors; that is, for beginners. You can filter projects by programming language and repository.

goodfirstissue.dev — More or less, the same thing as the above website. Good First Issue curates easy pickings from popular open-source projects and helps you make your first contribution to open-source.

up-for-grabs.net — This website is a list of projects which have curated tasks specifically for new contributors.

github.com/explore — This is the explore page from Github itself. You can find lots of projects, but you have to search for issues suited for beginners manually.

Further in this article we will be looking at how to contribute to the Uniswap Protocol as an example.

2. Deciding what to contribute

To get started, skim the repository readme or the project home page to become familiar with the project and the development process.

You could also look at the list of issues to see if there is something that interests you:

3. Forking the repository

To start making changes you need to make a copy of the github repository to your own github profile, unless you have write access to the repository. Click the fork button on the top right of the github repository home page.

4. Cloning the repository locally

Next we’ll go to the forked repository page in our account’s repositories. We’ll click the green code button, then the SSH tab, and finally the ‘copy to clipboard’ button on the right.

Next we’ll copy the repository to our local machine. We’ll open the terminal and navigate to our programming projects folder. Type “git clone” followed by the ssh address of the forked repository.

5. Setting up the local development

For uniswap we’ll follow the instructions on the readme to set up the local development environment. You may need to install node.js, since development packages are managed by the node package manager.

In order to deploy this code to a local testnet, you should install the npm package @uniswap/v3-core and import the factory bytecode located at

@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json. For example: import {

abi as FACTORY_ABI,

bytecode as FACTORY_BYTECODE,

} from ‘@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json’

// deploy the bytecode This will ensure that you are testing against the same bytecode that is deployed to mainnet and public testnets, and all Uniswap code will correctly interoperate with your local deployment.

Uniswap uses hardhat for local development, which is a fast and extensible local development suite. You can learn more about hardhat on their website.

You should also install the metamask browser extension which you can use to connect to your local hardhat blockchain.

Here are the instructions to get started with metamask and hardhat.

Start a hardhat node
npx hardhat node

Connect hardhat node to Metamask
Open Metamask > Select the network dropdown from the top left > Select Custom RPC and enter the following details:

  • Network Name: “Your Network Name”
  • New RPC URL: http://127.0.0.1:8545
  • Chain ID: 31337 Click save. You can use this network to connect to the local hardhat node.

Connect your local hardhat account to Metamask for making transactions

After running npx hardhat node you will see a list of 20 addresses logged in the terminal

To configure an account, copy its private key from the terminal (i.e the text after Private Key:)

Open Metamask > Click the account icon on top right > Import Account > Paste the private key you just copied > click Import

You should now have the account connected with 10000 ETH

6. Making and committing your changes

If you type git status you will see the branch name that you’re on, called master. In most projects, master is a special place where the most stable, reviewed, up-to-date code is.

So, you’ll need to make your own branch:

git branch a-descriptive-name

Then switch to that branch:

git checkout name-for-your-branch

But what exactly is a branch? As a developer is working, they may want to be able to switch back and forth between the stable master code and the changes they’ve made. Branches let you do that. A branch is kind of like a fork on your computer. When you have your own branch, it’s a place where you can make changes without affecting the master branch.

Once you have made changes to the required file you can commit your changes by running.

git commit -m “ your message ”

You can see the git commit command in action above. The `-m’ flag stands for “message”, and it allows you to summarise your changes. That means you should describe what you did in the project. Try to make the commit messages as concise and descriptive as possible. At the same time, it does not mean you should write a novel.

The last step is to “push” the changes to the remote repository. Until you “push” your changes, they are only available in your local repository. That is, nobody can see them except yourself.

To push your changes, run the following command:

git push

You are almost done now! The next and last step is to create a Pull Request, which you’ll see in the next chapter.

7. Running Tests If there are any

Instructions for running tests are usually in the project’s README.md or CONTRIBUTING.md files. It’s important to make sure that you don’t break anybody else’s work. If there are any tests that fail, your work will probably not be accepted until either you fix your code or change the test.

If there are no tests, well then… I guess you know what your next contribution should be 😉

For uniswap, you can run tests by running the command npm hardhat test on your terminal. If all tests pass you are ready to publish your changes!

8. Creating a pull request

To let the maintainer or contributor know that you are ready to submit your changes, you can go to the repository URL > Pull requests tab > click on the Compare & pull request. See figure below.

9. Expect changes and be patient

Next up, a maintainer or contributor will review your code. This is an important part of doing open source!

If someone asks you to make changes, don’t feel bad! It’s part of the learning process. Most maintainers will be so happy for the help and love having new people pitch in. Keep in mind it may take a little while before someone reviews your work. If no one gets to you within a couple weeks, it may be appropriate to @ a maintainer in a comment on your PR.

Just remember that they are volunteers, so please be kind. A good way to figure out who to ping is looking at the closed pull requests and seeing who commented/did the merges.

10. Once your work is approved, it will be merged in!

Congratulations and thank you for giving back to the open source community 🙂 This whole thing only works because of people like you and you are officially an open source contributor!

Closing Thoughts

As an open source developer you have come a long way. As next steps you could start attending conferences, work your way up to get paid for open source development, be a mentor and apply to open source competitions or shine your CV. You should mention all the projects that you have contributed to on your CV or add a link to your GitHub account on your CV or in a cover letter. You’ll be doing great, we believe in you!

0 Comments

Leave a Reply

More great articles

Terra Protocol

Terra’s Rise as Ethereum Killer

Terra is a decentralized financial infrastructure and blockchain protocol that introduces some unique concepts and theories into the market. The…

Read Story
Terra Protocol

Getting Started With Terra Protocol

Terra is a decentralized financial infrastructure and blockchain protocol that introduces some unique concepts and theories into the market. The…

Read Story

Ultimate Solidity Interview Questions 2022

What are primitive data types in Solidity? Primitive data types in solidity are: - boolean - uint - int -…

Read Story

Never miss a minute

Get great content to your inbox every week. No spam.
[contact-form-7 id="6" title="Footer CTA Subscribe Form"]
Arrow-up