(Bloomberg) -- Shares of companies with exposure to cryptocurrencies surged this week as investors cheered a key ruling on one token as a win for the industry. 

Coinbase Global, Inc. gained 34% this week, its best performance for the period since mid-March, despite closing 1.6% lower Friday. 

Other crypto-linked stocks also had positive weekly performances. Robinhood Markets, Inc. rose 15% this week, its best in nearly a year, and Bakkt Holdings Inc. gained 30%. Bitcoin mining companies such as Marathon Digital Holdings, Hut 8 Mining Corp., Riot Platforms, Inc. and Cipher Mining Inc. also saw weekly gains, even as some sold off Friday. 

Read more: An Arrest, Ruling and Rally: Crypto’s Wild Ride in US Courts

Thursday’s ruling that the Ripple Labs Inc. token is a security when sold to institutional investors — but not the general public — was the biggest contributer to gains. The decision added to optimism over Bitcoin ETF applications that lifted investor spirits and Bitcoin earlier in the week. 

“This is a positive read-through to COIN as it sets precedent that crypto token sales through exchanges, at least in the XRP case, did not violate securities laws,” Needham analyst John Todaro wrote in a note, boosting his price target to $120 from $70 on the buy-rated stock. “We believe this outcome should moderately de-risk the regulatory pressure on the stock.”

Read more: Ripple XRP Sold to Public Not Securities, Judge Says

Of course, the ruling was specific to Ripple and shouldn’t be hastily applied across the industry, Benjamin Salisbury of Height Capital Markets said in a note.

“We note that the ruling is specific to facts in this case alone and caution against applying this ruling to the Coinbase lawsuit broadly,” Salisbury said. “We also expect the SEC to appeal the ruling, given the potential implications for securities laws.” 

Outside of regulations, short covering may also be lifting crypto-linked stocks whose 2023 rallies have set up contrarian traders to be squeezed. 

In the last month, short sellers bought back $407 million worth of Coinbase shares to exit their positions, according to data from S3 Partners LLC. This year, Coinbase shorts have paper losses of $2.9 billion, making it the seventh least-profitable short behind Tesla Inc., Nvidia Corp., Apple Inc., Microsoft Corp., Meta Platforms Inc. and Amazon.com Inc., S3 said.

(Updates stock moves at market close)

©2023 Bloomberg L.P.