Was Loki defeated by Shanks?

Honestly this would make the most sense for me based on everything we've seen.

Loki seems to know Shanks personally and the giants respect Shanks very much which would make sense if he was the one who defeated Loki

Is he is powerful as he is being hyped for then I don't think the giants would've been able to defeat him, Shanks being the one who actually beat him would make sense

My only question is when did this happen? It could've easily happened 6 years ago which would explain why he became an Emperor or it could've happened just recently which would explain why he was in Elbaf

Tell me your thoughts about this?