Skip to content

Commit

Permalink
Merge pull request #5 from lebraat/pgn_mainnet_launch
Browse files Browse the repository at this point in the history
Updated docs structure and redirects. New/updated content for mainnet
  • Loading branch information
Kweiss authored Jul 25, 2023
2 parents 7d8c896 + c810605 commit b5b4abc
Show file tree
Hide file tree
Showing 23 changed files with 616 additions and 238 deletions.
24 changes: 8 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
# Nextra Docs Template
# PGN Docs

This is a template for creating documentation with [Nextra](https://nextra.site).
This repo contains the public documentation for the Public Goods Network (PGN).

[**Live Demo →**](https://nextra-docs-template.vercel.app)
## What is PGN

[![](.github/screenshot.png)](https://nextra-docs-template.vercel.app)
Public Goods Network (PGN) is a low-cost Layer 2 (L2) built on top of Ethereum for supporting public goods. It is built on the [Bedrock](https://stack.optimism.io/docs/releases/bedrock/explainer/) version of [OP Stack](https://stack.optimism.io/), in collaboration with Optimism.

## Quick Start
## Docs stack

Click the button to clone this repository and deploy it on Vercel:
We utilized [Nextra](https://nextra.site) to build these docs, and [Vercel](https://vercel.com/templates/next.js/documentation-starter-kit) to deploy.

[![](https://vercel.com/button)](https://vercel.com/new/clone?s=https%3A%2F%2Fgithub.com%2Fshuding%2Fnextra-docs-template&showOptionalTeamCreation=false)
## Making contributions

## Local Development

First, run `pnpm i` to install the dependencies.

Then, run `pnpm dev` to start the development server and visit localhost:3000.

## License

This project is licensed under the MIT License.
Please feel free to submit issues or pull requests to help us improve these docs!
39 changes: 38 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,41 @@ const withNextra = require('nextra')({
themeConfig: './theme.config.tsx',
})

module.exports = withNextra()
module.exports = withNextra(
{
async redirects() {
return [
{
source: '/getting-started',
destination: '/',
permanent: true
},
{
source: '/using-pgn',
destination: '/using-pgn/adding-pgn-to-a-wallet',
permanent: true
},
{
source: '/getting-started/rpc-endpoints',
destination: '/using-pgn/adding-pgn-to-a-wallet',
permanent: true
},
{
source: '/getting-started/bridge',
destination: '/using-pgn/bridging-eth-to-pgn',
permanent: true
},
{
source: '/getting-started/faucet',
destination: '/using-pgn/bridging-eth-to-pgn',
permanent: true
},
{
source: '/quick-links',
destination: '/',
permanent: true
}
]
},
}
)
31 changes: 7 additions & 24 deletions pages/_meta.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
{
"index": {
"title": "Introduction"
},
"about": {
"title": "About"
},
"getting-started": {
"title": "Getting Started"
},
"quick-links": {
"title": "Quick Links",
"children": [
{
"name": "Bridge",
"href": "https://pgn-bridge.vercel.app/bridge",
"newWindow": true
},
{
"name": "Block Explorer",
"href": "https://explorer.sepolia.publicgoods.network/",
"newWindow": true
}
]
},
"index": "Introduction",
"about": "About",
"faq": "FAQ",
"network-and-contract-details": "Network and Contract Details",
"using-pgn": "Using PGN",
"building-with-pgn": "Building with PGN",
"tools": {"title": "Tools"},
"get-involved": "Get Involved",
"home": {
"title": "Home",
Expand Down
83 changes: 43 additions & 40 deletions pages/about.mdx
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
# About

Public Goods Network (PGN) is a low-cost Layer 2 (L2) built on top of Ethereum
for supporting public goods. It is built on the [OP
Stack](https://stack.optimism.io/), in collaboration with Optimism (like
Coinbase's Base).

**What does that mean?**

For users, it means low transaction costs, with the security of Ethereum. For
application developers, it means the security, stability, and scalability of an
L2. And for public goods maxis, it means secure and regular funding for public
goods without any additional financial commitment required. Simply run and
interact with dApps on PGN.

**Why an L2?**

Public goods funding is not abundant and bountiful. So organizations who believe
in the importance of public goods have to find novel ways to fund them. After
years of raising and deploying capital based on community sentiment (i.e.
Quadratic Funding), Gitcoin recognizes the need to grow the pie from which we
can all fund public goods.

**How does it work?**

PGN will be a network where the vast majority of net sequencer fees go to
projects that are funding and supporting public goods in the Ethereum ecosystem
and beyond. PGN is a rollup run and operated by Gitcoin (and a 3rd party vendor)
that offers discretion in how the sequencer fees are allocated. The vast
majority of net sequencer fees will go to the alliance, using a newly defined
governance model. We will use PGN as a digital schelling point for those who
want to support public goods – this is not for Gitcoin, this is those who want
to establish sustainable, legitimate and deep revenue sources for public goods.

Filling blockspace is, in part, a race to the bottom. The bottom of the stack is
where value capture is the most persistent and accepted. Rather than fill
blockspace for other organizations who may be captured by VCs, or other rent
seeking motivations, we believe we should fill our own blockspace such that we
can reallocate those funds to further the Alliance’s objective of growing and
funding public goods.
# What is PGN?

Public Goods Network (PGN) is a low-cost Layer 2 (L2) built on top of Ethereum for supporting public goods. It is built on the [Bedrock](https://stack.optimism.io/docs/releases/bedrock/explainer/) version of [OP Stack](https://stack.optimism.io/), in collaboration with Optimism and powered by Conduit.

## Why use PGN?

If you would like to support establishing sustainable, legitimate, and deep revenue sources for public goods, PGN is your new go-to L2 Network.

Building and using dApps on L2s provides revenue for the organization or alliance that builds it. PGN will dedicate the vast majority of this revenue to fund public goods, rather than directing profits to venture capitalists.

**This means, simply by using the network, you are supporting public goods and public goods projects.**

*For users*, PGN provides low transaction costs, with the security of Ethereum.

*For application developers*, PGN provides the security, stability, and scalability of an L2.

*And for public goods maxis*, PGN provides secure and regular funding for public goods without any additional financial commitment required.

We are excited to be funding public goods via a legitimate, durable, and deep source of funding. The more block space we fill on PGN, the more public goods we fund!

## What are public goods?

At a high level, Toby Shorin, Laura Lotti and Sam Hart did a great job writing about this topic in their post Positive-Sum Worlds.

They share the definition of public goods as…

**"Anything that is both non-excludable and non-rivalrous, that is, people can’t be barred access, and one person’s use doesn’t degrade another’s."**

Some common examples include services that we use on a daily basis, as well as some important concepts that have emerged in the digital era:
* Public libraries
* Public parks
* Open source software
* Open data
* Open AI models
* Open standards and open content

## How does it work?

The vast majority of net sequencer fees will go to public goods projects. After six months of network launch, fees will be assessed and allocated based on cumulative data. Specific governance details are still being worked on and interested organizations can join the Network Alliance, which will collaborate on governing and determining the split of sequencer fees.

Filling blockspace is, in part, a race to the bottom. The bottom of the stack is where value capture is the most persistent and accepted. Rather than fill blockspace for other organizations who may be captured by VCs, or other rent seeking motivations, we believe we should fill our own blockspace such that we can reallocate those funds to further the objective of growing and funding public goods.

PGN is a rollup run and operated by [Gitcoin](https://www.gitcoin.co/) (and Conduit a 3rd party infrastructure provider) that offers discretion in how the sequencer fees are allocated. PGN will be used as a digital schelling point for those who want to support public goods – this is not for Gitcoin, this is those who want to establish sustainable, legitimate and deep revenue sources for public goods.
27 changes: 27 additions & 0 deletions pages/building-with-pgn.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Building with PGN

## Key resources

* [Network and Contract details](/network-and-contract-details)
* [Deploying on PGN](/building-with-pgn/deploying-on-pgn)
* [Ethereum vs PGN](/building-with-pgn/fees)
* [Fees](/building-with-pgn/ethereum-vs-pgn)


## Why build with PGN?

### Support public goods

Simply put, if you deploy your dApp on PGN, you are helping fund public goods. The vast majority of net sequencer fees goes to funding public goods and public goods projects, and because PGN is an OP chain, it has the same security and speed as OP mainnet. In the future OP will be building interoperability among the Superchain participants. This means seamless bridging and interaction between chains like PGN, Base, OP Mainnet, and more.

Learn more on our [About](/about) page.

### Contract Secured Revenue (CSR)

In the future, PGN will enable CSR to support developer’s need for sustainable revenue sources as well.

Contract Secured Revenue allows smart contract developers to claim a percentage of all transaction/gas fees paid by users when interacting with their smart contracts. This means that the more dApps that build on PGN and the more users that engage with those dApps, the more revenue that will be generated for both the developers deploying those dApps, and for Public Goods.

The following Ethereum Improvement Proposal (EIP) proposes the introduction of CSR on EVM-based L2s (such as PGN) which would provide smart contract developers who deploy on L2s access to revenue streams and/or public goods.

[eips.ethereum.org/EIPS/eip-6968](https://eips.ethereum.org/EIPS/eip-6968)
5 changes: 5 additions & 0 deletions pages/building-with-pgn/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"deploying-to-pgn": "Deploying to PGN",
"ethereum-vs-pgn": "Ethereum vs PGN",
"fees": "Fees"
}
25 changes: 25 additions & 0 deletions pages/building-with-pgn/deploying-to-pgn.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Deploying contracts

## Available development stacks

Since PGN is built with [OP Stack](https://stack.optimism.io/), you can utilize one of the following development stacks. We don’t currently have a strong recommendation on which one you use.

| Development stack | Description |
| --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ApeWorX](https://docs.apeworx.io/ape/stable/userguides/quickstart.html) | ApeWorX is a smart contract development tool for Pythonistas, Data Scientists, and Security Professionals |
| [Brownie](https://eth-brownie.readthedocs.io/en/stable/) | Brownie is a Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine. |
| [Foundry](https://book.getfoundry.sh/) | Foundry is a smart contract development toolchain that manages your dependencies, compiles your project, runs tests, deploys, and lets you interact with the chain from the command-line and via Solidity scripts. |
| [Hardhat](https://hardhat.org/hardhat-runner/docs/getting-started#overview) | Hardhat is a development environment for Ethereum software that consists of different components for editing, compiling, debugging and deploying your smart contracts and dApps. |
| [Remix](https://remix-project.org/) | Remix IDE is used for the entire journey of smart contract development by users at every knowledge level. It requires no setup, fosters a fast development cycle, and has a rich set of plugins with intuitive GUIs. |
| [Truffle](https://trufflesuite.com/docs/truffle/) | Truffle is a world class development environment, testing framework, and asset pipeline for blockchains using Ethereum, aiming to make life as a developer easier. |
| [Waffle](https://ethereum-waffle.readthedocs.io/en/latest/) | Waffle is a library based on Truffle that makes writing and testing smart contracts simpler, sweeter, and faster. |

## Configuring your development stack

Make sure to configure these tools with the correct chain ID and RPC URL to deploy smart contracts to PGN’s mainnet and testnet. See our [network and contract details](/network-and-contract-details) page for more information.

## Request for contributions

If you are interested in contributing to PGN, we’d love to include more specific tutorials that show how to set up, verify, and deploy dApps using these different development stacks.

Please feel free to contribute via our docs [GitHub](https://github.com/supermodularxyz/pgn-docs/pages/building-with-pgn/deploying-to-pgn.mdx), which is linked to from the “Edit this page” button on the right side of this page.
7 changes: 7 additions & 0 deletions pages/building-with-pgn/ethereum-vs-pgn.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ethereum and PGN comparison

PGN is an L2 that was built using the [Bedrock](https://community.optimism.io/docs/developers/bedrock/explainer/#protocol) release of the [OP Stack](https://stack.optimism.io/), which is a standardized, shared, and open-source development stack built on [Ethereum](https://ethereum.org/).

Due to this, PGN shares more similarities with Ethereum than differences. However, there are some key differences that make PGN different from Ethereum.

If you are interested in building on PGN, we strongly recommend you understand the key differences outlined in the OP Stack documentation: [Differences between Bedrock and L1 Ethereum](https://stack.optimism.io/docs/releases/bedrock/differences/)
20 changes: 20 additions & 0 deletions pages/building-with-pgn/fees.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# How do network fees work on PGN?

Since PGN is built using the OP Stack, we directly adopted their gas/fee structure. These fees are very similar to fees on the Ethereum L1 network, but there are some key differences that you need to understand about L2s built on the OP Stack.

Overall, since your PGN transactions are submitted as part of a “rollup” back to the L1, the fees are substantially less to settle compared to settling directly on Ethereum mainnet.

Learn more by reading the [OP Stack transaction fees documentation](https://community.optimism.io/docs/developers/build/transaction-fees/).

### Fee breakdown

Every PGN transaction consists of two costs:
1. An L2 (execution) fee
2. An L1 (security) fee

The L2 fee is the cost to execute your transaction on the L2, and the L1 fee is the estimated cost to publish the transaction on the L1. Typically the L1 security fee is higher than the L2 execution fee.

The L1 fee will vary depending on the amount of transactions on the L1. If the timing of your transaction is flexible, you can save costs by submitting transactions during periods of lower gas on the L1 (for example, over the weekend).

Similarly, the L2 fee can increase and decrease depending on how many transactions are being submitted to the L2. This adjustment mechanism has the same implementation as the L1.

Loading

0 comments on commit b5b4abc

Please sign in to comment.