Cryptocurrency can be a potentially lucrative investment. And with the right strategy, it could help pad your retirement savings.

But it can also be incredibly risky. Even if you do everything right, there's still a chance you could lose more than you gain -- which can make it a potentially dangerous option when saving for retirement.

How much should you rely on crypto to fund your retirement? Or should it be part of your retirement plan at all? It depends on three factors.

Person smiling and holding a tablet.

Image source: Getty Images.

1. Your age

Younger investors with decades left to prepare for retirement can afford to take on more risk. If you buy crypto and your investment doesn't pan out, there's still plenty of time to catch up on your savings.

If you're closer to retirement, though, you'll need to be a bit more careful. This isn't to say you can't invest in crypto at an older age, but you won't have as much time to recover if your investment goes south and you lose money.

2. Your tolerance for risk

Regardless of your age, your risk tolerance as an investor will also help determine whether crypto is a smart fit for your portfolio.

Crypto is a notoriously volatile investment, and it's not unusual for even the "safest" cryptocurrencies to see wild price fluctuations. Ethereum, for example, lost nearly 95% of its value throughout 2018. And Bitcoin has seen its price drop by at least 80% on numerous occasions over the years.

If you can stomach these short-term ups and downs and hold your investment for the long run, you could potentially make a lot of money. But if you know you'd lose sleep over this type of turbulence -- especially as you get closer to retirement -- crypto may not be the best fit.

3. The rest of your portfolio

If you do choose to invest in cryptocurrency, the rest of your portfolio should be well-diversified and filled with strong long-term stocks. This will help limit your risk and keep your retirement fund safer if your crypto investments take a turn for the worse.

Most experts recommend owning at least 25 to 30 stocks from a variety of industries. This will create enough diversification that if one or two of your investments fail, it won't sink your entire portfolio.

If you're investing in crypto, proper diversification is even more critical. All cryptocurrencies are still speculative right now, and even the strongest investments may not succeed over time. When your overall portfolio is healthy and filled with strong stocks, your savings won't be hit as hard if your crypto investment doesn't pan out.

Keeping your savings safe

Despite its inherent risk, crypto can be part of your retirement plan -- if you have the right strategy.

Before you buy, make sure you've done your research and are only investing in cryptocurrencies with real-world utility and the potential for long-term growth. Short-term investments can be a tempting way to get rich overnight, but they're far riskier -- and there's a much higher chance you'll lose a lot of money.

Also, no matter where you invest, it's wise to only allocate a relatively small portion of your portfolio toward crypto. Even if you strongly believe that a certain cryptocurrency will succeed over the long term, going all-in on any investment can be a recipe for disaster.

Cryptocurrency is risky but can potentially be lucrative, too. If you have a higher tolerance for risk and are comfortable with the volatility and uncertainty crypto brings, it may be worthwhile adding this investment to your portfolio. The right strategy can keep your money as safe as possible.