ChipIn

ChipIn is a socialfi project which allows people to pool together funds to buy a token together

ChipIn

Created At

ETHGlobal Cannes

Project Description

ChipIn is a socialfi project which allows people to pool together funds in order to buy a token together, users create there own "proposals" and can share this with others directly or can be discovered by others in a list of most recent ones. There is no gas fees for the user, and simple auth flow using emails.

A proposal has the following choices:

  • Proposal title, this gives a short view into what the proposal pertains to
  • Proposal description, allows users to say why they are doing this and why it might be a good idea
  • Target amount, the amount the user wants to make
  • Target token, the token the user wants to buy upon successful fill
  • Deadline, if its not filled by this users may return their stake
  • Max contributors, limit number of people involved

Upon a proposal failing a user can reclaim the usdc they put into it, or upon a proposal succeeding a user has there portion (correlating with how much they put in) of the funds transferred to them. If an admin (proposal creator) decides they do not want to follow through with the proposal then they are allowed to cancel said proposal and each member can claim their usdc back.

How it's Made

For gas fee sponsorship Circle USDC Paymaster is used. For user authentication Privy Wallets are used. For indexing pools Envio is used. Front & Backend are built on Nextjs. Hardhat was used to develop smart contacts. Built on Arbitrum Sepolia (however it could easily extend to any chain supported by Circle paymaster).

Circle paymaster allowed me to easily integrate sponsorship of gasfees and incorporate smart accounts into my project. The paymaster specifically covers all USDC transactions, which is perfect since all user interactions involve USDC contributions. This removes the biggest friction point, users don't need to hold ETH or understand gas mechanics at all.

Privy handles the wallet abstraction layer, letting users sign in with just an email and automatically provisioning embedded wallets. This creates a web2-like UX while maintaining full custody and decentralization. The integration was straightforward and handles all the complex key management behind the scenes.

The smart contract architecture uses a factory pattern - ChipInFactory deploys individual ChipInPool contracts for each proposal. This keeps user funds isolated per proposal and makes the system more modular. Each pool contract handles its own lifecycle: contributions, goal tracking, execution, and refunds.

Envio indexes all on-chain events in real-time, providing the backend with structured data about pool states, contributions, and executions. This feeds the discovery mechanism where users can browse recent proposals and see live contribution progress.

The most hacky part of the project was trying to find liquid pairs on a testnet, in the end I decided to create my own mock tokens (mETH & mBTC) and use those for the target token testing and demonstration.

Another interesting challenge was handling the social discovery aspect. Instead of building a complex recommendation system, proposals are simply sorted by recency and users can share direct links. This keeps it simple but still enables the viral sharing that makes socialfi work as direct links between friends/colleagues is how I envision most people will use it.

The frontend manages wallet state across page reloads by persisting pool data in React state and re-fetching from Envio on mount. Since there's no traditional backend database, everything is either on-chain or in the indexer, which actually simplifies the architecture quite a bit and keeps it decentralised as all the backend is is contract interactions so theoretically given the ABI anyone could spin up their own version of this.

background image mobile

Join the mailing list

Get the latest news and updates