Dealing with risk at LunaFi

George Porchester
LunaFi_project
Published in
3 min readNov 14, 2022

The speed at which last week unfolded has been breathtaking, and we offer our utmost sympathies to those affected by the ongoing crisis at FTX. They were using FTX users' deposits as if they were at the Casino.

LunaFi is a non-custodial protocol, with our TVL shown on chain. How can you verify what our front end is telling you?

The below on chain data will be visible on Polygonscan:

  • Net Deposits of LP’s (Liquidity Providers)
  • P&L of Settled bets
  • Lunabets pending stakes

Provided via an Oracle

  • Expected Value of the P&L of unsettled bets
  • Max Exposure

Sportradar provides us with data for the LunaFi Oracle. Over time we will make this more resilient.

How would LunaFi react to a mass withdrawal/bank run scenario?

Firstly, Lunabets deposits are controlled only by the user. These funds are segregated from the LunaFi house pools.

Looking at the Whitepaper, we can see that LP’s can only withdraw when there is sufficient liquidity to do so. We call this adjusted liquidity, which considers what the pool may have to pay out in the future.

E.g. $100,000 in the pool (which is owned by one LP provider)

Porchy bets $10,000 on Chelsea 2.0. There is now $110,000 of liquidity in the pool.

Let’s say the house edge on this bet is $100. We know that the TVL=Liquidity +EV-Pending Stakes. $100k+$100-$10,000=$100,100.

(where liquidity is Net Deposits+ P&L + pending stakes)

We know that the max exposure of the pool is $10,000 in winnings & $10,000 of stake to be returned. Therefore the LP can’t withdraw more than $80,100 to ensure paying out this bet.

There is another preventative for a sudden loss of liquidity, as LP’s lose expected profit from pending bets & penalised if this number is negative.

Multiples Risk

With LunaFi & Lunabets, there is complete transparency. Some caveats are how we can design the proper user interfaces to ensure everyone who operates in the ecosystem can understand the data.

When I set out my vision to build Lunabets, I wanted to create a protocol with no credit or fractional reserve in the system. Although this sounds great, it will never be realistic when considering multiple bets.

So let us take an example. We have 100 users placing a $1 on a 1,000,000/1 multiple. The max exposure of these bets combined are $100M with the house standing to win $100. Let us assume they are all based on different sporting events independent of each other.

$100M left in AAVE would make $10 in one second, assuming 5% APY. This would therefore be a very inefficient use of capital. Imagine if these sporting events were over the next six months before the bets settled. No liquidity provider would lock up these funds for such a small reward.

We have to consider that some events are so unlikely to happen. Even without assuming a margin, the chances are 1e+72 for them all to win. It’s such a large number I can’t even comprehend it. You have a greater chance of winning the EuroMillions twice in a row at 200m/1!

In reality, many of these multiples have similar selections and are often on opposing sides of various games, constantly hedging each other. The more volume we have, the risk of the variance decreases.

To solve this, we are designing a risk-adjusted formula for max exposure & have taken external insurance so that all Lunabets players will be covered in any scenario. We hope to create a Nexus Mutual contract that will provide on-chain and verifiable cover by next year.

In addition, vLFI holders are also effectively an insurance pool. Up to 30% of their deposits can cover any shortfall event across the protocol.

A betting house is ultimately an insurance fund, and the more diverse the pool gets, the more efficient the pool becomes.

Future Diversification

I see gambling as the first step into what LunaFi House Pools can offer. We are looking into developing the following:

1. Depositing spare liquidity on AAVE from the house pools

2. Providing SX.bet access to our liquidity & ability to hedge our exposure with them.

3. Providing liquidity to e.g. Nexus Mutual / Unslashed Finance to diversify into other insurance products.

None of this will be done without consulting the community first. At this stage, there is, of course, a considerable amount of trust in the team. Thankyou for putting your trust in us to deliver!

--

--