It is illegal to sell electricity directly to someone else. To sell electricity you need to be licensed as an energy supplier.
So currently it is illegal to, for instance, sell your excess wind or solar electricity to your neighbour. You have to sell it to the grid and it goes into the "common pool".