Edge Cases

There are a couple of edge cases that integrators should keep in mind.

  • If one of the lending providers used do not have all the liquidity requested available when the redeemIdleToken is called the tx will revert. To avoid having funds completly locked until new liquidity is available in the underlying lending protocols, we allow users to redeem interest-bearing tokens directly with the redeemInterestBearingTokens method.

  • During a black swan event is possible that iToken price decreases instead of increasing, with the consequence of lowering the IdleToken price. To mitigate this we implemented a circuit breaker on the iToken price (see whenITokenPriceHasNotDecreased modifier) that prevents users from minting cheap IdleTokens or rebalancing the pool in this specific case. The redeemIdleToken and redeemInterestBearingTokens won't be paused but the rebalance process won't be triggered in this case. Users can always redeem tokens back but if a user decides to call redeemIdleToken during a black swan event he would capitalize a loss.

  • USDT contract can potentially add a fee in the future that will affect tranferand transferFrom methods, we added a circuit breaker to pause the contract in the unlikely case that a fee is introduced.