I’d like to propose a novel (??) concept for “leverage” in DeFi that works around some of the issues of the normal model.
That is, if you just borrow money to fund some transaction that hopefully yields a profit in the future, your creditor has to receive your position as ‘collateral’ and be able to force liquidation if its value falls dangerously low.
What I am wondering is, why borrow money at all. Maybe this idea is not new – I appreciate any pointers to previous work in this area.
Anyways, I’m gonna explain my proposed scheme:
Bob offers a trade of 50 $FOO tokens against 200 $BAR tokens. Potentially he owns neither $FOO nor $BAR.
All he does is offering the trade and depositing a collateral, let’s say 10 $SUSHI.
Alice takes Bob up on the offer and also deposits 10 $SUSHI collateral.
Now they hold positions against each other: Alice is -200 BAR/+50 FOO, while Bob is +200 BAR/-50 FOO.
At any point, Alice or Bob may request the pending trade to actually be executed, i.e. request the position to be liquidated.
The other party may decide EITHER to execute the trade, OR to forfeit their collateral.
Obviously, if their unrealized loss exceeds the value of 10 $SUSHI, they will just forfeit the 10 $SUSHI collateral and not execute the trade.
Assume that 10 SUSHI are worth just 1 FOO token (or 4 BAR tokens). In this case, it would be as if Alice and Bob traded with 50x leverage.
Though, in contrast to a classical leveraged trade, not only their downside is capped (loss of collateral), but also their upside: They may win AT MOST the other side’s collateral, as long as the other side acts rationally.
Assume the value of FOO against BAR rises 10%, so now you can get 220 $BAR for 50 $FOO on the market. Bob’s position of +200 BAR is now worth just ~45 $FOO. So he would prefer to forfeit his 10 $SUSHI collateral rather than lose the 50 $FOO that he would have to pay. The ‘unrealized loss’ of his position exceeds his collateral: He will forfeit the collateral to Alice in the same way that a leveraged position gets liquidated by claiming the collateral.
In this scheme, there is no creditor in charge of monitoring and liquidating positions: It’s Alice and Bob, the traders, which have to monitor the position. Once a party’s unrealized gains cannot increase further (because the other side’s collateral’s worth is exhausted), it is in their interested to liquidate the position.
However, 10 $SUSHI is perhaps ALL that Alice owns. So Bob may try to call her bluff and actually force execution of the trade, even though it would cost him more.
To guard against that, we can add lock periods to trading contracts. This also enables asymmetric leverage, by approximating Futures and Options.
E.g. Bob can offer:
- Earliest execution on Oct 01
- OFFER: 65 $FOO tokens. ASK: 200 $BAR tokens. I.e. the counterparty starts out in the profit, assuming our rate from earlier.
- Bob deposits 200 $SUSHI collateral
- Counterparty has to deposit 2000 $SUSHI collateral
Here, Bob buys himself potential upside by putting himself in the loss initially. His potential win is 10x his stake.
It’s like an OTM option: If market stays flat, Bob loses, but if it moves his way, his upside can be huge.
Again, the leverage can be anything 10x, or 25x, or 1000x – it’s independent of the potential upside.
In addition, until October 1, Bob’s “bluff” of not actually owning any $FOO cannot be called.
We can allow him to exit his position before October 1, by simply making positions fungible.
Suppose Alice took on that trade of Bob’s, and Bob won heavily: The 200 $BAR tokens that Alice owes him are worth 500 $FOO now. It’s September 20 and he wants to lock in his profit and avoid having to trade ANYTHING on October 1.
He will find Carol’s trade offer that looks like this:
- Earliest execution on Oct 01
- OFFER: 500 $FOO tokens. ASK: 200 $BAR tokens.
- Carol deposits 1000 $SUSHI
- Counterparty has to deposit 1000 $SUSHI
Bob cashes in his position (+200 $BAR collateralized with 2000 $SUSHI) against Carol’s:
He routes 65 $FOO and 200 $SUSHI collateral to Alice – Alice keeps her exact position from before, only now Carol is the counterparty.
Since Alice’s position was collateralized with 2000 $SUSHI, but Carol only asked for 1000, Bob may also pocket this difference as a profit.
From Carol, he keeps a debt of 435 $FOO collateralized with 800 $SUSHI, payable on October 1.
Carol also holds the position she asked for, only that 65/500 $FOO are payable to Bob; if Carol forfeits this payment, he claims 800 $SUSHI. The remaining 435/500 $FOO are payable to Alice; if Carol forfeits this payment, Alice claims 200$ SUSHI.
How does the actual execution of a trade happen, in the case that neither party forfeits the collateral? If both $FOO and $BAR are ERC20 tokens, it’s easy to see.
But note that the trade could also be a cross-chain Atomic Swap. In this case you need an independent “Sushichain” – Build Sushichain To Connect Liquidity Across Chains – to take care of monitoring the FOO and BAR blockchains, and allowing claim of collateral if one party chooses to not execute the trade.
Note that this version of the Sushichain could provide extreme amounts of liquidity, since locking up actual funds is not required for Making or Taking offers – only SUSHI collateral is needed.
Here is a write-up of the mechanism from that perspective: Trustless Leveraged Trading via Atomic Swaps
I would really love to discuss this approach with people interested in DeFi mechanics.