# Welcome to FlappyEth

Dodge FUD and fly your ETH to safety!

<figure><img src="https://10533442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFC0ZUtHc668hpnYTUQBz%2Fuploads%2F19XYq7gZ1WZNprKR2li8%2Fledger%20flappy.gif?alt=media&amp;token=52c56a12-48e2-4795-81f3-64426d26d109" alt=""><figcaption></figcaption></figure>

## FlappyEth is a Play-To-Earn, where players can play the game to earn ETH.


# Mission Statement

Not to get all preachy but...

Integrity is missing from a LOT of projects in Web3.

Why Rug Bro?

At [Devsbased Labs](https://devsbased.com) we build games that are fun to play, as [secure and safe as possible](/faqs/security#code-audit-by-certik) and gives everyone the opportunity to be a Moon Boi.

Scammers are bad for Magical Internet Money. Stop scamming, BUIDL cool stuff that people want to play-to-earn instead of being a Wagie.


# Our Signature

Games built with ❤️

[devsbased.eth](https://app.ens.domains/devsbased.eth)

***(Be sure to check any contracts purporting to be from us is under our 'subnames' list on ENS Domains)***

<details>

<summary>Disclaimer</summary>

Whilst we have taken every reasonable effort to ensure that the code is bug/error free as possible all software, particularly in the space of Web3 should be seen as experimental ([even if it has been audited](/faqs/security#code-audit-by-certik)) so funds deposited into smart contracts should always be seen as **'At Risk.'**&#x20;

We have also [renounced all contracts](/faqs/security#renounced-token-contract) at launch to ensure true (or as close to as possible) decentralization so once these contracts are out in the wild, they are out of our control.

Other risks to the user comes in the form of government legislation of their local jurisdiction. Always check your local laws to ensure that you keep abreast of latest news on laws which are always evolving rapidly and may affect your rights to interact with these smart contracts.

No Liability is Accepted.

</details>


# How to Play

<figure><img src="https://10533442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFC0ZUtHc668hpnYTUQBz%2Fuploads%2FE75pd2bbLL2otzj1Z1sq%2Fgitbook_bg-removebg-preview.png?alt=media&amp;token=c933416e-5bff-45ac-90bc-400375273731" alt=""><figcaption></figcaption></figure>

## **Tap the spacebar to fly and navigate the hardware wallet around the FUD-filled newspaper articles for as far as possible without crashing.**

## &#x20;**Submit your best score for a chance to win ETH!**

**(Currently on Desktop Only)**

{% embed url="<https://youtu.be/rDxEE41uNYo?si=c79Fh25uCvxpzNEg>" %}


# Gaming Events

Happens weekly. Set your watch!

Games can be started by players unilaterally as long as the Prize Fund holds a minimum threshold of 100 $FLAPPY.

<details>

<summary>Gaming Event Structure</summary>

* **30-Minute Gaming Events**: Each game initiation starts a Gaming Event lasting 30 minutes. Players compete within this time frame to achieve the highest scores, with the top 5 wallets being rewarded in $bFLAPPY.&#x20;

</details>


# Eligibility to Participate

* **FLAPPY Token Requirement**: Players must hold at least 2000 $FLAPPY tokens to be eligible to start a game. This requirement ensures that only players who are invested in the ecosystem can participate.
* **ETH in Prize Fund**: A Gaming Event can only be initiated if the Prize Fund Wallet has at least 100 $FLAPPY. This condition ensures that there are sufficient rewards available for players before they begin competing.


# Starting a Game

* **Cost to Play**: Starting a Game Round requires spending 10 $FLAPPY tokens. This amount is deducted from the player's wallet each time they initiate a round.
* **Game Rounds and Attempts**: Each Game Round provides the player with 10 attempts to achieve their highest score. These attempts are all part of a single round, and the player can only submit their best score from these attempts.
* **Funding the Prize Fund wallet:** The Prize Fund must hold a minimum amount of $FLAPPY to enable players to start a Game Round. It is auto-funded by a combination of fees captured at the start a game and fees captured by the $FLAPPY [Afterburner.](https://learn.flappyeth.com/faqs/flappy-token#gaming-fees) The Prize Fund can also be funded directly by players to start a new Game Round.

<figure><img src="https://10533442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFC0ZUtHc668hpnYTUQBz%2Fuploads%2FYSrPwRadRw6aHQBgTOYd%2Fimage.png?alt=media&amp;token=313c9b27-73f2-45e1-9218-5420f2da7993" alt=""><figcaption></figcaption></figure>


# Scoring and Ranking

* **Score Submission**: At the end of the 10 attempts, players submit their highest score. This score is then used to rank players within the ongoing Gaming Round.
* **Real-Time Leaderboard**: Throughout the 20-minute Gaming Round, players’ scores are tracked and displayed on a real-time leaderboard, showing the top competitors.
* **Active Players in a Round:** Players can also check how many Players are playing within a Round in Real-Time.


# Selection of Top Players

**Top 5 Players**: At the end of the 20-minute Gaming Event, the top 5 players with the highest scores are selected to win a portion of the Prize Fund. This selection is based purely on their performance during the event.

<figure><img src="https://10533442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFC0ZUtHc668hpnYTUQBz%2Fuploads%2FeYhbNAwHSoVU9Lqz8aEJ%2FBildschirmfoto_2024-11-12_um_13.58.10.png?alt=media&amp;token=3d10c840-cf6a-4ec1-8563-cf83fb7cd662" alt=""><figcaption></figcaption></figure>


# Claiming Winnings

**ETH Rewards**: The ETH (check out bETH in ['FLAPPY Token'](/faqs/flappy-token)) in the Prize Fund Wallet is distributed by Smart Contract among the top 5 players. The distribution is proportional to their ranking, with higher-ranked players receiving larger portions of the ETH rewards and able to claim at the end of the Gaming Event.

There is a limited time to do so, any winnings not claimed in time are forfeited and go back into the Prize Fund wallet.

**Stage 1: Submit to High Score**

<figure><img src="https://10533442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFC0ZUtHc668hpnYTUQBz%2Fuploads%2FTHDYsi2hWXw7o0zRumnE%2Fimage.png?alt=media&amp;token=36bf271a-08fe-4e7f-8afa-522d6127727d" alt=""><figcaption></figcaption></figure>

After you have completed 10 games this message will appear and prompt you to submit your highest score. Pressing the button will trigger a signature request to inscribe the score on-chain.&#x20;

**NB: Sometimes this message won't appear and instead you will see Stage 2. If this happens but you haven't inscribed the score on-chain, press refresh and this message will appear. Failure to sign the transaction, even if Stage 2 appears, means you will lose out on any Prize Fund winnings.**

**Stage 2: Score Submitted**

<figure><img src="https://10533442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFC0ZUtHc668hpnYTUQBz%2Fuploads%2FHpgBLkj6iPF58MwczYCE%2Fimage.png?alt=media&amp;token=366c76a4-f275-4e92-b1e4-e511c39aecf4" alt=""><figcaption></figcaption></figure>

Once you have inscribed your score on-chain, wait until the end of the 20-minute Game Round and once the Round ends, refresh the page to Claim Winnings.

**Stage 3: Claim Winnings**

<figure><img src="https://10533442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFC0ZUtHc668hpnYTUQBz%2Fuploads%2FgFk2NKRE8ogNUXfKLuqi%2Fimage.png?alt=media&amp;token=2e280c50-fa0c-47cd-aec7-12c6281fc368" alt=""><figcaption></figcaption></figure>

Once the round ends you have 5 minutes to claim your allocation of the Prize Fund. If you don't claim within this period then you miss the opportunity and the winnings remain in the Fund for the next Round.


# FLAPPY Token

FLAPPY utility within gameplay. Protected by Baseline.

<details>

<summary>What is the token contract address of $FLAPPY?</summary>

<https://blastscan.io/token/0x1bb5e4dd6f18e8941fce273379df2223cd08c2da>

</details>

<details>

<summary>What are the tokenomics of $FLAPPY?</summary>

* 1M tokens at the [IBLV Event](https://docs.baseline.markets/launching#iblv---initial-baseline-value-event) and then an [Elastic Supply.](https://docs.baseline.markets/btokenomics/elastic_supply)&#x20;
* [Protocol-Owned Liquidity](https://docs.baseline.markets/btokenomics/dynamic_liquidity#protocol-owned-liquidity-positions) and Rug-Proof
* To Play the game players must hold a minimum of 2000 $FLAPPY at all times.
* To Start a game players must spend 10 $FLAPPY.
* In-built [Lending facility](https://docs.baseline.markets/utility/loops#leveraged-btoken-exposure) for access to non[-liquidatable loans](https://docs.baseline.markets/utility/loans#loan-fees--terms)

</details>

<details>

<summary>Gaming Fees</summary>

[LP fees](https://docs.baseline.markets/launching#liquidity-configuration) and Entrance Fees collected are auto-sent to the [Prize Fund Wallet.](/faqs/prize-fund-wallet)

The $FLAPPY [Afterburner](https://docs.baseline.markets/btokenomics/afterburner#the-baseline-afterburner) also automatically sends a portion of fees to the Prize Fund Wallet whenever it fires.

</details>

<details>

<summary>bETH (Baseline ETH)</summary>

Tokens such as $FLAPPY launched on the Baseline protocol are known as bTokens.

They are fully backed by ETH deposited by market buyers, who exchange ETH at a protocol-set premium in exchange for bTokens.

At the IBLV event of a bToken, a 'Baseline Value' or 'Minimum Price Floor' is discovered and once found, the Protocol will only ever issue bTokens at a premium to this Baseline Value.

This value is always denominated in ETH (the underlying collateral) and if the bToken ever drops to this price, the Protocol will ALWAYS have enough ETH to swap in exchange for the bToken.

In effect this means, bTokens like $FLAPPY are basically ETH with a minimum Floor!

</details>


# Prize Fund Wallet

Can you bankrupt the Prize Fund wallet?

The fees collected for the Prize Fund are utilized for payouts. The variable that determines the payout amount is the [distance travelled](/faqs/how-to-play#tap-to-fly-and-navigate-the-hardware-wallet-through-the-fud-filled-newspaper-articles-for-as-far-as) by the player.

Payouts made by the Prize Fund Wallet are managed by this [renounced Smart Contract.](/faqs/security#renounced-prize-fund-wallet)

<br>


# Revenue Generation

100% of revenue generated is automatically split and sent to the Prize Fund Wallet & the Marketing Wallet via renounced Smart Contract.

<details>

<summary>Add your own Skyline</summary>

1. Advertisers can design and upload their own background to our skyline.
2. It costs 0.3 ETH per upload.
3. Once a background is added to the library it is selected at random every time a new game starts.

</details>

<details>

<summary>Ad Banner Space</summary>

1. Advertisers can upload their banner + hyperlink here.
2. It costs 0.1 ETH per slot which increases by a factor of 0.1 if the advertiser books multiple back to back slots at once i.e.

0.1 + gas for 1 slot&#x20;

0.2 + gas for 2 back to back slots&#x20;

0.3 + gas for 3 back to back slots&#x20;

0.4 + gas for 4 back to back slots

3. Ads are added in a queue, with a new one displayed every time a new game starts.

**Disclaimer: We do not endorse nor vouch for any advertisements placed here. Always check links and verify everything. Assume everything is a scam until proven otherwise.**

</details>


# Security

Don't trust, Verify. Everything.

<details>

<summary>Renounced Token Contract</summary>

<https://blastscan.io/address/0x1bb5e4dd6f18e8941fce273379df2223cd08c2da>

</details>

<details>

<summary>Renounced Prize Fund Wallet Contract</summary>

<https://blastscan.io/address/0x4bf7A47F26F0dEc3fBff23CA3a6AC7E99023F4d5>

</details>

<details>

<summary>$FLAPPY Afterburner Contract</summary>

<https://blastscan.io/address/0x1e85f278dd26734c94fede99e198bfe65eb50532>

</details>


# Links

Stay up to date with the latest from us!

**Devsbased Labs:** <https://devsbased.com>

**FlappyETH:** <https://flappyeth.com>

**Devsbased Labs on X:** <https://x.com/devsbased>

**FlappyETH on X:** <https://x.com/playflappyeth>&#x20;

**Devsbased Labs on Mirror:** <https://mirror.xyz/0x766E8305F815C68e025339dAC9Ac4229EA3F4D67>

**Devving Devs on Opensea:** <https://opensea.io/collection/the-devving-devs>&#x20;

**Flappyoor on Opensea:** <https://opensea.io/collection/flappyooor-og>

**Devsbased Discord:** <https://discord.com/invite/unqtrZheUW>

**FlappyETH Telegram:** <https://t.me/playflappyeth>


# Architecture

Describes the overall technical components. Dev is devving.

<figure><img src="https://10533442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFC0ZUtHc668hpnYTUQBz%2Fuploads%2FkfPC5pMXH8km3Jq7Sobh%2Fmermaid-diagram-2023-09-07-161232.png?alt=media&amp;token=f37c238a-9a72-4258-8f35-acde322b3b2d" alt="" width="563"><figcaption><p>Basic interaction between components</p></figcaption></figure>

<details>

<summary>SmartContract(s)</summary>

### Token Contract

Manages the creation, distribution, and operations associated with the FLAPPY token.

**Functions**:

1. **mint()**:
   * Creates new tokens.
   * This function is usually reserved for specific circumstances or addresses.
2. **burn()**:
   * Destroys a specified amount of tokens, reducing the total supply.
3. **transfer()**:
   * Allows token holders to send tokens to other addresses.
4. **approve() and transferFrom()**:
   * Enables a third party (like the GameContract) to move a set number of tokens on behalf of a user, facilitating things like staking or in-game purchases.
5. **balanceOf()**:
   * Returns the token balance of a specific address.

### Game Contract

Manages the flow of ETH funds related to the game, including user deposits, payouts, and bet placements. It ensures the transparent, decentralized, and tamper-proof handling of the gaming economy.

#### Functions

**collectDeposits()**:

* Accepts ETH from users who wish to participate in a game round.
* Locks the funds until the game round's outcome is decided.

**payout()**:

* Calculates the amount of ETH to distribute to the winning parties based on the game's outcome.
* Sends the calculated ETH amounts to the respective winners.

**triggerPayouts()**:

* Initiates the payout process once the game outcome is decided and validated.

</details>

<details>

<summary>Server_FlappyChainProxy</summary>

Our Distributed Ledger Intermediary known as *Aquato.*

Aquato is as an intermediary between the blockchain and the game's frontend. It manages game mechanics, user profiles, and statistics, and acts as a cache for blockchain data to ensure the game runs smoothly without fetching data directly from the blockchain each time.

#### Functions

**manageUserProfiles()**:

* Registers new users and stores their basic profile information.
* Might include username, game history, total wins, and other game-specific statistics.

**serveUserStats()**:

* Retrieves a specific user's game statistics.
* Can be used by the FlappyUI to display player rankings, achievements, and other relevant stats.

**choosePlayer()**

* Randomly selects one player from the pool of depositors for the game round.
* Assigns all other depositors as observers.

**placeBet()**:

* Allows observers to place additional ETH as a bet on the outcome of the game.

**validateGameResult()**

* Accepts the game result from the GameClient.
* Verifies the authenticity and correctness of the game's outcome. This could involve checking against certain game rules, time constraints, and maybe even certain anti-cheat mechanisms.

**calculatePayouts()**:

* Determines the amount of ETH each participant (player and observers) should receive based on the game's outcome and any placed bets.

**triggerPayouts()**:

* Initiates the payout process once the game outcome is decided and validated.
* Calculates the amount of ETH to distribute to the winning parties based on the game's outcome.

**pullBlockchainData()** (implicit function):

* Periodically fetches data from the SmartContract. This includes user deposits, bet amounts, and payout history.
* This data can be cached to serve frequent requests without interacting directly with the blockchain, thereby saving on gas costs and improving user experience.

**pushGameDataToBlockchain()** (implicit function):

* Sends game data or results that need to be recorded on the blockchain. This might involve creating a transaction.

***

#### Considerations:

**Reliability and Scalability**: Given its pivotal role, the server should be designed for high availability. This might involve distributed architectures, load balancers, and fault tolerance mechanisms.

**Security**: As an intermediary handling game results and interacting with the blockchain, it's a potential attack target. It's crucial to implement robust security measures, including data validation, DDoS protection, and regular vulnerability assessments.

**Latency**: Real-time or near-real-time games require low latency. The design should prioritize fast data retrieval and processing.

**Data Integrity**: The server should have mechanisms to ensure data integrity, especially when pulling from or pushing to the blockchain. Any discrepancies could lead to financial discrepancies given the ETH payouts.

**Privacy**: User data should be stored and transmitted securely. Ensure GDPR or relevant data protection compliance.

Given the pivotal role of **FlappyChainProxy**, it's essential to ensure it's designed robustly and securely. Given its interactions with the blockchain and its role in game mechanics, it's the heart of the system.

</details>

<details>

<summary>GameServer</summary>

Our games server known as *KlonoArai* serves as the central authority for our online games, managing game state, player interactions, facilitating authentication, communication with SmartContract(s) and synchronisation with clients (players and observers). *KlonoArai* is accountable to an immutable ledger, an intricately designed hash chain data structure engineered to uphold cryptographic security.

`Don't stress yourself, don't guess.`

### KlonoArai overview

#### Security

KlonoArai employs security measures to prevent cheating, hacking, or unauthorised access to the game. Like really encryption, anti-cheat systems and vOrnitier, an immutable, auditable, and cryptographically secured permanent ledger.

#### Centralized Gameplay Logic:

KlonoArai hosts the core gameplay logic, rules and state. This includes managing game mechanics, tracking player scores, positions, events and enforcing rule to ensure fair play.

#### Player Interaction

Individual player devices connect to the gamer server to participate in the game. Each client communicates with the server to send and receive game data, which is then logged to vOrnitier.

#### Synchronisation

KlonoArai plays a critical role in ensuring that all players' actions are synchronised. It receives input from each client, processes it, and then broadcasts the results to all connected clients. This synchronisation ensures that all players experience the same game world and events.

#### Real-time Communication:

KlonoArai uses real-time communication protocols to minimise latency and provide a responsive gaming experience and maintain fairness.

#### Scalability

KlonoArai is being built to handle multiple concurrent connections. As more players and observers join a game, it can scale its resources or use load balancing techniques to distribute the workload across multiple servers.

#### Player Management

KlonoArai manages player accounts, and facilitates authentication, and authorisation. It ensures that only authorised players can access the game and that their progress is tracked accurately.

#### Data Storage

KlonoArai uses a distributed high availability database, data is encrypted at rest and in transit. Every data access is written to vOrnitier.

### Integration with the SmartContract(s)

All communication with SmartContract(s) is done out of bounds.

`Chill out, no need to break a sweat, and definitely don't play the guessing game!`

</details>


# Testnet Addresses

Ethereum Sepolia Testnet is used! https\://sepolia.etherscan.io

### Token Deployer: 0x554fb2997702ff644bd59aef0cdff267f0dfca7b

Deploys the token contract & receives the minted $FLAPPY

### Marketing Wallet: 0x31ccde13feab98fa13915a99a175a863f8f71cc1

Receives the fees

### Price Fund Wallet: 0xa6ee941b74bfab32d1c418e1cd09b74322a927ab

Manages the payouts based on game results


