Psalm 137:8
5 If I forget you, O Jerusalem, may my right hand be crippled. 6 May my tongue stick to the roof of my mouth, if I do not remember you, and do not give Jerusalem priority over whatever gives me the most joy. 7 Remember, O Lord, what the Edomites did on the day Jerusalem fell. They said, “Tear it down, tear it down, right to its very foundation!” 8 O daughter Babylon, soon to be devastated, how blessed will be the one who repays you for what you dished out to us. 9 How blessed will be the one who grabs your babies and smashes them on a rock.
Revelation 18:6
4 Then I heard another voice from heaven saying, “Come out of her, my people, so you will not take part in her sins and so you will not receive her plagues, 5 because her sins have piled up all the way to heaven and God has remembered her crimes. 6 Repay her the same way she repaid others; pay her back double corresponding to her deeds. In the cup she mixed, mix double the amount for her. 7 As much as she exalted herself and lived in sensual luxury, to this extent give her torment and grief because she said to herself, ‘I rule as queen and am no widow; I will never experience grief!’
Notes and References
"... Similarly to the Jeremiah texts (Jeremiah 50:15, 18, 24), Psalm 137 indicates Yahweh as the subject of judgment (Psalm 137:7). Differently to them, however, the psalm does not immediately refer to any human agent of the judgment (compare Jeremiah 50:9, 41–42). In Psalm 137:8–9 one may postulate a kind of human retaliator(s) as the texts surely evoke a scene of warfare, containing the expression (‘blessed shall he be who ...’). Still, it is textually unclear whether the avenger is human or divine. What is clear, though, is that Psalm 137:8 explicitly expresses an accurate requital to Babylon, which to be done according to how she treated the Israelites (‘one who pays back to you what you have done to us’). Such a vindictive judgment in Psalm 137:8 is commensurate with its own context as Psalm 137:3 designates Babylon as ‘our captors’ and ‘our tormentors’. The Masoretic Text draws attention to a surplus expression (‘what you have done to us’) by a wordplay (compare Jeremiah 50:29). ... These probably underscore an infallible retribution to Babylon. In Revelation 18:6 the double use of a word in kind is characterized ... articulating the judgment of Babylon. The textual affinity of Revelation 18:6 to Psalm 137:8 is more reliable than with Jeremiah 50:29 ..."
Kim, Sung Kuk Psalms in the Book of Revelation (p. 128) University of Edinburgh, 2013