> For the complete documentation index, see [llms.txt](https://degenreborn.gitbook.io/litepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://degenreborn.gitbook.io/litepaper/game/piggybank.md).

# PiggyBank

{% hint style="info" %}
&#x20;PiggyBank is a signature approach to gamify the **END OF SEASONs. ⏳**
{% endhint %}

A portion of prize pool goes to the PiggyBank. 💰

A **progress bar** serving as an indicator that tells you where we are so far. 🎯

* 🍻 When progress bar is filled up and target met, PiggyBank will be leveled up and progress will be reset. New benchmark will be 2% higher than previous round.
* 🔚 If progress bar is **NOT** filled up within **12 hours time window**, then season will end, and the contributors in the last round will split all the reward accumulated in the PiggyBank.

PiggyBank mechanism is subjected to change after certain conditions are met during certain seasons. ⏰

{% tabs %}
{% tab title="Protection Mechanism" %}
{% hint style="danger" %}
**To prevent mempool science and giga gas price attack in attempting to win the Piggybank, like what happened in Fomo3D, the max duration end time will be protected.**
{% endhint %}

It goes as follows --

1. We generate a pair of <mark style="color:purple;">**public key**</mark> + <mark style="color:green;">**private key**</mark>. 🔑
2. We encrypt the `endtime` using the <mark style="color:purple;">**public key**</mark>. We also reveal the <mark style="color:purple;">**public key**</mark> and `F(endtime)`. For now no one is able to decrypt except for ourselves. 🔒
3. After season ends, reveal the <mark style="color:green;">**private key**</mark>. Anyone can verify that -- 👁
   1. The <mark style="color:purple;">**public key**</mark> and <mark style="color:green;">**private key**</mark> are valid.
   2. The `F(endtime)` indeed results from encrypting `endtime` using the <mark style="color:purple;">**public key**</mark>.
   3. The `endtime` matches the actual season end time.
      {% endtab %}
      {% endtabs %}

### PiggyBank Last-hit

Last-hitting the PiggyBank grants player a **8% $NATIVE reward of the current PiggyBank round.**

<table><thead><tr><th width="184">PiggyBank Round</th><th width="198">PiggyBank Pool</th><th width="148">Target</th><th>Last-hit Reward</th></tr></thead><tbody><tr><td>Round 1</td><td>1 $NATIVE</td><td>1</td><td>0.08 $NATIVE</td></tr><tr><td>Round 2</td><td>2 $NATIVE</td><td>1.02</td><td>0.0816 $NATIVE</td></tr><tr><td>Round 3</td><td>3.02 $NATIVE</td><td>1.0404</td><td>0.083232 $NATIVE</td></tr><tr><td><em><code>round_x</code></em></td><td><em><code>prev_pool + target</code></em> </td><td><em><code>prev_target * 1.02</code></em></td><td><em><code>target * 0.08</code></em></td></tr></tbody></table>

{% hint style="info" %}
***Last-hit***: being the last person who plays the game before current PiggyBank levels up.&#x20;
{% endhint %}

<figure><img src="/files/E8xmru8GoWP9DIR0N4Nn" alt=""><figcaption><p>Reward Prompt</p></figcaption></figure>
