Open code423n4 opened 2 years ago
@LilYeti: True, but this function is never called to transfer and unwrap between pools. That is because only the wrapped version of the collateral is whitelisted.
Downgraded to low severity since there isn't an actual error in the code, but there could be through future implementations that are not aware of this particularity.
Handle
csanuragjain
Vulnerability details
Impact
receiveCollateral is not called on sendCollateralsUnwrap due to which target pool does not get updated with the transferred token amount
Proof of Concept
Navigate to contract at https://github.com/code-423n4/2021-12-yetifinance/blob/main/packages/contracts/contracts/ActivePool.sol
Observe that sendCollateralsUnwrap function is not calling receiveCollateral and thus target collateral are never updated (reference is sendCollaterals function)
Recommended Mitigation Steps
Add below lines in sendCollateralsUnwrap