Jeff Samardzija and Mark Melancon each have 2 years remaining on their contracts. The amount owed from these 2 contracts will likely limit the San Francisco Giants ability to spend in free agency.
In a hypothetical scenario, the Giants could trade both Melancon and Samardzija in a salary dump. The Dodgers pulled off a similar move recently.
Last season, the Dodgers traded away Adrian Gonzalez, Scott Kazmir, and Brandon McCarthy for Matt Kemp. All 3 players the Dodgers traded away were on expiring contracts. However, Kemp had 2 years remaining on his contract.