Power Contracts For Smart Grids