Inspiration
We are inspired by DeFi projects helping to create a better financial system. By removing traditional barriers and market frictions we believe we can create a financial system with improved access for users. As a step towards this goal, we focused on the need for an open source platform to facilitate liquidity provision on Serum. The team is enthusiastic about the potential for Serum markets, Pyth oracles, and decentralized trading to increase liquidity and decrease transaction costs for users.
What it does
The YY'X proof of concept allows users to create test markets on Serum including:
- UI displaying Serum order book events, Pyth prices, and a real-time price chart
- UI for pools
- token faucet for simulation and testing
- Serum markets to trade the test tokens
- trading bots to simulate market dynamics including making and taking
- turning a crank to facilitate settlement
What it will do
Facilitate On-ramp for Liquidity Providers both Stakers and Market Makers:
- Automate market making for stakers
- Bot platform for makers
- Ultimately lower the barrier to entry for liqudity provision on mainnet
Who Benefits
We focused on Liquidity that emanates from two general sources - Stakers and Market Makers
- Stakers may represent the freshest supply of liquidity and seek yields in digital assets
- Require easy access
- Need to be paired with pools to produce yields
- We anticipate this category to grow to include more traditional retail investors
- Market Makers can be more traditional participants with some experience in orderbook management
- More sophisticated yet may need some basic tools
- May want to tweak or construct their own entry bots
How we built it
We began by looking at existing protocols on Solana. Many of these projects are open source which makes it easier for new projects to learn the principles of good Solana design. The MVP is primarily focused on the UI and running simulations. For the UI we relied on the serum-dex-ui example and reused as many of the UI components as we could. The UI is written in Typescript and React. The simulation tools are written in Typescript and provided to others as a library. Our shared library is also published and available via npm.
When building on Solana we tried to follow the principles of good code organization and design. We initially took our cues from Mango and Serum. Over time we tried to look at the code of as many of the Solana open source projects as possible to enhance our understanding of how best to build for Solana.
Challenges we ran into
Our primary constraint was time. The team members are all working for other crypto projects, so finding the time necessary to deliver the project was difficult. There were many long nights and weekends required to make it work.
Compounding time constraints were the long build times (primarily with Typescript and React) and the long test setup times on Serum. Debugging is a continuous and ongoing process and mainly challenges our vigilance. In addition, properly using Typescript async was a hurdle for the former C programmers among us. It's not clear what we could have done better to reduce the time spent building and testing, but it was definitely a speed bump that increased our cycle times.
It's hard to know what fills a need without putting a product out there for users to try. Defining the Minimum Viable Product was a challenge we had early on. Over time the MVP took form and the challenge shifted to avoiding feature and code bloat.
Accomplishments that we're proud of
We are proud that we were able to put something together that people can see and use on a short timeline. We think our project demonstrates the potential of Serum and Pyth to create better markets for all participants.
We are very proud that we have been able to provide the community with open source code for other to learn from and use in their projects.
What we learned
This project was a great learning opportunity for the entire team. We learned how to craft an idea for a DeFi primitive and bring it to market (almost). We learned how to build a user interface using Typescript and React. We learned how Serum and Pyth work, and how to incorporate them into our future projects.
We met other teams at the Chicago Hacker House and learned from them about the DeFi ecosystem and how to stay tightly focused on our MVP.
What's next for yyprime.exchange
- For future iterations we would like to:
- Provide users with a dashboard for setting up simulations and allowing them to control the test dynamics and the parameters of the trading bots.
- User interface to allow users to deposit tokens into liquidity pools, and to give those users statistics and performance stats on the available liquidity pools and market makers operating those pools.
- Provide support for other products trading on Serum, especially options (PsyOptions, Zeta)
- Drive to mainnet - live liquidity provision!
Built With
- pyth
- serum
- solana
- typescript


Log in or sign up for Devpost to join the conversation.