The Mavericks, Raptors and Grizzlies have agreed to a deal in principle that will send Shawn Marion to Dallas, according to NBA sources.

Sources told ESPN.com that the trade will also send Jerry Stackhouse to the Grizzlies, with one source close to the process saying that a trade call with the league office to formalize the deal has been planned for Thursday.

The known parameters of the deal call for Marion to receive a five-year contract in the region of $40 million from the Mavericks and land Stackhouse in Memphis, where he will be bought out by the Grizzlies.  Dallas will send Memphis $2 million by Aug. 10th to pay for the buyout.

Toronto will receive unspecified draft considerations and/or cash, but the involvement of a fourth team virtually assures that other players from the Mavericks and Grizzlies will be involved.