If someone quits or times out in a game, you get credit for a win over the person who timed out and a tie with everyone else. Your gain is multiplied by the game completion percentage. The person who quit loses the full amount as if the game was 100% finished. As a further adjustment, you can't lose elo (can happen if your elo is a lot higher than everyone else, so a 3-way tie plus a win would be minus elo).
You also can be "punished" if, for example, you were going to win a 5 player game and wind up in a 4 way tie for first instead.
The only solution is to not take elo seriously. It is just an approximation used for pairing purposes, not scientific. The elo algorithm also is poor for many games here, which have a high luck component. There are many games here where, if 2 competent players play, your win chance won't be much higher than 55%.
Another option is arena. If someone quits an arena game, you still get full arena points as if the game finished. You elso calculated normal.