DIP-61 Swap Meet v2
Swap Meet v2
Project Overview
The Dope Wars Swap Meet is the in-game marketplace for buying, selling, and interacting with DOPE NFTs, Hustlers, and Gear. To function properly it must collect the most up-to-date information about ownership, configuration, and pricing from multiple sources, store it, and present it in a unified format.
Currently the Swap Meet functions adequately but needs work to ensure it operates as designed. Members of The DAO have requested that new functionality is added to the Swap Meet to enable purchasing of NFT items with the ERC-20 gaming utility token PAPER.
Responsible parties, Time & Rate
- FACES rate is listed at $200/hr (50% OP / 50% PAPER)
- Estimates below bring cost to ~$30,000 – 7500K OP, 5M PAPER
ROI
The Dope Wars Swap Meet is a critical component of infrastructure that allows players to obtain DOPE assets and provides the ability to customize them. The Swap Meet will generate income in the form of royalties on items transacted, and a home for Dope Wars experiences.
Components & Responsibilities

- Our blockchain indexer written in Go collects information from the Ethereum and Optimism chains. It listens to events from our smart contracts, and writes information about NFT ownership and configuration to a SQL database.
- Our Job Server, also written in Go collects sales and price information about DOPE NFTs from OpenSea, then stores that information in the same database.
- Information from that database is served through a GraphQL API written in Go.
- A front-end Next.js app written in Typescript reads that information, then presents it to visitors on dopewars.gg.
1. Bulletproof the Optimism Indexer
Background
DOPE DAO members have been complaining for months that some information about HUSTLERS, GEAR, and DOPE NFTs are not up to date in their inventory.



Looking through the server logs, it appears as if there are SQL errors that need to be investigated and resolved combined with some API issues from Alchemy.
Specifically, some Hustlers contain a tokenURI that we believe is too large to receive through Optimistic Etherscan and the Alchemy API. To verify, try to read the tokenURI for hustlerId 2400 using this link and see the error for yourself.
Additionally, we should re-evaluate if another approach to collecting this information might be less costly and more performant. The current server running the indexer costs us the DAO roughly $300/month on Google Cloud Platform.
Scope
- Ensure the indexer runs with no critical errors written to the logs
- Verify that everyone who has complained about missing items has them in their inventory
- Verify that all DOPE NFTs have up-to-date PAPER status
- Verify that all DOPE NFTs have up-to-date GEAR claim status
- Verify all Hustlers have Names and Photos
Deliverables
- A bug-free indexer that runs without error
- A job that can be run to synchronize to the current state of ETH mainnet and Optimism
Estimates (~40 hrs)
| Chore | Time | Cost | Notes |
|---|---|---|---|
| Investigation + Fixes | 24 hrs | $4800 | To ensure the indexer can run error-free. |
| Sync Job Script | 6 hrs | $1200 | Create a grift (go) script for synchronizing events the indexer might miss. |
| Ensure search index is always updated | 4 hrs | $800 | Not sure the materialized view is continually refreshing, meaning search results can be out of date. |
| Ensure Hustlers can equip / un-equip inventory on Dopewars.gg | 6 hrs | $1200 | After fixes to the indexer, some Hustlers are unable to equip items. |
| TOTALS | 40 hrs | $8000 |
Acceptance
DAO members should verify that…
- Their items appear in inventory within 15 minutes of a transfer or update to the blockchain
- All PAPER and GEAR claims for DOPE NFTs appear correct on dopewars.gg within 15 minutes of contract interaction
Current Work
The bulk of this work has already been completed, with the exception of the last item (Ensure Hustlers can equip…) over the month of December / January in Faces’ spare time. Work can be verified on dopewars.gg and on Github with the following PRs
https://github.com/dopedao/dope-monorepo/pull/333
https://github.com/dopedao/dope-monorepo/pull/332
https://github.com/dopedao/dope-monorepo/pull/331
2. Streamline purchases with Reservoir NFT API

