Introducing Glow Lotto

Glow Yield
7 min readNov 26, 2021

Today we’re introducing the first dApp built on the Glow ecosystem. Glow’s mission is to help worldwide users save through a wide range of yield bearing products, leveraging Anchor’s stable interest.

The first of these products is Glow Lotto, a no-loss lottery built on Terra.

A historical glance at lotteries brings us back to the Chinese Han Dynasty, when the first signs of a lottery were recorded between 206 and 187 BC. These lotteries are believed to have helped finance projects like the Great Wall of China. The first known European lotteries were held during the Roman Empire, mainly as an amusement at dinner parties.

Since then, lotteries have evolved at different rates, most of the time as a form of gambling, where the majority of participants contribute their capital and only a selected winner or group of winners wins the pool while the rest loses their initial capital.

Most players are usually excited about the possibility of receiving a large prize, and generally, saving is not popular amongst risk-takers. The most recent lottery innovations within TradFi include Premium Lottery Bonds in the UK as well as the Million a Month Account (MAMA), a program created by the First National Bank in South Africa, among others.

Since 2019 we have seen similar initiatives in the DeFi space.

What are Prize-Linked Savings accounts?

No-Loss Lotteries or Prize-linked savings is the concept of using the chance to win a prize to incentivize personal savings. For example, interest payments on deposits are distributed as prizes based on chance probability. And a no-loss mechanism is a great way for savers to have a chance to earn a large prize while earning interest on their money, as the deposit is never lost unlike normal lotteries. This way of participating in a lottery might stimulate healthier behaviour for those who have a greater inclination to gamble.

Glow Lotto is run by our smart contract, which ensures fairness without the possibility for any human to interfere with every result drawn. There are no tricks, just technology and incentives! Our smart contract will be open-source for anyone curious to have a look. Glow Lotto has been audited by Oak Security, the lead auditor firm in the Terra ecosystem.

As we plug-in DeFi products such as Anchor, Glow Lotto uses their stable interest to fill the lottery pool. While most banks give you 0.05% on your deposits, saving through Glow Lotto can net you a guaranteed 5% annually, plus the possibility of winning a lottery every week.

How does Glow Lotto work?

First we are going to make a brief overview on Anchor and then we’ll break down Lotto’s mechanism into four separate sections: deposits, withdrawals, tickets and the drawing.

Anchor protocol serves as a money market between lenders and borrowers of stablecoins. The lender can deposit their stablecoins on the platform for lending and earn interest on it. The borrowers, in turn, can borrow these stablecoins by providing stakeable assets (bonded assets) as collateral.

Anchor Protocol operates using a liquid staking mechanism. Staking rewards earned on bLUNA and bETH (more assets to be deployed) by borrowers are liquidated by the protocol into UST for depositors allowing them to earn target yield up to 20%. For more information on how Anchor works, please check this link.

Now it’s the time for us to introduce how Glow Lotto’s mechanism works:

Deposits

The first step is to get a Terra Wallet with available UST, Terra’s decentralized stablecoin, in order to participate in Glow Lotto.

Per every 25 UST deposited in Glow, users get a ticket. That is, if you deposit 100 UST, you’ll get 4 tickets. Contrarily, if you just deposit 24 UST you won’t receive any ticket. However, an additional UST deposited in your account will earn you 1 ticket. As you earn tickets when depositing, you get free access to the Glow Weekly Lotto.

Deposits have an APR (or interest) that accumulates in the user account, which is approximately 5%. On top of that, depositors will earn GLOW tokens as part of the Depositor Rewards.

Withdrawals

Users can withdraw either part or the total amount of UST deposited in their account at any time. There are two options when withdrawing funds: instant withdrawal and free withdrawal.

Whenever a user performs an instant withdrawal, a fee of 5% will be deducted from the total withdrawal amount. This measure is put into place in order to ensure the fairness of Glow Lotto as it prevents depositors from trying to game the system.

