The Raptors will send out Jose Calderon and Ed Davis for Gay and Hamed Haddadi.
The Pistons will acquire Calderon, with the Grizzlies receiving Tayshaun Prince and Austin Daye.
Memphis will also receive a 2nd round pick from the Raptors.
Toronto is likely to waive Haddadi following a buyout, reports Ken Berger of CBS Sports.
The Grizzlies will save $5.8 million this season and $26.4 million over three season before factoring in potential luxury tax ramifications.