Torque-Money / Dev-Environment

Smart contract dev environment.
GNU General Public License v3.0
1 stars 0 forks source link

Borrow against same asset collateral #11

Closed BenGOsborn closed 2 years ago

BenGOsborn commented 2 years ago

Look into what actually happens and if it should be allowed - investigate for future multi-asset collateral - move swap into its own separate wrappered function

BenGOsborn commented 2 years ago

Fixed the swap in f74d1b0b58db17a90cc4d68db0e278ede05104bd

BenGOsborn commented 2 years ago

What is looking like the best option regarding the same asset is to prevent it.

In the case of a multi collateral leveraging, we can just not take the asset being borrowed against into consideration when we consider the accounts collateral.

BenGOsborn commented 2 years ago

Technically this could be done, however, in order to do so, we would have to add a special edge case to the swapping mechanism for the sake of an edge case that is not the intended use of the protocol.