Assuming we have a leveraged trading position on Aave using aTokens as collateral and vTokens as debt. Are there examples of how this position could be easily split into two or more accounts (any given ratio 0-100%). To split e.g. the following actions could be considwered
Both collateral and debt are transferred to a third party in the same ratio (in-kind transfer)
Debt is repaid, and released collateral is transferred to a thirty party in the same ratio
Currently, AFAIK, there is no direct way to split such a position, you’ll have to take the second path suggested - repay your debt, transfer your collateral as desired and reopen positions.
the reason the first path doesn’t work is because transferring of debt is not permitted (transfer function of vTokens/sTokens revert see this link. If you think about it it makes a lot of sense. If I could just transfer my debt tokens i would transfer them to address 0 to get rid of them and that means that i borrowed some money, but no debt is being recorded on the system on my behalf, i simply pinned the debt on some other address.