Honestly, this is a great deal for both sides. With Curry's injury prone history, this was probably about the best offer he would have received on the open market. For the Warriors, they don't have to pay what was looking like a Max Player contract before his recent slew of injuries.
The Warriors have the much riskier end of the deal, but Curry is still young, great in the community, and really the face of the franchise now with Monta gone. They'll want him to be around for the promotion of the new arena which his contract I believe takes him up to that year.