Inspiration

Many markets on Polymarket suffer from low liquidity and wide bid-ask spreads, making it expensive for traders to enter and exit positions. We built Three Sigma to provide automated liquidity across markets, tightening spreads and improving the trading experience for everyone.

What it does

Three Sigma is an automatic market maker for Polymarket that uses machine learning to optimize bid-ask spreads and position management. The system continuously monitors market conditions, predicts optimal spread pricing, and automatically places and adjusts limit orders to maximize profit while managing inventory risk. It acts as a liquidity provider, improving spreads and market depth for traders.

How we built it

Our trading engine and machnen learning model are built using Python. We used sklearn to predict the best spread price given the current state of the market. We utilized Polymarket's CLOB client SDK to fetch historical data to train our model on and constantly monitor/update positions. The system ingests real-time market data, processes it through our ML models, and executes trades automatically based on our risk parameters. We created our frontend dashboard with Next.js to visualize markets and our positions.

Challenges we ran into

The biggest challenge we faced during the hackathon was data collection and feature engineering. Current market information is easily accessible, but we were not able get historical order book data, which would have significantly improved our model's accuracy. We had to get creative with the available data sources, focusing on trade history to construct meaningful features for our ML model.

Accomplishments that we're proud of

We're proud of building a fully functional machine learning model and automated market maker from scratch in just one weekend. Our model successfully identifies optimal liquidity provision opportunities and we've managed to create a system that balances earning spreads with managing risk. The integration with Polymarket's CLOB was seamless, and our Next.js dashboard provides clear visibility into our market making operations.

What we learned

We learned the intricacies of Polymarket's CLOB based prediction markets. We also learned valuable lessons about working with limited data and the importance of feature engineering when building ML models. The experience taught us that market making requires both technical sophistication and deep domain knowledge.

What's next for Three Sigma

We plan to enhance our model by incorporating historical order book data and sentiment analysis from social media and news sources to better predict market movements. We want to implement more sophisticated order placement and risk management, such as dynamic spread levels based on market volatility and inventory levels.

Built With

Share this project:

Updates