Background
Currently the Swap Meet indexes listings from OpenSea for DOPE NFTs. These are stored in our SQL database, then we link to OpenSea to make purchases for items that has been listed for sale. Listings from Quixotic for HUSTLERS and GEAR are not indexed at all.
It’s long been the DAO’s desire that we should be able to buy and sell all DOPE items directly on the Swap Meet at Dopewars.gg using either ETH or PAPER.
The fine folks at Reservoir have a wonderful solution that pools liquidity and listings from multiple sources, and presents them through a reliable API that we can consume.
Reservoir: Democratizing NFT Liquidity
Reservoir has also produced a very high quality drop-in React UI library for making purchases directly from multiple sources.
Using both of these tools, we now have the capability to improve the Swap Meet to finally allow for transacting DOPE, HUSTLERS, and GEAR right on dopewars.gg/swap-meet
Scope
- Import listings from the Reservoir API every few minutes
- DOPE NFT on Mainnet
- HUSTLERS on Optimism
- GEAR on Optimism
- Implement ReservoirKit UI to allow purchasing items on dopewars.gg
- Implement ReservoirKit UI to allow listing items on dopewars.gg
- Eliminate our home-rolled OpenSea indexer
Deliverables
- dopewars.gg/swap-meet will allow purchasing and listing of DOPE, HUSTLERS, and GEAR for sale in ETH or PAPER
- Listings will be imported at least every 15 minutes from the Reservoir API which pools liquidity from OpenSea, LooksRare, X2Y2, etc
Estimates
| Chore | Time | Cost | Notes |
|---|---|---|---|
| Migrating our database structure to store Listings from Reservoir | 14 hrs | $2800 | |
| Update the SQL search stored view to incorporate new listings | 16 hrs | $3200 | |
| Creating a Reservoir listing import Script + automating calls to it | 16 hrs | $3200 | |
| Implementing front-end to purchase + list items in ETH or PAPER | 40 hrs | $8000 | |
| Deploying to production + testing | 4 hrs | $800 | |
| TOTALS | 90 hrs | $18,000 |
Acceptance
DOPE DAO members should be able to…
- Shop for HUSTLERS without seeing the naked ones
- Search for DOPE, HUSTLERS, and GEAR that are For Sale
- Sort items by highest or lowest price
- Purchase DOPE, HUSTLERS, and GEAR using ETH or PAPER directly from dopewars.gg
- Purchased items should reflect their new ownership status within 1 minute on the site
- List DOPE, HUSTLERS, and GEAR using ETH or PAPER directly from dopewars.gg
- Listed items should reflect their status within 1 minute on the site
- List an item on OpenSea, LooksRare, or X2Y2 and have that listing appear on the site within 15 minutes
3. Fix and re-enable Hustler Quick Buy

Background
The Hustler Quick Buy screen was implemented in March of 2022 as a smart contract that worked with the then-current OpenSea listing contract. When OpenSea upgraded their contract this function broke and we were unable to keep promoting the quick way to “Mint” Hustlers by purchasing a for-sale DOPE NFT with unclaimed Gear.
Once items 1 and 2 are complete from this proposal, we should be able to modernize Hustler Quick Buy to work with DOPE listings from the Reservoir API and the Reservoir UI Kit.
Scope
- Pull information from the Reservoir API for DOPE with unclaimed gear
- Present those items in the current Hustler Quick Buy screen
- Enable purchases through Reservoir
- Claim Gear + mint a Hustler within the same window
Deliverables
- Anyone using an Ethereum wallet on a web browser or Metamask mobile should be able to purchase a new Hustler from dopewars.gg provided there are DOPE NFT items for sale
- Anyone should be able to “mint” a “Naked Hustler” and then be directed to purchase gear for that Hustler on the Dope Wars Swap Meet
Estimates (~36 hrs)
| Chore | Time | Cost | Notes |
|---|---|---|---|
| Pull Unclaimed DOPE items for sale and hook it into Quick Buy | 8 hrs | $1600 | |
| Use Reservoir Kit UI to purchase DOPE in the Quick Buy process | 8 hrs | $1600 | |
| Mint a “naked hustler” | 4 hrs | $800 | |
| TOTALS | 20 hrs | $4000 |
Acceptance
- Ethereum network users can purchase a DOPE with unclaimed GEAR from dopewars.gg/hustlers/quick-buy
- Using the same process, DOPE can be Claimed and Hustler Minted
- From the same process, a Naked Hustler can be minted, then user is redirected to the Swap Meet to purchase and equip gear
Cost + Consultant Agreement
The work outlined above will be completed by RESPONSIBLE PARTIES contracted through the DAO. All work will be open sourced and available publicly through Github at https://github.com/dopedao. All rights, trademarks, and IP created as a result of this work will be property of the DOPE DAO.
IP & Contractor agreements should be signed by all parties as required by DAO operating agreement.
Intellectual Policy Agreement for DAO.docx
Payment
- FACES is requesting 1/2 up front, 1/2 upon completion of payment
| Voter | Cast Power | Vote & Rationale |
|---|---|---|
0xCED1...1840A8 | 94 | YES |
0xd4b6...E0A020 | 92 | YES |
0x1DEA...3Aa7c1 | 85 | YES |
0x0331...D748D8 | 83 | YES |
0x728B...B74783 | 67 | YES |
VOTE POWER
Proposal Status
- Sun January 22 2023, 07:04 amVoting Period Starts
- Mon January 23 2023, 08:00 pmEnd Voting Period
Current Results
1-YES
738
2-No
42
