During the code review, It has been observed that asset and collateral check is missing. On the timeswap pair, the checks are not implemented and that can cause misintended behaviours.
We want to give the caller (the owner of the bond and insurance tokens) the ability to transfer the asset ERC20 token and collateral ERC20 token to different addresses.
Handle
defsec
Vulnerability details
Impact
During the code review, It has been observed that asset and collateral check is missing. On the timeswap pair, the checks are not implemented and that can cause misintended behaviours.
Proof of Concept
https://github.com/code-423n4/2022-01-timeswap/blob/main/Timeswap/Timeswap-V1-Core/contracts/TimeswapPair.sol#L265
Tools Used
None
Recommended Mitigation Steps
Consider checking AssetTo and CollateralTo if they are same.