Git Product home page Git Product logo

partybid's Introduction

PartyBid

PartyBid is a protocol that allows a group of internet homies to pool their funds together in order to win an NFT auction.

PartyDAO 🥳

PartyBid is the first product developed by PartyDAO, a decentralized autonomous organization that builds and ships products. PartyDAO was created initially for the purpose of shipping PartyBid. To keep up with PartyDAO, follow @prtyDAO on Twitter and Mirror. Acquire 10 $PARTY tokens to join the DAO and party with us.

Features

  • A PartyBid contract is deployed targeting a single NFT auction
  • Anyone can contribute ETH to the PartyBid while the auction is still live
  • Anyone who has contributed to the PartyBid can trigger a bid on the targeted NFT auction
  • After the auction closes, if the PartyBid won the NFT, the token is fractionalized; all contributors whose funds were used to win the auction are rewarded with ERC-20 tokens representing a fractionalized share of the NFT. Tokens are fractionalized using fractional.art contracts
  • If a PartyBid wins the NFT, a 2.5 ETH fee and 2.5% of the fractional token supply is transferred to the PartyDAO multisig.

Functions

PartyBidFactory

  • startParty - deploy a PartyBid contract, specifying the NFT auction to target

PartyBid

  • contribute - contribute ETH to the PartyBid
  • bid - trigger a bid on the NFT auction. Always submits the minimum possible bid to beat the current high bidder. Reverts if the PartyBid is already the high bidder. finalize - call once after the auction closes to record and finalize the results of the auction. Deploys the fractionalized NFT vault if the PartyBid won.
  • claim - call once per contributor after the auction closes to claim fractionalized ERC-20 tokens (for any funds that were used to win the auction) and/or excess ETH (if the auction was lost, or if the funds were not used to win the auction)
  • recover - callable by the PartyDAO multisig to withdraw the NFT if (and only if) the auction was incorrectly marked as Lost

Repo Layout

  • contracts/PartyBid.sol - core logic contract for PartyBid
  • contracts/PartyBidFactory.sol - factory contract used to deploy new PartyBid instances in a gas-efficient manner
  • contracts/market-wrapper - MarketWrapper contracts enable PartyBid to integrate with different NFT auction implementations using a common interface
  • deploy - Deployment script for contracts
  • test - Hardhat tests for the core protocol
  • contracts/external - External protocols' contracts (Fractional Art, Zora Auction House, Foundation Market), copied to this repo for use in integration testing.
  • contracts/test - Contracts written for use in testing

Installation

  1. Install dependencies
npm i
  1. Setup your .env file in order to deploy the contracts
touch .env && cat .env.example > .env

Then, populate the values in .env.

Tests

To run the Hardhat tests, simply run

npm run test

Deployment

You can find the address of deployed PartyBid Factories on each chain at deploy/deployed-contracts

To deploy a new PartyBid Factory, first ensure you've populated your .env file. The RPC endpoint should point chain you want to deploy the contracts, and the private key of the Deployer account should be funded with ETH on that chain .

Next, add a config file to deploy/configs/[CHAIN_NAME].json specifying the addresses of the necessary external protocols on that chain. You can use other files in that folder to see which contract addresses must be populated.

Finally, run

npm run deploy:partybid

Security Review

The findings from the security review for PartyBid contracts can be found here. The security review was completed by Alex Towle.

Credits

License

PartyBid contracts are reproduceable under the terms of MIT license.

MIT © PartyDAO

partybid's People

Contributors

anna-carroll avatar msfeldstein avatar johncpalmer avatar brickfigpigsinglettuce avatar solimander avatar

Stargazers

sarhaan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.