BOSTON (CBS) — The Chicago Blackhawks just signed one of their young stars to a bridge deal as he was about to hit restricted free agency, temporarily solving one of the most precarious contractual situations facing their roster. Sound familiar?

Dynamic young winger Artemi Panarin agreed to a two-year extension worth $6 million per year with the Blackhawks on Wednesday. The 25-year-old has 37 points – two more than Patrick Kane – in 37 games this season, good for fifth in the National Hockey League entering Thursday’s action.

Panarin was set to become a restricted free agent after the season, so the two-year bridge deal gives the Blackhawks some breathing room to work with him on potentially ironing out a longer extension. It also saves the Blackhawks from making tougher decisions on their salary cap, which for them is as tight as any team in the league. According to CapFriendly.com, the Blackhawks already owe about $66.6 million to just 15 players in 2017-18, including Panarin. The salary cap is currently $73 million, but could jump to $75 million next season.

The Bruins could find themselves in a similar situation with their own dynamic young star, David Pastrnak. At just 20 years old, Pastrnak is enjoying a breakout season as he is tied for second in the league with 19 goals – all while missing seven of the Bruins’ 37 games. Like Panarin, he’s also set to become a restricted free agent after the season.

While losing Pastrnak to restricted free agency is not really a concern, as that is an incredibly rare occurrence, the winger is setting himself up for a serious payday in Boston.

Panarin’s $6 million AAV with the Blackhawks puts him on par with dynamic scorers like the Sharks’ Joe Pavelski and Logan Couture, the Oilers’ Jordan Eberle, and the Devils’ Taylor Hall. But Panarin was also undrafted; Pastrnak was a first-round pick. If Pastrnak can keep up his current pace and eclipse the 40-goal mark, he could be looking at an even bigger cap hit in the future. He currently has three more goals than the Blues’ Vladimir Tarasenko, who after his breakout 37-goal season signed an eight-year deal worth $7.5 million annually against the cap.

It’s very much worth noting that the Bruins are not as hamstrung against the cap as the Blackhawks. They have about $11.5 million in cap space for 2017-18 with 17 players signed. But they also have several other players set to hit restricted free agency after the season in addition to Pastrnak, like Ryan Spooner, Austin Czarnik, Joe Morrow, and Noel Acciari. They probably can’t sign all of them, even if they wanted to (hopefully they don’t), because Pastrnak would likely price them out. A similar bridge deal might be the way they need to go in the next two seasons, because a lucrative long-term extension could prove too pricey in the short term.

There’s no question that the cap decisions were much tougher for the Blackhawks, who have the two highest cap hits in the league in Kane and Jonathan Toews ($10.5 million each). But it’s not exactly going to be easy for the Bruins, either, and they have their own young star to lock up long-term sooner rather than later.

The Bruins aren’t necessarily in danger of losing Pastrnak to free agency in the next year or two, but a move on him should be imminent. He’s shown enough in his young career that the offensively challenged Bruins can’t afford to let him go down the road. Panarin’s bridge deal in Chicago may not be a perfect comparison, but it’s a reasonable starting point.

Matt Dolloff is a writer for CBSBostonSports.com. Any opinions expressed do not necessarily reflect that of CBS or 98.5 The Sports Hub. Have a news tip or comment for Matt? Follow him on Twitter @mattdolloff and email him at mdolloff@985thesportshub.com.