Protecting smart contracts of Decentralized Finance systems against Reentrancy attacks