Without this fee, a depositor could game the system by depositing funds right before the lottery is executed, and then withdrawing them right afterwards. In doing so the depositor will have accrued almost no interest towards the lottery (because they deposited right before the lottery was drawn, leaving little time to accrue interest), but would have the same odds of winning as those who had. The 5% fee removes the incentives for this behaviour because the expected value of such actions becomes negative.

This fee is shared pro-rata among GLOW stakers.

Free withdrawals lock the funds to be withdrawn for one week, at which point the user can claim the withdrawn amount and make the withdrawal effective. There’s no fee to be deducted from the withdrawn funds in this case.

Tickets

Each ticket is represented by a sequence of 6 numbers, each number between 0 and 15. “1 2 3 4 5 6”, “1 2 3 13 14 15” or “10 11 12 13 14 15” would all be valid ticket number combinations.

One user cannot hold the same 6 digit combination twice, but up to 10 different depositors can share the same ticket number. In the case of multiple depositors holding the same winning ticket, all of the corresponding depositors win equally.

When a user decides to perform a withdrawal, a number of tickets proportional to the withdrawn amount will be removed from the user account.

The Prize Draw

The prize draw occurs once a week on a Sunday night, at 20:00 GMT. After the lottery is drawn, the prize is distributed among the winning ticket holders according to the prize distribution algorithm.

After winning a lottery, you’ll be able to withdraw your UST prize instantly to your Terra Wallet!

When the lottery is drawn, a “perfect winning ticket” is randomly generated. Then, the lottery pool is distributed among winning ticket holders.

A ticket is a winning ticket if its first two numbers match the first two numbers of the perfect winning ticket. Among winning tickets, there are four tiers: bronze, silver, gold, and diamond. Ticket placement into these tiers is best understood through an example. For this example, say the winning ticket is 537801:

  • 3 sequential matches (bronze) — any ticket starting with 537XXX such 537120
  • 4 sequential matches (silver) — any ticket starting with 5378XX such 537810
  • 5 sequential matches (gold) — any ticket starting with 53780X such 537802
  • 6 sequential matches (diamond) — any ticket that exactly matches the perfect winning ticket

The lottery pool is shared among the matching ticket holders according to the following prize distribution algorithm:

  • 5% among all bronze tickets.
  • 15% among all silver tickets
  • 30% among all gold tickets
  • 50% among all diamond tickets.

It should be noted that all of the corresponding deposits win equally in the case of multiple depositors holding the same winning ticket. This means that if you win with the diamond ticket, but that the diamond ticket is also held by one other depositor, each of you will receive 25% of the lottery pool.

If there are no tickets of a given category (i.e. no diamond ticket holders) the corresponding % of the pot (i.e. 50%) gets rolled forward to the lottery pool for the next lottery.

A reserve fee of 5% applies when distributing the lottery pool. This fee is shared pro-rata among GLOW stakers.

The winning ticket is obtained following a decentralized, verifiable, and non-predictable process, as explained in Randomness. This allows Glow Lotto to deliver a fair lottery without relying on any central party. Nobody, including the Glow Core team, can predict the winning ticket combination.

When the lottery is being drawn (which happens once a week), both deposits and withdrawals are blocked for the duration of the drawing (about 3–5 minutes). This helps ensure the security and fairness of the lottery. In the absence of this measure, someone could deposit and purchase winning tickets as soon as they realize what the winning ticket is.

The big picture

We hope that a fun and easy to use product like Lotto will encourage worldwide users to save and generate yield, but there’s more to come.

Apart from other products such as Glow Creators that will be released soon, Glow’s SDK will make it extremely easy to build new dApps in our ecosystem.

What are your thoughts on Glow Lotto? What other products would you like to be included in Glow Yield?

Let us know in our Discord or through Twitter!

--

--

Glow Yield

Glow is an expansive programmable savings ecosystem built on Terra, commercializing yield with easy-to-use apps.