Bitcoin hit a new record high Friday, coming within $2 of $8,000.

The cryptocurrency touched an all-time high of $7,998.40 in the early hours, U.K. time, according to industry website CoinDesk. The digital currency erased the days gains to trade slightly lower near $7,632 late Friday afternoon.

It's been a wild week for bitcoin, which sold off heavily last weekend, falling to around $5,500. Since Sunday, the cryptocurrency has risen from that low to Friday's high, marking a 45 percent increase.

In that time, bitcoin's market capitalization, or the total value of the digital coins in circulation, has risen from $92 billion to $133.5 billion, according to Coinmarketcap.com.

The price dip last weekend came after an upgrade to the bitcoin network, SegWit2x, which was planned for November 16, was called off. The aim was to increase the transaction speeds of SegWit2x, which has increasingly slowed down over the years. If the upgrade took place, it would have caused what is known as a "hard fork," causing a new bitcoin spin-off to be formed.

Two previous forks have already happened earlier this year, leading to the creation of bitcoin cash and bitcoin gold.

But support for the Segwit2x upgrade waned, causing developers to call off its planned implementation.

This appeared to be the initial catalyst for the sell-off.