# Take Home Challenge #### Data Scientist, On-chain Analysis ## Purpose This exercise is designed to be emulative of some of the types of things you might do at 0x. We realize timed, live interviews aren’t always necessarily perfect indicators of future success, and want to give you an opportunity to showcase your skills in a practical fashion. We think/hope you’ll find it fun! Don’t hesitate to email danning@0xproject.com (@sui414 on Telegram) with any questions along the way! #### What is the main product of 0x Labs? [0x API](https://docs.0x.org/introduction/introduction-to-0x#0x-api) is the major product, which is a developer tool empowering any swap applications built on DEX trading vertical. Using 0x API, our product team also built out a light front-end consumer product [Matcha.xyz](http://matcha.xyz/). On this role, you will be working closely with the growth team of 0x API primarily -- analyzing many layers of aspects based on on-chain stats, including: - Product Performance: 0x API trading volume, user retention, liquidity performances. - Protocol Health: smart contracts gas consumptions, reverts or bottlenecks. ... and serve as an on-chain detective 🕵️ to identify new potential integration opportunities, liquidity source, or even governance (in the works!) participations. #### Who are the competitors in our landscape? Referring to this [dashboard](https://dune.com/danning.sui/dex-aggregators-by-sui414) -- looking at Ethereum network as the major battlefield -- 1inch Exchange and Paraswap are the 2 other biggest players along with 0x API, in the aggregator space. ###### useful links [1inch Dune Dashboard](https://dune.com/k06a/1inch) [Paraswap Metabase Dashboard](https://dashboard.paraswap.io/public/dashboard/dcc1ec4f-c84b-44a4-b3ce-8b794c3fed91) [DEX metrics](https://dune.com/hagaetc/dex-metrics) ## Prompt: Competitor Analysis Across DEX-Aggregator Landscape DEX Aggregators serve as the middle layer bridging 2 sides in the DEX trade context: - Supply side: or liquidity sources, of mostly 3 kinds: - DEXes (like Uniswap, SushiSwap, etc) - Orderbook Orders (e.g. Limit Orders from Matcha users) - RFQ Orders (Request-For-Quote, where professional Market Makers provide quotes/prices) - Demand side: integrators, or in other words, consumer traffic funnel (e.g. Metamask Wallet, Coinbase Wallet, Zapper, Zerion - whichever Dapp provides a swap functionality and may need 0x API) The underlying data you will be using - will be the `dex.trades` table in Dune Analytics. See their [repo](https://github.com/duneanalytics/spellbook/tree/main/deprecated-dune-v1-abstractions/ethereum/dex/trades) for reference of how the table was created. ###### useful links [OurNetwork Learn Episode 10: Everything about DEXs ](https://youtu.be/3MgGH-bOWKA) [DuneCon Talk re: DEX Aggregators](https://youtu.be/VySFuadD1H4?t=11950) We are interested in how you would construct the comparison analysis around: * **Top-line Performance Metrics** for 0x API’s key tracking metrics. This topline metrics dashboard is the first thing leadership and the 0x API Product Manager would be opening in the morning. A few tips: * Focus on quality rather than quantity. This dashboard should be easily digestible and provide important insights (e.g. anomalies that can be grasped in a 30 second scroll.) * Cover both volume & users in a holistic view, but up to you how the metrics shall be placed in the big picture (e.g. do we wanna look at absolute numbers, or share % across aggregators, or even % out of the whole DEX space?) ###### useful links [[Growth Analysis] 1inch vs 0x](https://dune.com/0x/growth-analysis-1inch-vs-0x) [Aggregator Landscape](https://dune.com/0x/Aggregator-Landscape) * **User Engagement** profiling and segmenting users based on their on-chain activities can give us lots of information. Especially in the blockchain dataset context, where we can see where our new users come from (based on their past on-chain footprints on other DEXes, or any platform), or track where our users are churning towards. A few questions to tinker around (no need to cover all): - **Profiling**: What are the major metrics we can measure on our user base? - trade size? - trading volume? - frequency? - token preference? - other social identity? (ENS? NFT holding?) - **User Journey**: - Monthly Accounting? - New / Retained / Churned / Resurrected - Growth Rate MoM? - Retention Rate? How long usually they stay active? - Where else did 0x API users trade before they come to us? - Where did they go after they become inactive on 0x API? ###### useful links [Uniswap v3 User Base 🦄️ by @sui414](https://dune.com/danning.sui/Uniswap-V3-LP-Behaviors) [1inch, Matcha, Uniswap](https://dune.com/nat_nomad/1inch-Matcha-Uniswap) [Matcha and 1inch](https://dune.com/nat_nomad/Matcha-and-1inch) [From what project newcomers come from](https://dune.com/nat_nomad/From-what-project-newcomers-come-from) * **Integration Funnel (optional)** how does the partnership and integration funnels compare between 0x API and 1inch (or Paraswap) on both sides: * Do 1inch have more or larger liquidity sources than ours? (which will result in better pricing for users) * Do 1inch have more consumer traffic coming from inetgrator using their API, than us? For this part, the data might be a bit obfuscatory to sort out. Generally, a good first step to follow to breakdown the funnels could be: - liquidity source: check either `trader_a` (i.e. maker) or `contract_address` (i.e. liquidity pool contract) in `dex.trades` - integrator funnel: check `tx_to` (i.e. router contract) in `dex.trades` --- Dune.com is a free to use website and please feel free to fork the queries from above and create new metrics based on the queries. You have creative freedom on how to massage and process the data. Share your insights in the form you find the most useful (slides, pdf, google doc...). If you encounter any blocker in using Dune, please reach out to Danning on Telegram and we'd love to help clear out blockers! ![](https://i.imgur.com/poeWsgM.png) ## Submission Reply the assignment email, and -- - share your analysis and findings in any document or slide form, - along with your dashboard or queries links from Dune. - if you created a Spell in Dune's [repo](https://github.com/duneanalytics/spellbook/tree/main/models), please also include the PR link. ##### For Onsite, if proceeding You should prepare a 20 minute presentation (including a deck, no need to be done at this take-home phase, but only when preparing onsite) to explain your design thinking and output for both Part 1 and Part 2. You have a fair amount of creative control over what you want to focus on and the ideal way to present it. As part of your onsite interview, you’ll present your work to our team and discuss what you found interesting, what you found challenging, what you might do differently, etc. That said, your deck should provide a narrative in and of itself. ##### Estimated Time Required You should aim to spend a maximum of 10 hours doing analysis and preparing this report. We will compensate you at a rate of $59 / hour for work done during this take-home. Please aim to have this back to us within a week if possible. If you think you’ll need more time, just let us know.