Fully on-chain retro-generative public goods funding app deployed with Optimism. Our implementation includes funding initiation with a curated whitelist, a smart contract that executes quadratic voting and fund disbursement logic and a dashboard to access on-chain data.
Abstract: Retr0x implements a novel mechanism for funding public goods that add the most value to humanity. The core idea is to combine both retroactive and future (re-generative) funding of projects into a single protocol in a way that best incentivizes development of the work. We call this mechanism Retro-Generative Public Goods Funding. Once funding allocation has been decided, the retroactive part of the funding is delivered in a lump sum to the recipient whilst the re-generative funding is streamed continuously over a set period. The stream of funds can be cancelled at any time, ensuring that the recipients maintain their enthusiasm for their work well into the future. In this hackathon, we have built a first prototype for a DApp that implements the protocol. In brief, this consists of a smart contract that executes the voting and fund disbursement logic, a dashboard that accesses the on-chain data, and a Data Availability solution provided by IPFS. We utilise the Optimistic Rollup Optimism to provide reduced costs for on-chain logic without any security compromise in comparison to an implementation on the Ethereum mainnet. Introduction: Public goods are defined to be non-excludable and non-rivalrous and are often chronically underfunded. Examples include open software, information, fresh air, privacy or foundational research. These are both highly used and underappreciated by many. It is often difficult to predict which sort of public good projects will amass the largest amount of positive externality and should be funded heavily and thus a new funding framework was recently proposed by Vitalik. The simple idea is that it is in fact much easier to designate what has been useful in the past. Additionally, a continuous streams of re-generative funding, as coined in Green-pilled for projects is beneficial at ensuring the incentives of project maintainers are well aligned for long term development. Immediate unlocking of all funds would have the same effect as traditional funding where projects receive large amounts of upfront funding whilst it is difficult to predict whether this will continue to be useful in future and whether funds will be used optimally. One can design a process to even stop the streaming of funds when certain conditions are not met. Implementation: The core voting and fund disbursement logic is handled by Retr0x contract. Public good funding rounds with a particular thematic focus can be initiated by an initial funder called the Round Initiator. Round Initiators provide information on the categories of public goods projects that they want funded along with a curated whitelist of experts (badge-holders) who perform quadratic voting to optimally allocate funds. Additionally, they are required to provide a significant contribution of funding to the round. This initializes a three week nomination period where individuals can submit a nomination for a particular public good, with a required stake to prevent spam. The nomination information is stored on IPFS and subsequently put on-chain into the Retr0x contract. Full transparency ensures that nefariously acting nominators can be flagged. Quadratic voting is a popular mechanism for allocating resources to members of a set in a way that prevents the accrual of too large a resources for any single member of set. In future, more sophisticated mechanisms for designating badge holders based on expertise, knowledge and experience can be used that will require more research and careful design. We are excited to explore these avenues for alternative voting schemes in the future. Once votes have passed, funds are automatically disbursed to the addresses specified in the nominations. Funders and those being funded don't need to trust each other or any centralised entity; everything is recorded and executed on-chain. Funds are disbursed in proportion to votes received and the stake for nominations is sent back to successfully funded nominations only. Half of the funds are sent immediately as retroactive public goods funding and half of the funds are streamed through the Superfluid platform. To sum up, Projects are rewarded for their past provision of value and also receive a small continuous stream of income to optimally support future provision of value. We also provide tools to visualise the disbursement of funds from past rounds and all data can be downloaded from our dashboard as a CSV. This allows people to see precisely where funds have gone, enabling accurate evaluation of previous funding rounds that we hope will lead to better funding decisions in future. Outlook: Our aim is full transparency and optimal allocation of funds in proportion to the value of the public good provided by nominated projects. Building Retr0x portably and transparently unlocks this possibility and broadens the scope of public good funding. Our application can also be deployed for other funding use cases and is very flexible, for instance the amount of immediately disburse-able and stream-able funds can be adjusted, as well as the voting logic. Moreover, one doesn't necessarily require individuals to fund rounds out of their own pockets, but we also envision funding through protocol fees, as was done in the retroactive public goods test round hosted by Optimism in 2021
How it's made
We use Solidity for smart contract development and deploy our contracts with Infura and HardHat on Optimism. The continuous streaming of funds is implemented with SuperFluid. Our front-end is built with next.js + tailwind CSS and our backend is entirely decentralized: our contract is deployed on the Optimism network and all data for round initialization, whitelisting and nominating is hosted on IPFS for public viewing. We use the Sign-In With Ethereum standard with the Spruce package to authenticate users and ethers.js to construct our JSON RPC calls and sign transactions. Logging in is done with MetaMask.