yearn / yearn-protocol

Yearn smart contracts
https://yearn.finance
GNU Affero General Public License v3.0
441 stars 212 forks source link

fix: ensure one strategy can not be applied to more than 1 token #45

Closed zhiqiangxu closed 3 years ago

zhiqiangxu commented 3 years ago

This commit ensures that one strategy won't be applied to more than 1 token, otherwise the balanceOf(address _token) will be meaningless for those tokens that share the same strategy, and when corresponding vaults tries to withdraw, the amount of underlying token will be wrong.

kx9x commented 3 years ago

This is interesting, but I guess v2 vaults completely changes this restriction since vaults will have multiple strategies? Maybe that is why this PR isn't seeing traction because v1 will go away eventually

storming0x commented 3 years ago

Closing this since v1 system will be replaced soon by v2 where this no longer applies and all major development is shifting towards v2.