Project: Optimism

Project: Optimism

This post outlines a new community project: deploying PoolTogether to Optimism. This is the work needed to push PTIP-73 forward. We’ll review the project scope of work, compensation structure, and team.

Abstract

This project will allow users to deposit into PoolTogether on Optimism. Users will be able to select Optimism from the network drop-down and deposit as they do for every other chain.

Motivation

Optimism is an Ethereum L2 with significantly lower transaction costs than Ethereum. Our Ethereum users will be able to migrate their funds to Optimism to take advantage of lower fees.

Additionally, Optimism is launching an incentive program for dapps. By deploying, PoolTogether will become eligible to receive incentives.

Scope of Work

Deploying to a new L2 or sidechain requires updates across both code and infrastructure:

  • Prize Pool Deployment

  • Defender Updates

  • New Subgraph

  • Prize API Updates

  • App Changes

Prize Pool Deployment

A new prize pool will need to be deployed to Optimism. The Optimismic Virtual Machine is EVM-equivalent, so the existing smart contracts should compile as-is without modification. However, Chainlink has not deployed their VRF service to Optimism so we will need to use the original oracle-based architecture.

Defender Updates

Defender is a key piece of infrastructure that we use to run automated transactions. We will need to deploy Defender autotasks that award the Optimism prize pool and flush yield into the Prize Distributor.

New Subgraph

Our Prize API depends on a Graph subgraph to efficiently track TWABs from the Ticket token. This subgraph needs to be deployed so that our Prize API functions correctly. The subgraph does not need any changes.

Prize API Updates

The Prize API does the hard number crunching to compute the winning picks for each user. That way they don’t need to run extensive hashing calculations in the browser. The Optimism pool will need to be added to the Prize API configuration.

App Changes

The main PoolTogether app will need to be updated to support the Optimism network, to consume the Prize API for Optimism, and display Optimism Ticket balances. No new design is needed; the existing Polygon interface components just need to be adapted for Optimism.

Implementation Plan

The Optimism implementation will occur in two stages: testnet and production. This provides the team with ample opportunity to test the integrity of the system, run quality assurance checks, and practice the coordination required to get the system up and running.

Stage 1: Testnet

The testnet phase is where the bulk of the work will happen. The updates outlined in the above scope of work will all be made and deployed to the Optimistic Kovan network. The team will run quality assurance checks to make sure the integration functions properly and iron out any bugs that are discovered.

Stage 2: Production

Once the bugs have been worked out, the team will deploy a production configuration to Optimism. Final checks will be made, then the executive team team will finalize the deployment with liquidity and enable prizes.

Compensation Structure

Bounties will be created for each element of the above scope of work. Each bounty will include both the testnet stage and the production stage. The contributor will be paid out 50% after each stage. It is expected that the contributor supports other team members until the project has been delivered to production.

A recruitment fee will be paid out to the recruiter, if any, after the project is complete.

Team

The project will be lead by PT Inc. We will be coordinating and helping the team learn the ins-and-outs of the codebase.

Team members will be recruited according to their qualifications, but PoolTogether community members will be prioritized. Contributors may take on more than one bounty, depending on their qualifications. Contributors may also team-up on bounties.

Next Steps

  1. Bounty drafts will be posted in the Bounties category here on Discourse. Once they are finalized, we can create official bounties on Dework.

  2. Contributors will apply through Dework

  3. Once we have enough contributors, we’ll kick off the project in the #developers channel on Discord. We’ll introduce everyone to eachother and start sequencing the work.

For You

Have feedback? Please reply! We’re taking our first steps as a community-led project. Let’s get this right.

12 Likes

Thank you, Brendan! Our community has built a strong base of engaged developers who seem to have

  • a passion for PoolTogether and its vision
  • a substantial understanding of the protocol’s architecture
  • the desire for more complex tasks and opportunities to grow

I’m all for it and believe this is a good time to give our dedicated builders a chance to get further involved.

Tagging some people I’d like to hear the opinions of: @Max @underthesea @drcpu @BRONDER @Ncookie @Adminaiden @treebeard @DaBoom @GandalfsDad

3 Likes

This idea sounds super interesting to me, but it also has its problems.

Just speaking for myself, I’m used to reading code, but I hardly ever write it myself. I also make small fixes on existing code, but I don’t develop it from scratch. That’s why it’d probably take me some time to be able to help more than I would disturb.

I guess other people, although more experienced than me, will also probably be a bit new when it comes to crypto deployments. Therefore, the risk is that this may be delayed due to our inexperience.

That being said I’ve been thinking for a while about learning how to properly code and be able to deploy some stuff on crypto.

To start my journey, any documentation I should start with specifically for these tasks?

5 Likes

If you are interested in applying for the bounties and want to discuss your qualifications please reach out to myself in the #bounties channel on Discord.

I am super appreciative that this is being made possible. I hope to participate and contribute in some way, but more than anything I can’t wait to see the success of community engagement at the protocol layer. I truly believe this endeavor will have long-lasting benefits for PoolTogether as a whole. I am also really stoked for us to venture into the land of rollups.

Thank you.

4 Likes

I’m keen to get involved in some capacity but probably would echo BRONDERs comments about not wanting to be a hinderance :blush:.

I think i’ll try and spend some time this weekend in preparation reading more about Optimism deployments and the PT stack (i’m still only new). Hopefully theres some bounties that are achievable :metal: .

4 Likes

This is brilliantly executed @Brendan. You’re working overtime and it’s amazing. Good luck finding candidates!

2 Likes

I really like this idea ! Giving the community the ability to be part of the project not only by using the protocol but also by developing for the protocol is really exciting.
As some have said above not everybody is skilled enough to do a good job now, but at least everyone can learn and everyone can be useful !

To start we could improve the developper section on discord by adding a thread with valuable ressources such as Solidity courses and tutorials (some people are doing a great job on Youtube as well), security in smart contracts (really important !!), and everything that can give knowledges for people who want to help.
I’m also thinking for a long time about a way to educate non-crypto users about PoolTogether (where does the yield come from, how we ensure the security of the users’ funds, how to get in and out in an easy way etc…) and the world of cryptos (alway from a non-crypto user way), something like a PoolTogether Academy, a developper section could make a lot of sense here as well.

Also love the Bounties, it’s a good way to feel involved (if we have bounty for beginners as well as for experts). A protocol for the community, really built by the community.