Tetu.io contracts update 1.3.0
These changes were made since version 1.2.0 and deployed during October-November 2021
Big work was made for adoption contracts and tests for multi-chain.
The Github workflow now is running on Fantom by default.
It reduced run tests time from 90min to 17 minutes.
Unfortunately, we should disable coverage reporting for infrastructure and strategies.
Tests still run but on Codcove you will see only base contracts.
For full coverage report need to edit .solcover.js and run npm run coverage

Base Contracts

Bookkeeper 1.1.1 -> 1.1.2

  • Adjusted revert messages
  • Allow call registerFundKeeperEarned() for strategies
  • registerPpfsChange() deprecated, this metric useless

Controller 1.1.0 -> 1.2.0

  • Add pure reward consumers - they excluded from reward vesting mechanic. It needs for TetuSwap pairs and partnerships

FeeRewardForwarder -> ForwarderV2

Build from scratch a new forwarder contract with new liquidation logic.
Now we are doing fewer steps for distribution and able to liquidate fewer rewards without uniswap errors
Routes managing now clear and simple
Old contract removed

VaultController 1.1.0 -> 1.2.0

  • Add toInvest, rebalance and disableLocks settings

Folding strategies

Create a new base contract with universal logic for any folding implementation.
Now we are able to build new folding strategies fast and use universal tests to keep safety on the highest possible level
Iron strategy was refactored accordingly but was not deployed (and I guess will not)

StrategyBase

  • Add the possibility to pause a strategy without withdrawing funds.
  • Add additional check on withdrawing process - now we will not able to withdraw to vault less than 90% of the expected amount
  • Add silent liquidation process for Autocompound strategies - we have very little rewards for distributing and are not able to liquidate it in the most cases
  • Add universal autocompound functions for single tokens and uniswap-like LP tokens

New strategies:

  • AAVE
  • Curve
  • DinoPool
  • Geist
  • SpookySwap
  • TetuSwap (for internal purposes)

SmartVault 1.3.1 -> 1.5.1

  • Revert messages removed/adjusted for keep contract size in 24kb
  • updateReward modifier/function was optimized
  • Add toInvest settings - we should keep some amount in vaults for cheaper swaps
  • Add disableLock() for disabling not initiated lock mechanic
  • Call invest() in doHardWork()
  • Allow moving locked tokens from controller

Infrastructure Contracts

LiquidityBalancer 1.0.0 -> 1.1.0

  • Revert messages adjusting
  • Add moveLiquidity() function for migration process
  • Improve adding liquidity

PriceCalculator 1.2.1 -> 1.3.1

  • Add Curve tokens price calculation

AutoRewarder 1.0.0 -> 1.1.1

  • Make contract proxy
  • Create function for storing info off-chain
  • Some fixes

RewardCalculator 1.0.0 - 1.4.1

  • As a result of many changes make a decision to calculate profitability based on earned TETU as the clearest and simple process.

TetuSwap

The first version of contracts
  • TetuSwap pair
  • TetuSwap factory
  • TetuSwap router
  • TetuSwap library
  • Some internal contracts