SAN FRANCISCO -- You almost needed an accounting degree to fully understand all the offseason moves the Giants made two years ago.

The trade for Evan Longoria included nearly $15 million coming back from the Rays. The Pirates covered $2.5 million of Andrew McCutchen's salary. When Tony Watson walked into the Scottsdale Stadium clubhouse a few days into spring training, he did so on a complicated contract that was structured to keep the Giants under the competitive balance tax line.

The CBT was mentioned often by team officials for a couple of years and was constantly lingering in the background, a penalty that colored many of the organization's moves. That's still the case for several teams around baseball -- most notably the Red Sox, who might trade superstar Mookie Betts because of payroll concerns -- but as the Giants enter Farhan Zaidi's first full offseason in charge, they at least know they don't have payroll concerns.

After paying the tax for three consecutive seasons, the Giants dipped just under in 2018 and didn't come close last year. While exact numbers are not available to the public, the Giants were estimated to have a tax number of about $177 million, according to Cot's Contracts, putting them well below the $206 million threshold. They'll open this offseason with even more breathing room.

The organization has about $110 million committed to seven players for 2020. The Giants do have some arbitration cases to settle, most notably Kevin Pillar, who could earn close to $10 million if he's back next year, but with so much of the 40-man roster expected to be filled by young players making the MLB minimum or something close -- think Tyler Beede, Logan Webb, Mike Yastrzemski, Mauricio Dubon, Shaun Anderson etc. -- the front office should have the room to do just about anything it wants. The tax line for next season is $208 million.

Now, will that lead to heavy spending? That's unlikely. The Giants did go after Bryce Harper last offseason, flirting with the possibility of paying the tax or dumping salary elsewhere, but ultimately their biggest signing was Derek Holland at one year for $7 million, and 2020 is expected to be a somewhat similar season, with young players getting the opportunity to win jobs.

Harper was considered a special case because of his age, but Zaidi will have the payroll to go after a Gerrit Cole or Anthony Rendon if he thinks the fit is right. And if the Giants do push the heavy spending further down the line, the light at the end of the tunnel is approaching.

[RELATED: How Bumgarner's free agency fits Giants' rebuild]

After years of trying to find ways to creatively add to one of the most bloated payrolls in the game, the Giants are nearing the ends of some massive contracts. Zaidi found a way to dump Mark Melancon's final year on the Braves, and Jeff Samardzija ($19.8 million) is entering the final season of his deal. Buster Posey, Johnny Cueto, Brandon Crawford and Brandon Belt all have two years left and Evan Longoria has three.

It's still far from an ideal payroll situation, but it's certainly much cleaner than it was a couple of years ago.