---
# System prepended metadata

title: 'Yeeter :: Architecture'

---

# Yeeter :: Architecture

## Overview

**Yeeter stack**
1. Solidity Contracts
2. Data indexed in subgraphs
3. A [react application front end](https://github.com/yeet-haus/mvp) interacting with the contracts and subgraph. [Deployed here](https://app.yeet.haus/)

1 and 2 are completely permissionless. We encourage anyone to build different versions of 3. Some of the information below might help with that.


## Contracts

**Overview**
The yeeter system is an extension of the daohaus protocol. The contracts used include
- A **higher order summoner contract** responsible for deploying the dao contract and the yeeter campaign contract
- Each yeeter campaign is made up of
    - A **moloch v3 dao contract** and it's related contracts responsible for all dao operations
        - **Moloch v3 (aka baal):** governance
        - **Safe**: treasury
        - **Share and Loot token ERC20 contracts**: membership
    - A **yeeter shaman contract** responsible for the fund raising mechanics

**Moloch v3**
[Learn more about the moloch v3 contracts](https://docs.daohaus.club/contracts) and even more [here](https://moloch.daohaus.fun/)

**Yeeter Shaman**
The **yeeter contract** acts as a shaman for a doahaus moloch v3 dao contract. It is granted admin permissions on the dao allowing it to give out shares and loot without using a dao proposal.

[Learn more about shaman contracts](https://docs.daohaus.club/contracts/shamans)

**Summoner contracts**
This is a factory contract that creates a dao and shaman contract. 

[Learn more about summoners here](https://docs.daohaus.club/contracts/summoners)

**Supported chains**
- Sepoila
- Optimism
- Base
- Arbitrum
- Gnosis Chain

[**Contract addresses**](#Contract-addresses)

**Flows**

***Launching a campaign***
- This is a complex transaction with params and action data that executes
    - deploying up the molochv3 with all initial governance settings and shaman admin settings for the new yeeter shaman
    - deploying up the shares/voting token
    - deploying up the loot token
    - initial metadata post with dao name
    - deploying the yeeter shaman
- The yeeter application constructs all params and calls this function: `summonBaalFromReferrer`
- Yeeter shaman params include
    *  uint256 startTime: timestamp when contributions can start being accepted
     *  uint256 endTime: timestamp when contributions will no longer be accepted
     *  bool isShares: indicates if contribution returns shares or loot
     *  uint256 minTribute: minimum amount of eth for a contribution
     *  uint256 multiplier: how much to multiply the eth amount by for share/loot return
     *  uint256 goal: fundraising goal
     *  address[] feeRecipients: array of addresses to send fee cut to on contributions
     *  uint256[] feeAmounts: array of percentages for fee cuts to each recipient
 
***Contributing to a campaign***
- This is a function on the yeeter shaman: `contributeEth`
- It accepts eth and takes a string message param
- The function does the following 
    - sends the eth to the dao treasury
    - sends fees to the identified fee recipients
    - gives the sender share or loot in the dao
    - emits an event with the message data

**Repos**
- [Yeeter](https://github.com/yeet-haus/contracts)
    - [summoners](https://github.com/yeet-haus/contracts/tree/main/contracts/hos)
    - [shaman](https://github.com/yeet-haus/contracts/blob/main/contracts/mock/shamans/EthYeeter.sol)
- [Moloch V3/Baal](https://github.com/HausDAO/Baal)
- [Moloch V3/Baal Tokens](https://github.com/HausDAO/baal-tokens)
- [Moloch V3/Baal Shamans](https://github.com/HausDAO/baal-shamans)

## Data Indexing

**Overview**
Useful data is indexed in 2 subgraphs coming from events emitted on the molochv3 dao and yeeter shaman contracts

[**daohaus subgraphs**](https://docs.daohaus.club/subgraphs)
These index all dao data, see the link above for more info and endpoints

**Yeeter subgraph**
These index data specific to the yeeter shaman.

Entities
- DAO: basic info for each dao summoned for a yeeter campaign. Daohaus subgraph will have richer data, so 2 queries mighjt be necessary for your usecase
- YEETER: data for the yeeter campaign contract
- YEET: data for each individual contribution

[Fields can be seen here](https://github.com/yeet-haus/subgraph/blob/master/schema.graphql)

![Screenshot from 2024-11-07 10-02-29](https://hackmd.io/_uploads/BJnM7uq-1e.png)

[Repo](https://github.com/yeet-haus/subgraph)

[**Endpoints and explorer urls here**](#Subgraph-endpoints-and-explorer-urls)

## MVP Yeeter App

[This app](https://app.yeet.haus/) is one possible interface into the contracts and data for the yeeter protocol.

It was built as a react app using the [daohaus sdk and starter repo](https://docs.daohaus.club/sdk/starter).

It supports the following usecases
- Launch a yeeter campaign (with a new dao)
- Manage some metadata for the yeeter campaign
- Contribute to the campaign

[REPO](https://github.com/yeet-haus/mvp)

[DEPLOYMENT](https://app.yeet.haus/)

### Some useful sections of code that might be reusable

**Data fetching**
[These hooks](https://github.com/yeet-haus/mvp/tree/develop/src/hooks)
- get all yeeter campaigns
- get a single yeeter campaign
- get all contrinbutions (yeets) for a campaign
- these use the [graph queries found here](https://github.com/yeet-haus/mvp/blob/develop/src/utils/graphQueries.ts)

**Transactions**
This app uses the daohaus sdk form and transaction builder so it's a little mnore difficult to copy and paste this, but there is reusable code.

Contribute
- Yeeter chaman contract
- contributeEth function
    - args: a message string
    - value: amount of eth getting contributed

Launch a campaign
- Yeeter Higher Order Summoner contracts
- summonBaalFromReferrer function
- [Helpers for constructing the function params are here](https://github.com/yeet-haus/mvp/blob/develop/src/utils/summonTx.ts)

---

## More resources

### Contract addresses

Summoner
- Gnosis Chain: "0x313f9A3C9A5041e9be00cf88b18962581A4eFb35"
- Optimism: "0x2875aEbb4472E5E579a2A5290c7B5A3C90484D5F"
- Aritrum: "0x2875aEbb4472E5E579a2A5290c7B5A3C90484D5F"
- Base: "0x2875aEbb4472E5E579a2A5290c7B5A3C90484D5F"
- Sepolia: "0x2875aEbb4472E5E579a2A5290c7B5A3C90484D5F"
  
  
Yeeter shaman template
- Gnosis Chain: "0xbe056B4187387D1Cb503370FeA2815e42981DfdF"
- Optimism: "0x8D60971eFf778966356c1cADD76d525E7B25cc6b"
- Aritrum: "0x8D60971eFf778966356c1cADD76d525E7B25cc6b"
- Base: "0x8D60971eFf778966356c1cADD76d525E7B25cc6b"
- Sepolia: "0x62fF4Ca410E9e58f5ce8B2Ad03695EF0ad990381"

### Subgraph endpoints and explorer urls

**Sepolia**
https://gateway-arbitrum.network.thegraph.com/api/<your-graph-key-here>/subgraphs/id/8Syem3ZN88cut1wL8AqPHNo658Px7M2CkRuHAGuxvf6j
or  
https://gateway-arbitrum.network.thegraph.com/api/<your-graph-key-here>/subgraphs/id/3k93SNY5Y1r4YYWEuPY9mpCm2wnGoYDKRtk82QZJ3Kvw
  
**Gnosis chain**
https://gateway-arbitrum.network.thegraph.com/api/<your-graph-key-here>/subgraphs/id/EGG5xEkiKKtGa9frTfBSmL2w7ZmzPDke5ZuvxDRwQcGe
or
https://gateway-arbitrum.network.thegraph.com/api/<your-graph-key-here>/subgraphs/id/6x9FK3iuhVFaH9sZ39m8bKB5eckax8sjxooBPNKWWK8r
  
**Optimism**
https://gateway-arbitrum.network.thegraph.com/api/<your-graph-key-here>/subgraphs/id/55wEbRchfvjtWsy5NqLc4hp9C7xbX9yk8bAr3UQA8F7x

*explorer*    
https://thegraph.com/explorer/subgraphs/55wEbRchfvjtWsy5NqLc4hp9C7xbX9yk8bAr3UQA8F7x?view=Query&chain=arbitrum-one
  
**Arbitrum**
https://gateway-arbitrum.network.thegraph.com/api/<your-graph-key-here>/subgraphs/id/BeGugH1TsMspZ7Nov1Uq2PQ98X78sqjuEy1JFGLyNgt5

*explorer*
https://thegraph.com/explorer/subgraphs/BeGugH1TsMspZ7Nov1Uq2PQ98X78sqjuEy1JFGLyNgt5?view=Query&chain=arbitrum-one    
    
**Base**
https://gateway-arbitrum.network.thegraph.com/api/<your-graph-key-here>/subgraphs/id/6vyAqRpCyrhLsfd6TfYAssvKywKhxJykkDbPxJZ4ZcEr

*explorer*
https://thegraph.com/explorer/subgraphs/6vyAqRpCyrhLsfd6TfYAssvKywKhxJykkDbPxJZ4ZcEr?view=Query&chain=arbitrum-one
