Selecting three tables with relationship
I don't really understand what this join is trying to accomplish? Seems redundant since the information is the same, but perhaps with your real world data it is not always the case.

WHERE  posts.position = posts.submitter

Old-style JOINs are not recommended. Use INNER JOIN instead. This may also cause performance issues because rates is not explicitly joined so it would be trying to do a CROSS JOIN and those are very slow not to mention it can mess up your result set.

FROM    posts,
        users,
        rates
WHERE   posts.position = posts.submitter 
AND     users.username = posts.submitter


Becomes:

SELECT  posts.*, 
        users.username, 
        SUM(
        IF(rates.hash = posts.hash, (rates.likes - rates.dislikes), 0)
        ) AS rate 
FROM    posts 
INNER JOIN users
    ON users.username = posts.submitter
INNER JOIN rates
    ON users.username = rates.username
WHERE   posts.position = posts.submitter 
GROUP BY posts.hash 
ORDER BY posts.ID DESC LIMIT 5;


I also formatted it for ease of reading. Executes in 2 ms using your data.
Try it: http://sqlfiddle.com/#!2/d198f/4

Edit: fixed a typo.