We are all familiar with message of Hakoras HaTovah gleaned from Moshe's avoidance of smiting the Nile with blood and frogs because the water had saved him as an infant.
It is not so clear in what regard the water saved him. Some say it served as an "escape" for Moshe from the Egyptians seeking him.
Some say, his being in the water ended the decree against himself and all other male babies, as it was assumed that the savior of the Jews was already thrown in and drowned.
I had always assumed that it was the water that kept him afloat from drowning. But recently I questioned this approach because if anything, the water THREATENS to drown, and only his "floatation device" kept him safe; The Teivah!
The first Medrash Rabbah in Bishalach (towards its end) has a girsah that states that Moshe was grateful for the water "not harming" him! The עץ יוסף explains, that normally the river's current would have swept the teivah and caused it to capsize, but the river withheld its nature from doing so.
This extends our perception of Hakoras HaTov to recognize and be grateful even for a שב ואל תעשה - a passive restraint from an expected harm!
This is also clear from the fact that Lot was saved from Sedom in the merit of his favor to Avraham and Sarah when he did not disclose Sarah's true relationship with Avraham to the Egyptians. Lot was saved by angels because he withheld from ratting on his uncle!