Before free agency began Wednesday, the widespread belief around the NBA was that players would forgo long-term contracts and instead gun for one or two-year deals so they could cash in when the league’s new television deal begins in 2016.

Instead free agents seemingly decided to take the money on the table rather than risk injury or perhaps a decline in play next season. All told, NBA teams committed roughly $1.4 billion to player contracts on the first day or free agency, according to ESPN.

Yet as NBA fans and salary cap aficionados know, a player’s salary doesn’t necessarily correlate with their results on the floor. Look no further than the $24.9 million declining shooting guard Joe Johnson is owed by the Brooklyn Nets next season, or even the $15.5 million little-used Golden State Warriors power forward David Lee is scheduled to earn next year.

Essentially for every smart deal an NBA general manager makes, they might whiff on one or two others.

But the opening days of NBA free agency brought about some very good deals for both players and teams. Here are the five best deals so far in terms of overall value, salary cap hits, the players’ age, team fit, and potential production.

Arron Afflalo 2-years for $16 million with New York Knicks

The Knicks fell to the bottom of the Eastern Conference in large part to Carmelo Anthony playing only 40 games, and were the worst in the NBA with 91.9 points per game. But team president Phil Jackson didn’t overpay to add a solid No. 2 or No. 3 scorer in Affalo. Between Portland and Denver last season, Afflalo averaged 13.3 points and 3.2 rebounds and for his career he’s a 38.5 percent three-point shooter. At 6-foot-5 Afflalo can also defend bigger guards.

He owns a player option for the second year, but whether Afflalo stays or goes after next season, the Knicks will still have cap room to sign free agents in 2016 and 2017.

Jimmy Butler, 5-years for $95 million with Chicago Bulls

It’s the largest contract on this list, but the Bulls assured themselves the rest of Butler’s prime at an excellent rate. It turned out great for Butler who passed on a $44 million extension before last season, and he ripped off the best year of his career with 20 points, 5.8 rebounds and 1.8 steals per game. He’s only 25, and his deal will expire right around the time most shooting guards begin their decline at 30. Not to mention the almost $200 million Butler might have demanded if he only agreed to one or two-year deal so he could cash in on the inflating salary cap. Butler also serves as insurance if point guard Derrick Rose suffers another debilitating injury.

Danny Green, 4-years for $45 million with San Antonio Spurs

As the three-point shot continues to dominate the game, the Spurs essentially locked down one of the league’s premier marksman for an average of $11 million a year. A career 42 percent shooter from deep, Green put up 11.7 points and 4.2 rebounds per game, and at 6-foot-7 he’s a solid defender with 1.2 steals a contest. Going further, Green keeps San Antonio’s core together for another run at the title next year.

Greg Monroe, 3-years for $50 million Milwaukee Bucks

The Bucks were an intriguing squad last season, one that could play defense and move the ball on offense, but lacked sufficient rebounding. Milwaukee had the cap space to burn, and on Thursday landed Monroe on a relatively short term deal that includes a player option in the last season, according to Yahoo. Monroe’s not a shot-blocker, but he guards the post well and averages 1.2 steals per game for his career. He also upped his work on the glass for a career-best 10.2 boards per game last season and is an excellent passing big man at 2.3 assists per contest for his career.

If things don’t’ work out, Milwaukee doesn’t have to wait long for Monroe to come off the books and they still have a solid young core in Jabari Parker and Giannis Antetokounmpo to keep their cap low.

Al-Farouq Aminu, 4-years for $30 million with Portland Trail Blazers

His offensive game won’t wow anyone in Portland, but with Nicolas Batum traded and LaMarcus Aldridge all but certain to sign with another team, Aminu becomes the Blazers best wing defender. He’s a long versatile athlete who can also rebound, and improves a Portland defense that was tied for No. 11 in points allowed last season. For a little more than $7 million per year, on average, the Blazers didn’t break the bank for a 24-year-old who could be a Defensive Player of the Year candidate over the next few years.