VIS-2 / taobank-04-24

0 stars 0 forks source link

`StabilityPool` `stableCoin` variable not updated alongside factory #28

Open DanailYordanov opened 4 months ago

DanailYordanov commented 4 months ago

Context

StabilityPool::setVaultFactory()

Description

When changing the vault factory in StabilityPool::setVaultFactory(), the stableCoin variable is not updated alongside.

Recommendation

function setVaultFactory(address _factory) external onlyOwner {
    require(_factory != address(0x0), 'factory-is-0');
    factory = IVaultFactory(_factory);
+   stableCoin = IMintableToken(address(IVaultFactory(_factory).stable()));
}