Skip to content

Party Protocol is an open protocol for on-chain group coordination.

License

Notifications You must be signed in to change notification settings

neocho/party-protocol

 
 

Repository files navigation

Party Protocol

Version License Test Docs Discussions Discord

Party Protocol

A protocol for group coordination. Party Protocol provides on-chain functionality for group formation, coordination, and distribution. Currently focused on making NFTs multiplayer.

Table of Contents

Documentation

For more information on Party Protocol, see the documentation here.

Contributing

This is an open protocol, so if you are interested in contributioning see here for more details about how you could get involved.

Layout

docs/ # Start here
├── overview.md
├── crowdfund.md
└── governance.md
contracts/
│   # Used during the crowdfund phase
├── crowdfund/
│   ├── AuctionCrowdfund.sol
│   ├── BuyCrowdfund.sol
│   ├── CollectionBuyCrowdfund.sol
│   ├── CrowdfundFactory.sol
│   ├── Crowdfund.sol
│   └── CrowdfundNFT.sol
├── gatekeepers/
│   ├── AllowListGateKeeper.sol
│   └── TokenGateKeeper.sol
├── globals/
│   └── Globals.sol
│   # Used during the governance phase
├── party/
│   ├── Party.sol
│   ├── PartyFactory.sol
│   ├── PartyGovernance.sol
│   └── PartyGovernanceNFT.sol
├── proposals/
│   ├── ProposalExecutionEngine.sol
│   ├── ArbitraryCallsProposal.sol
│   ├── FractionalizeProposal.sol
│   ├── ListOnOpenseaProposal.sol
│   └── ListOnZoraProposal.sol
├── distribution/
│   └── TokenDistributor.sol
|   # Used to render crowdfund and governance NFTs
└── renderers/
    ├── CrowdfundNFTRenderer.sol
    └── PartyNFTRenderer.sol
sol-tests/ # Foundry tests
tests/ # TS tests

Deployments

Contract Ethereum Goerli
CrowdfundFactory 0x1ca2002babed23b91537e2f9c8bb61b97798c806 0xe84a62494aaaa4090a561dec1561cb10a93a93ab
PartyFactory 0x1ca2007d4f2bc0ec2a56ecb890e56e05f36182df 0xd1bc5eed9a90911caa76a8ea1f11c4ea012976fc
TokenDistributor 0x1ca2007a81f8a7491bb6e11d8e357fd810896454 0xe6f58b31344404e3479d81fb8f9dd592feb37965
AuctionCrowdfund 0x2140731a4fdc2531f5138635e457d468c8f4210b 0xe0a0fcc467196fda0a6cbdbba73505aed1e31b31
BuyCrowdfund 0x569d98c73d7203d6d587d0f355b66bfa258d736f 0x1471fe2985810525f29412dc555c5a911403d144
CollectionBuyCrowdfund 0x43844369a7a6e83b6da64b9b3121b4b66d71cad0 0x0d5a70d1a340c737b74162a60ffca0f94a4c9699
Party 0x52010e220e5c8ef2217d86cfa58da51da39e8ec4 0xa3b4a7110b48fdff1970d787d1cdcb9679176464
ProposalExecutionEngine 0x88d1f63e80a48711d2a458e1924224435c10beed 0xd36689563949ddf6ff01d89b514f6bfc2b443dde
CrowdfundNFTRenderer 0x565846D035b2B02D6631d579eD34d8f250584015 0xe99446935bc7ef76f68cb0250f0e3e1c72371fb4
PartyNFTRenderer 0xe3211390292300848428640bbc2F324D36a25857 0xeef9cd7a71d31054f794545308cf0503708b2980
RendererStorage 0x9a4fe89316bf81a1e4549476b219c456703c3f62 0x35c3bd81f7b3e2ddce70f2b9f2ca94ac9992ee23
AllowListGatekeeper 0x50c58f8bd97c1845c8e8ff56117dbce8a5b009b2 0xadcec7b4db7969dff00b9e5304be8e0d1261d6b4
TokenGatekeeper 0x26a7bd6161e4c6ae44620cfc6f7b9c3daf83ad0b 0xa6fbce9898a34a1e6db5dab699b20b6bfefda8c3
Globals 0x1ca20040ce6ad406bc2a6c89976388829e7fbade 0x753e22d4e112a4d8b07df9c4c578b116e3b48792
FoundationMarketWrapper 0x96e5b0519983f2f984324b926e6d28c3a4eb92a1 0xc1bb865106e3c86b1804ffaac7795f82c93c8cef
NounsMarketWrapper 0x9319dad8736d752c5c72db229f8e1b280dc80ab1 0x8633b1f69da83067ab1ec85a3411de354fbf96cd
ZoraMarketWrapper 0x11c07ce1315a3b92c9755f90cdf40b04b88c5731 0x969ee9ea5cebc042b689bff8e5497f96808353ae

Install

First install Foundry.

forge install
yarn -D
yarn build

Testing

Run all tests (except fork tests):

yarn test

Run only TypeScript tests

yarn test:ts

Run only Foundry tests

yarn test:sol
# If you want gas reports:
yarn test:sol --gas-report

Run Foundry forked tests

forge test -m testFork --fork-url $YOUR_RPC_URL

Audits

The following auditors were engaged to review the protocol before launch:

  • Code4rena (report here)
  • Macro (report here)

Bug Bounty

All contracts except tests, interfaces, dependencies, and those in renderers/ are in scope and eligible for the Party Protocol Bug Bounty program.

The following are known and are not eligible for a bug bounty:

  • Crowdfund host uses their crowdfund's balance to buy their own NFT
  • Forcing a BuyCrowdfund or CollectionBuyCrowdfund to use its entire balance to acquire an NFT above its listed price
  • Free or gifted NFTs being locked in a crowdfund after the crowdfund lost

The rubric we use to determine bug bounties is as follows:

Level Example Maximum Bug Bounty
6. Severe - Draining or freezing of holdings protocol-wide (e.g. draining token distributor, economic attacks, reentrancy, MEV, logic errors) Let's talk
5. Critical - Contracts with balances can be exploited to steal holdings under specific conditions (e.g. bypass guardrails to transfer precious NFT from parties, user can steal their party's distribution) Up to 25 ETH
4. High - Contracts temporarily unable to transfer holdings
- Users spoof each other
Up to 10 ETH
3. Medium - Contract consumes unbounded gas
- Griefing, denial of service (i.e. attacker spends as much in gas as damage to the contract)
Up to 5 ETH
2. Low - Contract fails to behave as expected, but doesn't lose value Up to 1 ETH
1. None - Best practices

Any vulnerability or bug discovered must be reported only to the following email: [email protected].

License

The primary license for the Party Protocol is the GNU General Public License 3.0 (GPL-3.0), see LICENSE.

  • Several interface/dependencies files from other sources maintain their original license (as indicated in their SPDX header).
  • All files in sol-tests/ and tests/ remain unlicensed (as indicated in their SPDX header).

About

Party Protocol is an open protocol for on-chain group coordination.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 91.8%
  • TypeScript 8.2%