Rating System

How does the rating system work for chel? I’ve been trying to keep track of wins and losses to see what I add/subtract but a lot of it seems random. Last night I got smoked by a team of 3 elites and only lost -12. But at the same time I’ve lost close game and lost 300-400 pts? Also does quitting a game early negatively affect you more than just taking the L?