11:09pm: The Raptors confirmed the extension in a press release.
"DeMar has worked very hard and has been a significant part of the building process here in Toronto," team president Bryan Colangelo said. "We view DeMar as a young, athletic and talented basketball player whose character fits what we are putting together."
8:11pm: Michael Grange of Rogers Sportsnet confirms via Twitter that the base pay in the deal is $38MM (hat tip to John Hollinger of ESPN.com).
6:30pm: Ryan Wolstat of the Toronto Sun hears the deal is actually for four years and $38MM (Twitter link). He's likely referring to the base pay and not the amount DeRozan could earn with the incentives, but that's just my speculation.
5:41pm: The Raptors and DeMar DeRozan have agreed to a four-year $40MM extension with incentives that could bring the value to as much as $42MM, reports Sam Amick of SI.com (Twitter link). Adrian Wojnarowski of Yahoo! Sports reported moments earlier that the two sides were close to a deal (Twitter link). After early indications today that a deal would not get done, there seemed to be a change of heart, presumably by the Raptors, who were reportedly already focused on what they wanted to see from DeRozan this season in advance of restricted free agency next summer. Instead, it appears they'll have the fourth-year swingman already locked up.
Ryan Wolstat of the Toronto Sun, who heard earlier today that an offer in the neighborhood of $34MM could get a deal done, quickly criticized the team's decision via Twitter, and Eric Pincus of the Los Angeles Times followed (Twitter link). Last year, DeRozan put up 16.7 PPG and 3.3 RPG on 42.2% shooting with a 12.8 PER, all numbers that declined from 2010/11.
The move means roughly $52MM in cap space is tied up for next season, assuming Linas Kleiza and Aaron Gray pick up their player options. That puts the Raptors out of the running for a max free agent they would have been able to afford if they passed on DeRozan.