Add barnbridge strategy
@thashimoto1998 FYI I'm fixing the Compound implementation to be compatible with a view only IStrategy.getBalance() requirement.
I encountered below compatible error when compile barnbridge strategy.
contracts/strategies/StrategyBarnBridgeJcUSDC.sol:80:31: TypeError: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
uint256 jcUsdcPrice = IISmartYield(smartYield).price();
^------------------------------^
Error HH600: Compilation failed
I see, there is need to also modify interface.
I see, there is need to also modify interface.
Yeah my bad, it looks like there is no way to enforce getBalance() to be view-only for anything Compound related. In that case I'll rename IStrategy.getBalance() to syncBalance() and remove the view-only modifier.
@thashimoto1998 FYI, I changed getAssetAmount() and getPrice() back to view in the V2 contract interfaces. I think we can cache ISmartYield(smartYield).price() periodically and use the cached price in the view functions.