once upon a time , when the other gods had first imprisoned loki for his many crimes , they 'd chained him up beneath a giant snake that had continually dripped venom onto his face , causing him unimaginable pain .