# Piped Piper Product Spec **Idea:** - General cashflow router which allows users to create an inflow/outflow cashflow for anything: has to be super intuitive - DCA into any deposit contract - Split inflows into different outflows by percentage - DCA into tokens **Technical Details:** - **General Cashflow Router - ability to add/remove addresses** - SuperApp - Takes user stream inflows - Aggregate user inflows in one location - Allow outflow allocations for user based on percentages - Accounts for all SuperPipes - **SuperPipe - SuperApp vault adapter** - SuperApp - Must point to the host contract as well as the Constant Flow Agreement contracts - Multiple streams as inputs - Users are able to add streams to this permissionlessly - Users must be able to see their own streams relative all other streams (accounting) - SuperPipe must downgrade input stream tokens to their underlying token on deposit (DaiX -> Dai) - SuperPipe must periodically deposit into vault contract - SuperPipe must track user deposits in vault contract - SuperPipe must allow users to withdraw at any time - **IVault - Generic vault interface** - Must allow SuperPipe to deposit funds - Must allow SuperPipe to allow withdrawals - Must (eventually) allow harvesting periodically - Must be able to get superpipe balance in vault **Implementation Questions:** - Under what conditions do we downgrade the tokens and deposit them from the SuperPipe and into the vaults? - Vault deposit periodicity **Tech Stack:** - Superfluid - Solidity - Hardhat? - The Graph (what sort of events might we want to index) - Tenderly (for debugging if we run into any issues) - TypeScript - React - ethers.js - Material UI/Rimble - Apollo/GraphQL