How does Balancer prevent reentrancy attacks?


As part of a research project I am doing at uni, I wanted to know what kind of countermeasures does Balancer implement to avoid reentrancy attacks?

It would be very nice if I can get specific lines of codes about this topic in the smart contract of Balancer.

Thanks in advance!

1 Like

Here’s a quick search for reentry on the github,

This page, Events - Balancer states,

All stateful functions use either a lock or viewlock function modifier. A mutex places a lock on contract state and prevents any sort of re-entrancy.

Is that helpful?


That is awesome! Thank you for your help.