When borrowing, is it possible to specify a user_pays higher than position_size, as a result, the borrowed amount will underflow to the max value:
src/processor/swap.rs#L16
The entire borrow function will work with an extremely big amount of borrowed funds even if the user pays almost nothing. However, the function will fail anyway later as the user would have to provide a large amount of collateral anyway in add_collateral:
src/processor/swap.rs#L102
Consider using checked_sub anyway to remove any potential issues in the future.
