This tool was inspired by Leighton’s idea of building an interface that centered around “donating your winnings" use case.
Abstract
This project is a tool that allows users to deposit and delegate their chances of winning to Optimism RetroPGF round 2 in one click gasless no loss donation; helping fund public goods that support development and usage of the OP Stack
Motivation
RetroPGF is Optimism mechanism of funding open source software. The Optimism Collective’s second round of Retroactive Public Goods Funding (RetroPGF) takes place in Q1 2023.
This tool aims to simplify the stage of a user journey of depositing and delegating to RetroPGF in PoolTogether. While the PoolTogether frontend is extremely well designed, it is constrained by EOA wallets’ limitations. A user wanting to deposit and delegate to RetroPGF with an EOA has a multi-step process involving several transaction executions and two different web pages.
We want to harness the power PoolTogether as a no loss saving protocol and CANDIDE account abstraction benefits to remove frictions in participating in public goods funding.
CANDIDE is an open source smart contract wallet focused on Optimism and its ecosystem.
How it works
Users connect to the tool with their wallet using WalletConnect, and select the amount they want to deposit and delegate to. They then get a request in their wallet to confirm the operations
Main Contract Interaction
PoolTogether’s StakePrizePool and TWABDelegator on Optimism
Function Calls
The tool’s frontend communicates JSON-RPC method for sending multiple function calls from the user’s wallet. The tool offers a one-click experience for multi-step interactions of bundled calls that approve USDC, deposit to the pool and delegate the tickets to RetroPGF.eth. The standard for communication used is EIP-5792. The following function calls are communicated:
-
approve
X USDC erc-20 contract -
deposit
X USDC token to StakePrizePool contract -
approve
X TICK erc-20 contract -
stake
with delegator address and X Tickets in TWABDelegator contract -
createDelegation
with delegator address, slot and delegatee and lock duration in TWABDelegator contract -
fundDelegation
with the delegator address, slot, and amount of tickets in TWABDelegator contract
Wallet compatibility
Smart contract wallets that support EIP-5792. EOA wallets like Metamask cannot execute bundled function calls.
Gas abstraction
CANDIDE is proposing the ability to abstract gas through both sponsorship and allowing users to pay network fees in USDC.
Gas Sponsorship Proposal
One of the most discussed barriers for user adoption is gas. Users need to purchase ETH to get started with any operations with their wallet. With account abstraction, CANDIDE allows people to start transacting on protocols like PoolTogeher without owning any ETH.
We are proposing for Pooltogether to sponsor 1000 deposits. Each operation will cost approximately 0.0005 ETH based on a 750,000 gas limit. This amounts to total gas sponsorship of 0.5 ETH. (These numbers are approximated, and I will try to provide more accurate numbers once we do more tests on optimism mainnet).
This sponsorship aims to spread awareness of both public goods funding and the delegation feature of PoolTogether.
To mitigate against sybil resistance, only operations that passes the following will be sponsored:
- A minimum deposit of $200
- A minimum lock duration of 3 months
With current USDC yield at ~1.5% on AAVE and OP rewards at 3.1%, this will approxability generate a minimum of $2.25 for each deposit sponsored. Assuming the for best outcome of 1000, with a minimum deposit, filled for USDC 200,000; the chance of prize winning for RetroPGF.eth is ~93%
On top, CANDIDE will allow users that don’t qualify for gas sponsorship to pay network fees in USDC. USDC will be the only token needed in their wallet to start transacting on PoolTogether.
CANDIDE will waive all charges required to operate a paymaster service for the 1000 deposits sponsored by Pooltogether.
Team
The project will be led by CANDIDE. We will lead the development and coordinate the tool’s launch before the start of RPGF round 2. We propose to coordinate with the PoolTogether team and community to work on materials that will spread awareness of this tool and knowledge of Public goods Funding. We will communicate with the Optimism Foundation about this tool so that they can claim their winning prizes and OP rewards.
This tool will be open source, and PoolTogether contributors are encouraged to discuss ideas and features to implement and bring to this project.