Crypto investors lose billions annually to rug pulls and volatile markets, yet most trading platforms offer no quantitative risk assessment. We wanted to build a tool that combines academic-grade financial mathematics with real-time blockchain data to give traders actual risk metrics, not just price charts.
Safe Entry analyses any cryptocurrency and provides Monte Carlo-simulated risk metrics including Value at Risk (VaR) and Expected Shortfall. Our model combines:
- ARIMA forecasting for price drift estimation
- GARCH volatility modelling to capture volatility clustering
- Jump-diffusion with reputational factors to model rug pull risk based on ownership concentration, creator doxxing, social media presence, and other on-chain signals
Users input a ticker and receive probability distributions of future returns, helping them make informed entry decisions.
How we built it
We implemented a custom stochastic differential equation:
$$ dS_t = \kappa(\theta - S_t) \, dt + \sigma_{\text{GARCH}} S_t \, dW_t + S_t (J_t - 1) \, dN_t $$
Tech stack:
- Python for the quantitative engine (statsmodels, arch, numpy)
- yfinance API for historical price data
- Coingecko for on-chain reputational factors
- Monte Carlo simulation with 10,000+ paths per analysis
The jump intensity \(\lambda\) in our Poisson process is dynamically weighted by nine reputational factors, making rug pull risk quantifiable rather than subjective.
Challenges we ran into
Backward-looking bias: Our initial model predicted crashes after every dip because it relied purely on recent negative returns. We solved this by implementing mean reversion, allowing the model to expect recovery after extreme movements.
Volatility estimation: Simple standard deviation failed to capture crypto's volatility clustering. Implementing GARCH(1,1) was complex but necessary for realistic simulations.
Data availability: Newer tokens lack sufficient historical data. We implemented fallback logic and optimized our model to work with 1-3 years of daily data.
Parameter tuning: Balancing mean reversion strength, GARCH parameters, and jump intensities required extensive testing to avoid paths collapsing to zero or exploding unrealistically.
Accomplishments that we're proud of
- Built a production-quality quant finance model in a hackathon timeframe
- Successfully integrated multiple advanced statistical techniques (ARIMA, GARCH, jump-diffusion) into a unified SDE
- Created a data-driven approach to rug pull risk using reputational factors rather than subjective scoring
- Delivered institutional-grade risk metrics (VaR, Expected Shortfall) accessible to retail traders
What we learned
- How to implement mean-reverting stochastic processes with time-varying volatility
- GARCH models and why they're essential for financial time series
- The mathematics of jump-diffusion processes and Poisson events
- How to debug Monte Carlo simulations when paths exhibit unrealistic behaviour
- The importance of longer time frames for parameter estimation in volatile markets
What's next for Safe Entry
- Machine learning optimization to find optimal factor weightings for the efficient frontier
- Real-time alerts when risk metrics cross user-defined thresholds
- Portfolio-level analysis with correlation modelling across multiple assets
- Stochastic volatility (Heston model) for even more realistic simulations
- Integration with DEX APIs for automated safe entry execution
- Historical backtesting to validate model performance against actual rug pulls
Log in or sign up for Devpost to join the conversation.