[Proposal] Margin Trading

Hi All,

I just submitted a proposal for Margin Trading on Mirror and I have a couple of callouts for the Anchor protocol in there as well (especially as it relates to using your Anchor savings account to cover a maintenance call). I would love to get feedback from both groups to see how we can work this out between applications.

Thank you for your time.

Looks interesting. Do you mind sharing a bit more details here on how the integration with Anchor will look like? E.g. how aUST is to be integrated in the system.

1 Like

Hi Wolf, Thanks for this submission.

First and foremost, I would like to show agreement for the need for this concept.

I’m preparing my own post on here about how UST borrowing is so important for maintaining such a high Anchor rate long-term and that dishing out ANC rewards to incentivise borrowing should be only a last resort. And I was going to suggest ways to make it more easy to borrow by directly considering each borrow use case. One of the key use-cases was I would talk about is leveraged trading, but it looks like you’ve already beat me to it, so I’ll leave this on your post.

My focus would be less about savings, but more about borrowing. Trading on margin essentially means borrowing, and Anchor wants people to borrow, so it makes sense that traders on Mirror should have access to conveniently borrow UST to leverage their trades.

I think it might be best to tackle this with a phased approach, with the first phase being very simple, and not changing or adding too much, as Anchor has many priorities to focus on. I think we can maybe accomplish this with just one smart contract and update to Mirror UI. I have a number of ideas I’d like to share about how to accomplish this, but I’d like a few more days to further audit Anchor’s smart contracts and further evolve the different possibilities I’m considering. Please stay tuned.

I’d like to make it very clear: this idea should not be ignored, as convenient borrowing is the best way to optimize Anchor’s success.

1 Like

To offer convenience to Mirror traders, reduce confusion about Anchor, and further advertise Anchor (increase borrowing), here is my suggestion for Phase 1:

UI/UX improvements on Mirror. Just how they have a toggle switch for ‘Limit order’, there could be another one for ‘Margin Trade’. Once toggled, it shows ‘Provide collateral to unlock Margin’.

Now the user must provide collateral to Anchor. As the user specifies a loan amount, a safe and maximum margin/borrow amount is also displayed. The first convenience is that the user can provide LUNA(or any bondable asset) as collateral directly from Mirror. The other convenience is that the two transactions: (bonding LUNA to mint bLuna + providing bLUNA as collateral) are bundled together. The use does not need to know anything about bAssets.

Once Margin is unlocked, the user can now execute trades under ‘Margin Trade’ using an additional input field: ‘Margin amount’, that indicates borrow amount. The borrowed amount can be shown both as a dollar (UST) amount and as a degree of leverage based on their non-margin input. Also in that screen, the user will see how much borrow amount is safe vs risky based on how much collateral they’ve provided.

To avoid unnecessary confusion, reclaiming collateral would default to ‘Instant Burn’.

This way, all the Anchor functionality stays the same. Liquidations can still occur in the event of LUNA price decline. The change in mAsset price does not impact loan risk. There is no margin call.

Initial ideas on potential further improvements:
-Add margin call as an optional protection service, but I still am not sure how this would work.
-The direct sale of Collateral and Backup Collateral–to save on transaction fees, and to not have to worry about unbonding period or the Terraswap (‘Instant Burn’) premium + fees.

I would love to hear any feedback or improvement to this.
Thank you.