The San Francisco Giants are on pace to lose upwards of 100 games. Only the rebuilding Philadelphia Phillies are on pace to be worse.

The Giants came into the 2017 season expecting to contend. On paper, they looked even better than the 2016 Giants. The addition of Mark Melancon in the off-season seemingly solidified the back-end of their bullpen. Pieces from last year’s trade deadline like Matt Moore and Eduardo Nunez were going to have full seasons in San Francisco. Joe Panik and Hunter Pence were hoping to have healthier 2017s. The team was betting on one last run or two before their aging core needed a re-tooling.

Instead, they are the second-worst team in baseball a few days before the calendar turns to July, and have lost 21 of their past 26 games, showing no signs of recovery.

It is easy to point to the loss of Madison Bumgarner in April (due to a dirt bike accident after just four starts) as a major cause of their struggles. The left-hander has been the seventh-best pitcher in baseball since 2011, his first full-season, according to FanGraphs’ WAR. He has been the main cog at the top of the Giants rotation since his debut 2010 season. Any team in baseball would be hurt by losing their ace for half the season, let alone Bumgarner, one of the top aces in baseball.

But the loss of Bumgarner does not account for their 100-loss pace. The Giants have fallen apart on both sides of the ball.

Johnny Cueto, who was signed to be the co-ace along side Bumgarner, is pitching like his second-half-of-2015-with-the-Royals self. He has already allowed 18 home runs on the season. His HR/9 is thirteenth-worst in baseball among qualified starters. He also has the fourth-worst line drive percentage in baseball at 25.5 percent, according to FanGraphs. Cueto, who has never necessarily been characterized as a strikeout-pitcher, has to rely on keeping the ball in the ballpark and generating soft contact to be successful. He has done neither this season, en-route to a 4.20 ERA, which looks even worse when taking into account the cavernous ballpark in which he plays half of his games.

Jeff Samardzija’s peripherals look pretty, but he has been hamstrung by a run of bad luck. His batting average on balls in play is .327 and his HR/FB is 18 percent, both well above average. His xFIP is 3.01 according to Fangraphs, which suggests he’s filling the shoes of Bumgarner nicely, but the results are just not there. His ERA is 4.74. Behind him, Matt Moore, Matt Cain, and Ty Blach have rounded out the rotation by combining for a 5.50 ERA in 247 innings pitched.

Hunter Strickland, Cody Gearrin, and George Kontos have formed a solid right-handed trio in the middle of the Giants’ bullpen, but the rest of the ‘pen has disappointed. Will Smith was lost to injury before the season started, leaving San Francisco without an established left-handed option. Josh Osich and Steven Okert have tried and failed to fill the role adequately.

Mark Melancon has been a disappointment as the teams’ closer. His ERA is 4.58 and his FIP is 3.85, both underwhelming numbers for a player who is supposed to be an elite closer. He is allowing three times as many home runs as he did in 2016. His .361 batting average on balls in play against suggests his ERA should come down, but even with that, the peripherals show that Melancon has been far from elite so far in 2017.

But the teams pitching isn’t entirely to blame for their run prevention woes. The Giants’ outfield ranks dead-last in defensive runs saved, at -36 runs according to FanGraphs. The second-worst Pittsburg Pirates are at -23 runs saved. In other words, San Francisco is by far the worst fielding outfield in the league. Aging veterans Denard Span and Hunter Pence lead the way at -14 and -4 defensive runs saved respectively, and even “defensive replacement” back-up outfielder Gorkys Hernandez has -8 defensive runs saved. The Giants play in one of the biggest ballparks in baseball, and in an era when batters are purposefully hitting the ball in the air more and more, an outfield of this dubious caliber is not going to cut it.

Buster Posey has been one of the best framers in baseball throughout his career according to Baseball Prospectus. He has finished in the top-five in framing runs four times, including his first-place finish last year. Posey’s framing prowess was thought of as the Giants’ secret weapon.

But so far in 2017, Posey has been worth -0.5 framing runs. He has seemingly lost his ability to steal strikes for Giants pitchers in 2017. What was once a huge advantage for the teams’ run prevention unit has all but vanished, and the Giants pitchers are paying the price.

Those are a lot of things that have gone wrong in 2017, and all before getting to the Giants’ biggest weakness: the offense. San Francisco is the worst offensive team in baseball, according to FanGraphs’ wRC+. They have hit just 64 home runs, nine fewer than any other team in baseball.

They are hitting the fourth-most ground balls in baseball, which would suggest some possible untapped benefits if some of their players would jump on the fly ball revolution train. But their ballpark prevents them from benefitting off of that approach. Their HR/FB rate is worst in baseball, due largely to the extreme pitchers park they play in, so trying to elevate the ball more is probably not going to be a winning strategy.

Those offensive struggles are coming even while Posey is enjoying his best offensive season since 2012. He is slugging almost .100 points higher than he did in 2016. His wRC+ is seventh among qualified batters and his .340 batting average is third.

Besides Posey, the Giants have only one qualified hitter above 101 wRC+, thanks to Brandon Belt. Belt and Posey have hit 24 of the team’s 64 home runs. Hunter Pence and Brandon Crawford have fallen off a cliff offensively. Span, Joe Panik, and Eduardo Nunez all hover around 100 wRC+.

“So maybe the present is very very bad, but at least the future is bright, right?” I have bad news. The organization lacks any real impact prospects. Christian Arroyo came up and had a nice couple of weeks, but quickly fell back down to earth and has since found himself back in AAA. The Giants have resorted to bringing up below-average prospects in Austin Slater and Orlando Calixte in hopes of striking gold. So far, like almost everything else this year, it hasn’t worked.

So the Giants are now left with holes all over the roster and in need of a makeover, even if we ignore the rest of 2017. But where do they start?

It is presumably safe to say Posey, Bumgarner, Crawford, and Belt aren’t going anywhere, due to their immense popularity and contract situations. That’s a potent core, even if it hasn’t done much this season, and they leave the Giants married to the prospect of retooling rather than rebuilding.

The most obvious move San Francisco could make is a Johnny Cueto trade. He has an opt-out after this season, and almost every contender could use another starter. The question is how much can the Giants even get for the veteran right-hander. He is on pace for his worst season since his early days in Cincinnati. Their best hope is for Cueto to recover over his next few starts in an audition for potential buyers.

There is also the possibility of trading Joe Panik. This idea was floated at last year’s trade deadline, when the team was looking for bullpen help, and Matt Duffy was traded instead. Panik is a fan-favorite, and close to being a part of that group of untouchables mentioned above, but he has yet to enter his arbitration years and has yet to regain his offensive potential displayed in 2015. Still, he’s probably a member of the next good Giants squad.

Samardzija, Moore, Nunez, Strickland, Gearrin, and Kontos are all names I wouldn’t be surprised to see dealt next month also. Even Melancon could be an option if SFG can find someone to eat his contract. The Giants should be selling everything not nailed to the desk in order to make another run with the Posey-Bumgarner-Crawford-Belt core in a year or two.

As Eno Sarris of FanGraphs predicted, the Giants’ rebuild came a year or two earlier than expected. Luckily, their core is still young enough to make another go at it after a quick retooling. A few savvy moves from the Giants’ front office and maybe we’ll once again see Madison Bumgarner and Buster Posey in October in the next even year.

Dylan Svoboda is a writer for Beyond The Box Score and BP Milwaukee. You can follow him on Twitter at @svodylan.