The money on this deal just doesn't work. First thing first you'd need to sign Hayward (creating space by declining all nonguaranteed deals and moving a salary that is as high as Smart's or higher - due to the later trade needing tons of salary, Smart is the best choice for this). Then you need to come up with salary to match Melo+Porzingis in a deal. Given that they make ~$30 million combined, you're looking at ~$24 million on outgoing salary. AB+Crowder gets you to $15.6 million. We would still need to add another $8.4 million. The only way to do that is either including Horford (in which case you can take AB/Crowder out of the deal), or including 2 of IT/Brown/Tatum (in addition to AB+Crowder)
So while it's technically possible, the only way to do this deal is to way overpay for Porzingis and absolutely gut our team. So, no, taking on Melo would not make Porzingis cheaper to acquire (unless we don't sign a FA and can absorb Melo into cap space)
Porzingis and Melo combined makes a little less than 29$ mill. Crowder and Bradley makes 15$, plus Smart $4 mill and Zeller $8 mill that makes 27$. Add in Demetrius and Mickey that's make $29. That's a match.
That's not how it works. Zeller and Mickey would need to be renounced and you are leaving off Carmelo's trade kicker which I mentioned in my post on the 1st page. You only need to match salaries to 125%, though, so not all hope is lost...but it is mostly lost.
Renounce to sign Hayward or make the trade?
To sign Hayward. A Melo/Porzingis trade would have to come later since we are barely able to match as it is. If/when we sign Hayward, our depth chart will have gotten a lot younger. That is why it will be important to use the room exception, vet min contracts wisely.
Salary for next year with Zeller and co & Olynyk qualifying offer is $72 mill. If we don't extend him it dips at 68, salary cap is 99 mill and Gordon Max is 30 mill. Can make the trade but won't be able to sign the rook and Zizic unless Hayward takes a pay cut. How that trade kicker work?
No, that's incorrect. Taking the raw numbers from basketball reference ignores a lot of the realities of the NBA cap, like glossing over the 1st round and low roster spot cap holds.
With Zeller+KO's qualifying offer and first round pick cap holds (I'm not including cap holds for Amir+Jerebko+Young+Green, with them we would be well over the cap), we're at ~$89 million. After letting the non-guaranteed contracts go and renouncing Olynyk's rights, we're at ~$27 million in cap space (~$27.5 if we trade Demetrius Jackson for no salary). To get to the point of having the full 30% max, we would need to either: Trade Rozier for no salary and convince Yabusele to stay overseas OR trade Smart for ~$2.3 million or less in salary coming back (a larger salary could be used, but we need large salaries for the Melo+Porzingis trade)
After signing Hayward, we would be left with a roster of IT, AB, Horford, Jae, Brown, Rozier, Jayson Tatum, Yabusele, and Zizic (note: you can swap out Yabusele and Rozier and plug in Smart instead), and would put our salary at ~$97 million. At that point, we would need to match salaries for the Zinger+Melo trade. Melo will make $34 million next season when you factor in the trade kicker, so the combined incoming salary would be ~$38.8 million, meaning that we would need to send out a minimum of ~$31 million. The only way to do that without sending out Horford is by including AB+Crowder+Brown+Tatum+IT. If Smart was kept, the outgoing players could instead be AB+Crowder+Brown+Tatum+Smart+Zizic.
So, no, it's not realistically possible (and at the very least, taking on Carmelo does not make the deal cheaper for us).