# Technical Architecture

Upstream utilizes an intricate blend of on-chain and off-chain technologies to build a platform that promotes the efficient operation of DAOs, with a specific focus on reducing the necessity for gas fees.&#x20;

<figure><img src="https://335521799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZuwn9Wwemq2gVnTjroO%2Fuploads%2FoR5SxenSTv2QOQFE4sts%2Ftechnical%20overview.png?alt=media&#x26;token=6b1b7f1f-bbeb-42ff-a6a4-372c9120f3ac" alt=""><figcaption></figcaption></figure>

### Server Structure

The Upstream infrastructure revolves around four primary servers:

1. **Website Server:** Hosted on AWS, this server is responsible for delivering the frontend of the Upstream platform.
2. **API Servers:** Also hosted on AWS, these servers manage the back-and-forth communication with the client, serving data requested by the website.
3. **Blockchain Listener:** This server's primary function is to monitor events on the blockchain.

### Event Listening and Fortuna

With our DAO contract's evolution, we're currently listening to over 15 event types, including `EnableDepositsChanged`, `EnableWithdrawsChanged`, `GateDepositsChanged`, and `ExchangeRateChanged`. To handle this complexity, we built an in-house service, "Fortuna," which captures and maps these events to our database.

### Proxy Contracts and Upgrades

Another critical aspect of our architecture is the use of proxy contracts. Once a contract is launched, it cannot be updated. However, upgradable contracts, or "proxies," provide a workaround.

### Contract Types

Upstream launches three primary contracts to the blockchain:

1. **DAO Contract:** A large contract, which is responsible for maintaining feature flags, managing deposits and withdrawals, and more.
2. **Vote Delegation Contract:** This contract, maps who has delegated voting rights to whom. This contract remains on the blockchain for transparency.
3. **Gnosis Wallet Contract:** This contract grants the ability to execute actions and is part of every DAO to support multi-signatures.

### Supported DAOs

Upstream currently supports two types of DAOs:

1. **New Contract:** DAOs that wish to launch their own token.
2. **Existing Contract:** DAOs with tokens already available on the market.

We facilitate the launch of an "External Token Contract" that doesn't issue a token but still offers DAO functionalities. We also support the creation of ERC20 tokens.

In summary, the architecture of Upstream is an intricate balance of on-chain and off-chain technologies, aiming to reduce gas fees and create a seamless, efficient platform for DAOs. It's important to remember that this design is not static - we're constantly seeking ways to improve our system for better performance and user experience.

\ <br>
