Open code423n4 opened 3 years ago
gpersoon
There is some unused / redundant code present.
Router.sol defines repayDelay but it is never used Vault.sol initializes POOLS twice, with the same value.
Router.sol: uint public repayDelay = 3600;
Vault.sol: function init(address _vader, address _usdv, address _router, ... .. POOLS = _pool; .. POOLS = _pool;
Editor
Remove redundant code
https://github.com/vetherasset/vaderprotocol-contracts/commit/f6b6a369f64e5ade0b7511d397d708a9a0916178
Handle
gpersoon
Vulnerability details
Impact
There is some unused / redundant code present.
Router.sol defines repayDelay but it is never used Vault.sol initializes POOLS twice, with the same value.
Proof of Concept
Router.sol: uint public repayDelay = 3600;
Vault.sol: function init(address _vader, address _usdv, address _router, ... .. POOLS = _pool; ..
POOLS = _pool;
Tools Used
Editor
Recommended Mitigation Steps
Remove redundant code