# Openflow Protocol Overview
## What is Openflow?
### Massively multichain meta dex aggregator
- Swap any token on any chain and get the best prices
### Completely open, truly decentralized request for quotes (RFQ) system
- Simplified flow
- User requests quotes for a swap
- Swap auction occurs
- Solvers (market makers) respond to request for quotes
- User signs best quote
- Solver executes best quote
### Built for protocols and people
- Smart contracts are first class citizens
- Smart contracts have a lot more flexibility than existing in systems
### Permissionless and open
- Anyone can be a solver
- In all existing systems becoming a solver is gated and pay-to-play
- Solver integrations
- Portals
- flood.bid (new not yet launched complex CFMM aggregator backed by Gauntlet)
- Propellerheads
- Matcha/0x
- 1inch
- Paraswap
- Flashswap
- Llamaswap
- Kyberswap
- Hashflow
- LlamaZip
- YieldYak
- OpenOcean
- ~400 Uniswap v2 forks
- etc...
### Trustless
- In existing RFQ systems quote selection is handled by trusted central points of failure
- In Openflow quote selection is either performed directly by the end-user, or quote selection is delegated to a trusted decentralized multisig (driver)
### Massively multichain
- Anyone can deploy the protocol to any chain
- Uses one time signature method to allow any user to deploy the protocol with deterministic addresses on every chain
- Auto-updating
- RPC endpoint health check system (1,200 endpoints) is used to facilitate good UX for solvers and front-end
- Custom Defillama scraper (and also massively multichain custom indexer built by vfat) is used to automatically detect Uniswap v2 factories and automate multichain solver deployment
- In the future will support many other dex types
- Curve
- Solidly
- Uni v3
- Balancer
- etc
### Highly flexible
- Conditional swaps
- User-defined hooks
- User-defined order validity periods
- Supports multiple simultaneous order submissions
- Combine the above to implement many different order types
- Limit orders
- Stop loss
- Good after time
- Iceberg and incremental orders
- Zaps
- Smart orders
- etc
- No existing system gives smart contracts this much flexibility
- Supports on-chain order invalidation (cancel a single order or cancel all orders in a "session")
### Simple
- While the protocol supports many features, the core principals of the protocol are very simple
- Majority of the protocol is implemented in one contract/one method (Settlement.sol `executeOrder`)
- Performs signature validation
- Amounts, order validity period, swap conditions and hooks are all signed
- Execute hooks
- Check swap conditions
- Allow solver to perform swap using solver hook
- Make sure user has the amount of tokens agreed upon
- Intention is to keep the protocol lightweight
- Limit any potential surface area of attack
- Keep gas costs low
- Offload complex logic to Solvers
- Keep things simple
## How is Openflow different?
- Anyone can be a solver (no pay-to-play)
- Trustless (in existing systems quote selection requires trust)
- Decentralized (in existing systems there are several centralized points of failure)
- Massively multichain (existing systems only support a few chains)
- Highly flexible (supports features existing systems don't)
## Architecture

## Demos (time for some fun)
- On-chain order submission using SDK
- Off-chain order submission using UI
- Quick contract code overview
- Solver SDK
- Sample solver
## Project status
- Protocol
- Protocol Contracts
- In great shape, have a lot of tests, aiming for complete coverage
- Contract SDK
- In great shape, Val has used to create sample swaps on a strategy. Pleased with where we landed on architecture here
- Javascript Solver SDK
- Looking good, code is isolated from infra repo now and is only about 250 lines
- Sample portals Solver
- Really nice, only 60 lines of code, UX is great
- Decentralized driver
- This area needs the most work, working on this today
- UI
- Proof of concept works end-to-end, requires manual approval of settlement, this area needs work but it is not priority right now (smart contract integration is priority)
- Business development
- Solvers
- Working portals solver
- In talks with flood.bid
- In talks with propellerheads
- In talks with seasolver
- Beepidibop (good friend, co-dev of 0xDAO/Solidly v2) working on a solver
- Working on a massively multichain uni v2 solver using data scraped from Defillama for ~400 uniswap v2 forks
- Marketing/partnerships
- Onboarded North from Ramses who has been doing great
- UI
- Started discussion with excellent dev (Mali) for UI work
- North in discussion with a designer
- Community
- Onboarded two trusted mods king/wen
## Questions
## Resources
- https://openflow.gitbook.io
- https://github.com/x48115/openflow-contracts