Each strategy development includes not only implementing base functionality but analyze the farmable platform and the fetching of all critical metrics.
Possible attack vectors and defense
Flash loan and Arbitrage
Currently, Tetu's smart contracts are not eligible for this kind of attack.
Our vaults have whitelist protection for deposit operations.
This makes the likelihood of any type of attack involving asset manipulation impossible.
Re-Entrancy
Currently, Tetu's smart contracts are not eligible for this kind of attack.
In case we use untrusted external calls, OpenZappelin best practive protection will be implemented.
Arithmetic Over/Under Flows
All math operations use OpenZappelin library SafeMath.
Functions visibilities
All critical functions checked with unit testing for unavailability for use on non-governance addresses.
Race conditions / Front running
User's assets are not eligible for this kind of attack in our contracts.
However, reward selling, theoretically, can be target of front running from sandwich bots.