Project: Optimism

This post outlines a new community project: deploying PoolTogether to Optimism. This is the work needed to push PTIP-73 12 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 9 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.