Tetu.io contracts update 1.5.0

These changes were made since version 1.4.0 and deployed during January-February 2022

Base contracts

ArrayLib

Added sorting functions

Bookkeeper 1.1.2 -> 1.1.5

Registration vault and strategy logic was changed. Now we check them on Controller instead of internal Bookkeeper arrays for reducing gas cost.

Reward distribution logic was improved for properly register StrategySplitter snapshots

ControllableV2

New base component. Gas usage optimised. Compatable with V1 slots but some functions removed, require properly changes on child contracts.

Controller 1.3.0 -> 1.4.1

Contract size optimized. Was removed all modifiers and replaced to functions calls.

Added StrategySplitter governance function addStrategiesToSplitter()

ForwarderV2 1.2.0 -> 1.2.3

Slippage now is a changable variable.

Added minimal amount for processing for reducing gas cost of doHardWork actions

SmartVault 1.8.2 -> 1.10.2

Migrated from Controllabel to ControllableV2

Created VaultLib, moved some static logic to the lib. Properly changed functions for using the library.

Optimisation for reducing gas cost.

Name and Symbol can be overriden. However it will be not reflect on polygonscan :(

Added a logic for

  • call doHardWork on invest actions

  • ability to always call invest on deposit actions

Removed SafeMath library.

Strategies

All strategies doHardWork() now able to call directly (from HardWorkers EOAs) without using vault or controller. It needs for more flexible managing this process from off-chain scrips.

Removed deprecated interfaces

Folding strategies

Added manual actions for HardWorkers

Now we are not investing assets and not rebalance during doHardWork for reducing gas usage. These actions moved to off-chain script and calls when it is really necessary.

Proxy strategies

Created ProxyStrategyBase for using with proxy strategies

StrategySplitter

New middle layer solution. Using between Vault and multiple strategies.

For vault the splitter is a strategy, for sub-strategies the splitter is a vault.

Contains partially functionality from vault and strategy for properly emulating behavior.

New strategies:

  • Alpaca

  • Beethoven

  • Impermax

  • Qi staking

  • Self farm strategy

  • Nacho

  • Tomb

Infrastructure

PriceCalculator 1.3.1 -> 1.3.2

Added balancer tokens price determination

Autorewarder 1.1.2 -> 1.1.4

Now we are able to exclude some platforms from calculation.

Distribution period changed to 7 days

RewardCalculator 1.4.1 -> 1.5.3

Removed deprecated functions

Optimised reward calculation process.

TetuSwap

TetuSwapRouter 1.0.0 -> 1.1.0

Added sync() call for each swap call

Last updated