Exodus 21:33-36 NIV

33 “If anyone uncovers a pit or digs one and fails to cover it and an ox or a donkey falls into it,

References for Exodus 21:33

34 the one who opened the pit must pay the owner for the loss and take the dead animal in exchange.
35 “If anyone’s bull injures someone else’s bull and it dies, the two parties are to sell the live one and divide both the money and the dead animal equally.
36 However, if it was known that the bull had the habit of goring, yet the owner did not keep it penned up, the owner must pay, animal for animal, and take the dead animal in exchange.

References for Exodus 21:36