# Ride the Bus

(on the blockchain)

### Prepare for an unforgettable blockchain-powered journey that will push your luck to the limit!

Welcome to *Ride the Bus* – the game where each level unlocks new challenges and rewards, all on the decentralized Base blockchain.

Brace yourself for a dynamic adventure where every decision counts, guided by provably fair and tamper-proof randomness provided by [Chainlink VRF](https://docs.chain.link/vrf) (Verifiable Random Function).

Let the magic of VRF unveil the mysterious paths that shape your destiny. It's time to embark on an exhilarating journey where the road ahead is as unpredictable as it is thrilling!

<figure><img src="https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2Fypke43J4WdEuhlDuLEV1%2Fbus1.png?alt=media&amp;token=ff290753-30a4-4184-9f9b-f791101e5a40" alt=""><figcaption><p>How far can you Ride the Bus?</p></figcaption></figure>


# The Game

Guide on how to Ride the Bus

{% hint style="info" %}
**Docs in progress:** These docs are a work in progress. If you notice discrepancies, please let us know! 🙏

The [contracts](/project-tokens/contract-addresses) are the source of truth.
{% endhint %}

## Overview

Step into a futuristic world where the road ahead is paved with ever-increasing difficulty. Brace yourself as you navigate through a series of mind-bending obstacles and treacherous terrains!

Each level presents a unique set of arduous challenges meticulously designed to test your patience and luck.

Strap your seatbelts and let the power of [Chainlink VRF](https://docs.chain.link/vrf) (Verifiable Random Function) fuel an unparalleled gaming experience!

![A Bus getting ready to leave the Station](https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2FtjYckzJCt5fd88diVFEx%2Fda_op_bus_leaving_the_station_cyberpunk_neon_colors_acid_trip_c204bb61-4c76-4b9c-9d2d-9a0eed056f47.png?alt=media\&token=d68bc885-b874-48d6-9110-a84636ada552)

{% hint style="success" %}
**The Goal:** **See how far you can ride the bus**
{% endhint %}

## Gameplay

1 *Bus Ticket* grants you passage on the route of your choice.

When buses depart, only one route will make it to the final destination, the rest will crash!

If you survive, you can keep riding. If you don't make the journey, you have to start over.

#### Every level is 1 route harder than the last

For each level you survive your journey, the path only gets more treacherous and harder to pick the surviving route.

To illustrate,

Level 1 -- 2 paths

Level 2 -- 3 paths

Level 3 -- 4 paths

...

...

Level 10 -- 11 paths

...

Level 20 -- 21 paths!

So while for level one, you have a 50% chance at survival, the odds of surviving level 20 are just under 5%!

### Calling the Round

After 6 hours, anyone can call the round. Just pull the cord!

### Advancing

Once the round is ended, [Chainlink VRF](https://docs.chain.link/vrf) calls the protocol to determine the winning paths.

In order to avoid potential Base block reorgs, the protocol waits for the buses to drive for 20 blocks before determining the winning route.

A different winning route is determined per each level.

If your ticket stub verifies you had a seat on the winning route, you have 2 options:

* Level up - let it ride! Receive a *Bus Ticket* good for a seat on the next level
* Cash out - hop off the bus! Bail and take some cash
  * Split a 50% share of that level's ETH stored
    * There can be 1 or more users choosing to cash out in the 6 hour round
    * If no one cashes out the pool for the round keeps growing
  * 35% remains in the level for the next round to continue the gameplay
  * 10% goes to protocol treasury
  * 5% goes to protocol dev

{% hint style="warning" %}
The treasury and dev **ONLY** take a share of protocol rewards when people **WIN** the game!
{% endhint %}

### Unlocking more levels

There is always a 2 level buffer

Every round is composed of levels.

There is a maximum amount of levels, based on how far the furthest user has reached.

When someone reaches a new highest level, the maximum amount of levels increases by one.

There is a 2 level buffer between unlocked - there will always be 2 levels seeded.

### When does it end?

The buses never stop driving their routes as long as the blockchain is online!

Once the game starts, it never stops.

* The ETH is locked in the contract until passengers can ride the bus to that level
* The owner of the contracts is unable to remove these funds

Functions in the game are public and callable by anyone to ensure the protocol runs continuously.

Anyone can top up the Chainlink VRF Subscription


# Rounds

{% hint style="warning" %}
Get ready to make crucial decisions that will determine your fate as you navigate through an ever-expanding web of routes and possibilities!
{% endhint %}

## Overview

* Rounds can last 2 to 6 hours
  * At the start, to encourage faster gameplay, rounds will be shorter.
  * Over time, as more users are joining, the round length will increase
* Once the round timer ends, anyone can call the round. The protocol will call the round eventually if no one else does.
* Once the round ends, boarding is closed and the busses are off to their final destinations!
* [Chainlink VRF](https://docs.chain.link/vrf) determines the surviving buses.
* The next round starts as soon as anyone boards a bus.

<figure><img src="https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2F8DBUXONOOmAgXYJXGeIE%2Fclocktower.png?alt=media&amp;token=d190b628-7125-4ea9-8b65-1823b4ff4b85" alt=""><figcaption><p>Buses leave the Station ever 6 hours.</p></figcaption></figure>


# Levels

{% hint style="info" %}
Get ready to make crucial decisions that will determine your fate as you navigate through an ever-expanding web of routes and possibilities.
{% endhint %}

## Overview

Every round is composed of levels.

There is a maximum amount of levels, based on how far the furthest user has reached.

## Unlocking more levels

An *active* level is one that can receive a distribution of Bus Ticket revenue.

An *unlocked* level is one that any player has reached in the game.

The game starts with 3 levels unlocked.

There is a 2 level buffer between unlocked and active.

* Thus, there will always be 2 levels generating rewards *just out of reach* for the current round.

When anyone reaches a new high level in the game, the maximum amount of levels increases by one.

* When Alice buys a Bus Ticket, rewards are distributed to levels 1 - 5
* If Alice reaches level 3, she *unlocks* level 4 and *activates* level 6
* Now, Bob has to reach level 4 in order to *activate* level 7

## Bus Ticket revenue distribution

2% of the *Bus Ticket* purchase price goes to the *Last Chance Raffle*

98% of the *Bus Ticket* purchase price, the remaining, is distributed exponentially across *active* levels

For example, if there are 5 active levels, the distribution table would look like:

* Level 1: `1^2 / (1^2 + 2^2 + 3^2 + 4^2 + 5^2) == 1/55  == 0.0181 == ~1.8%`
* Level 2: `2^2 / (1^2 + 2^2 + 3^2 + 4^2 + 5^2) == 4/55  == 0.0726 == ~7.3%`
* Level 3: `3^2 / (1^2 + 2^2 + 3^2 + 4^2 + 5^2) == 9/55  == 0.1636 == ~16.4%`
* Level 4: `4^2 / (1^2 + 2^2 + 3^2 + 4^2 + 5^2) == 16/55 == 0.2909 == ~29.1%`
* Level 5: `5^2 / (1^2 + 2^2 + 3^2 + 4^2 + 5^2) == 25/55 == 0.4545 == ~45.5%`

Now, Carol buys 1 *Bus Ticket* for 0.002 ETH:

<table><thead><tr><th width="185">Level</th><th width="183.33333333333331">Distribution %</th><th>Rewards distributed per Level</th></tr></thead><tbody><tr><td>1</td><td>1.8%</td><td>0.000036 ETH (~$0.09)</td></tr><tr><td>2</td><td>7.3%</td><td>0.000146 ETH (~$0.365)</td></tr><tr><td>3</td><td>16.4%</td><td>0.000328 ETH (~$0.82)</td></tr><tr><td>4</td><td>29.1%</td><td>0.00058 ETH (~$1.45)</td></tr><tr><td>5</td><td>45.5%</td><td>0.00091 ETH (~$2.275)</td></tr></tbody></table>

> Illustrated above, we can see that the later levels receive a higher weighted distribution. This incentivizes future gameplay by increasing the rewards for users who reach the higher levels first.

As levels get unlocked and activated, the rewards will distribute accordingly.

<figure><img src="https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2FrgsDFciqvM4J7Jvk976i%2Froutes.png?alt=media&amp;token=cbb5fe8c-4a19-4aa7-801e-7d6cdd008296" alt=""><figcaption><p>Buses departing the Station. Each bus takes a different path. Only one can survive the journey.</p></figcaption></figure>


# Paths

{% hint style="info" %}
**Tip:** The amount of paths per level is always the `level + 1`
{% endhint %}

## Overview

Each level has several paths. When you ride, you try to pick the winning path

> Only one path can win per level per round!

The amount of paths in a level is always the level number plus one

* ie. 2 paths in Level 1
* ie. 3 paths in Level 2
* ie. 8 paths in Level 7

Thus, the odds of choosing the correct route decrease each level.

* ie. 50% chance of picking correct route in Level 1
* ie. 33% chance of picking correct route in Level 2
* ie. 25% chance of picking correct route in Level 3

Choose wisely, and make it to your destination. Fail, and your bus will crash!

<figure><img src="https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2FimTmGsVsx5Ba322ANOES%2Froad.png?alt=media&amp;token=c27a5336-3a56-4e44-8101-4dda6cc8d7bc" alt=""><figcaption><p>Buckle up and hope the bus doesn't break down!</p></figcaption></figure>


# The Station

## Overview

The *Station* manages the protocol and is responsible for distributing *Bus Tickets* and *Ticket Stubs*.&#x20;

Visit the *Station* to buy a *Bus Ticket* or to redeem your *Bus Ticket* for a seat on a bus!

![Passengers getting ready to board.](https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2Ffs6Na3U6YjTGLkAZKax7%2Fstation12.png?alt=media\&token=54a4436b-2c4b-4cde-8929-387599fd731f)


# Street Squad

Bus Ticket Affiliate Program

## Refer and earn

Share Ride the Bus and earn ETH!

We want to grow organically, and you can help us do that by joining our Street Squad. Street Squad members earn 5% of all Bus Ticket sales to every user you refer - forever!

All referrals are stored onchain, so you can see in real time who is using your affiliate link!

### Details

* It's free to join, aside from the nominal gas it costs to do so.
* Visit the [Referrals page](https://www.ridethebus.xyz/referrals), and generate your unique referral link.
* Any user who visits the site and purchases via your unique link is automatically associated with your address, onchain.
* For every *Bus Ticket* they purchase, you will receive 5% of sales (0.0001 ETH)
* You can claim your affiliate rewards at any time.
* Once a user buys a *Bus Ticket,* they can no longer be added as a referral - it's only the first purchase that counts! If a user buys without using an affiliate link, their 5% is sent to the protocol.
  * The first *Bus Ticket* bought must invoke the `purchaseTicketWithAffiliate` method! Our frontend handles this automatically.
* If rewards are unclaimed, after 180 days since your last referral, anyone can send these rewards to the *Treasury* so that they can be injected back into the protocol.

<figure><img src="https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2FlE3OOQHMq55fGcMNoi0P%2F0x_rider_lots_of_people_riding_on_a_bus_talking_neon_colors_c4262ca0-daf8-4f4b-bcc1-556fce2cabbb.png?alt=media&amp;token=56c56e6d-53e3-4400-a859-1f6568961c83" alt=""><figcaption><p>Riding the Bus is better with frens</p></figcaption></figure>


# Hitchhiker's Last Chance

aka Hitchhiker's Last Chance

## End of the road

Your bus has crashed. You have lost your luggage. You have one last chance to find your way back to civilization.

So you thumb it! 👍

All losing *Ticket Stubs* are eligible to enter the *Last Chance Raffle.*

### Raffle Details

* One winner daily.
* A portion (max 2%) of all *Bus Ticket* purchases for the day are used to fund the raffle.
  * If the daily 2% grows to a considerable size it may be broken out into smaller raffles or other loser games

<figure><img src="https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2FibTXfFuFRARkIELLEgRA%2Fsilhouette.png?alt=media&amp;token=a7f45a14-5439-4c65-b792-41b4a64c39ae" alt=""><figcaption><p>Bob's bus crashed so he tries to hitchhike the rest of his way. </p></figcaption></figure>


# Bus Staking Pool

## Protocol earned rewards

When people play the game, advance rounds, and take winnings, the protocol treasury generates a percentage of rewards.

These funds are distributed to [*Bus*](/project-tokens/bus) holders in various ways:&#x20;

* The first of which, and most common, is the *Bus Staking Pool,* only available to bus owners.
  * A *Bus* owner can own and stake multiple *Busses*

{% hint style="warning" %}
Bus Staking Pool will not be deployed until the [Buses are minted](https://docs.ridethebus.xyz/project-tokens/bus#initial-mint).
{% endhint %}

<figure><img src="https://700087270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ymDpMbUGXY5Q7DDOg58%2Fuploads%2FRJJuZ9CvhgGfmmx8fHiE%2Fbuses-stacked.png?alt=media&amp;token=8093c26b-6e2e-4ec2-bb7b-b2eff74c09d9" alt=""><figcaption><p>Buses being staked.</p></figcaption></figure>


# Bus Ticket

ERC1155 NFT

{% embed url="<https://basescan.org/>" %}
Bus Token Contract (Updated after launch!)
{% endembed %}

### Level 1 Tickets

* The only way to buy a bus ticket (aside from secondary markets like OpenSea), is the *Station*™️
  * The only tickets for sale by the *Station* are *Level One* tickets
* *Bus Tickets* cost 0.002 ETH (\~$5) each
* A *Bus Ticket* gives you the option to board a bus. Once you board the bus, your *Bus Ticket* is burned in exchange for a *Ticket Stub*
  * Thus, the supply of *Bus Tickets*, per level is always fluctuating

### Level 2 Tickets and beyond

At the moment, the only way to earn a *Bus Ticket* higher than Level 1 is to play the game, or visit secondary marketplaces.

We are exploring the idea of building our own marketplace, but at the moment, OpenSea and others are sufficient until our community grows large enough.

### Purchase price distribution

98% of the purchase price of a *Bus Ticket* is distributed into levels in the game via the protocol.

2% of the price goes towards the daily [Last Chance Raffle](/protocol-categories/hitchhikers-last-chance)

* If the 2% daily grows to a considerable size it could be broken out into smaller raffles or incentives


# Ticket Stub

ERC721 NFT

### Details

* When you board a bus, you go through the process of:
  * Choosing a route&#x20;
  * Burning a *Bus Ticket*
  * Receiving a *Ticket Stub* with verification of your seat on the bus

{% hint style="danger" %}
Do not lose your *Stub*! It is proof that you were a passenger on a winning route.
{% endhint %}

### Choosing a route

* Each level has `level + 1 routes`&#x20;
* For example:
  * Level 1 has 2 routes
  * Level 2 has 3 routes
  * ..
  * Level 4 has 5 routes...

Only one route can survive each round!

#### ---After the Round---

### Claiming a stub

You survived your journey! Congrats.&#x20;

You now have two options:

1. Pick a route on the next level and keep riding.
2. Bail and snag some cash on your way off the bus.

### Last Chance Raffle

Your bus did not make it 😭

* You have one last hope: Try your luck in the *Last Chance Raffle*

###


# Bus

ERC721 NFT

### Tokenized Transit Union

Owning a *Bus* gives you exclusive membership into the **Tokenized Transit Union**, an alliance of bus owners who must ardue the treacherous conditions, put their drivers and heavy duty machinery in harms way, to transport our degen passengers.

> Protocol generated rewards go towards enhancing this alliance, in multiple forms.

* The first of which, and most common, is the [Bus Staking Pool](/protocol-categories/bus-staking-pool)*,* only available to *Bus* owners.
  * A *Bus* owner can own and stake multiple buses

> The *Bus* NFT derives its value from the health of the protocol. Directly correlated to the popularity of riding the bus, it has real utility that can be viewed and tracked on chain.

### Initial Mint

*Buses* will be distributed to users of the protocol at a date to be determined.

Initially, we planned a presale. The presale didn't generate the hype we hoped for, so we will be retroactively distributing these!

We may or may not have a secondary sale beyond an initial airdrop.

{% hint style="warning" %}
Get involved to voice your opinion on how these should be distributed within our community!
{% endhint %}

If we do a sale, proceeds from Bus sales will go directly back into the protocol as incentives to seed higher levels in the game.

Rewards generated from users playing the game are distributed to *Bus* owners via the *Bus Staking Pool*.

Until Buses are created, rewards will be used for marketing to grow the protocol.

### Artwork

Read more about what went into making the collection [here](/team/the-art) or in our [blog](https://blog.ridethebus.xyz/beyond-tokens-exploring-the-artistry-of-bus-nfts-5615852742da).


# Contract Addresses

All contracts are verified on Basescan

{% hint style="info" %}
Contract address will be updated after deployment!
{% endhint %}

| Name               | Address                                    | Link                                                                      |
| ------------------ | ------------------------------------------ | ------------------------------------------------------------------------- |
| Bus                | TBD                                        | TBD                                                                       |
| Street Squad       | 0xff180984120655dA3481dc6985519EDCf3B238c6 | <https://basescan.org/address/0xff180984120655dA3481dc6985519EDCf3B238c6> |
| Bus Ticket         | 0xdF82AD65Ac5c179a35d16c5947f2F74217e7d1A7 | <https://basescan.org/address/0xdF82AD65Ac5c179a35d16c5947f2F74217e7d1A7> |
| Ticket Stub        | 0xd13a3923B85e00618ebe05dc0FA9fc39B883e77D | <https://basescan.org/address/0xff180984120655dA3481dc6985519EDCf3B238c6> |
| Station            | 0x452EEC3A065b8d97Ca88238146d977a9FD06EE53 | <https://basescan.org/address/0x452EEC3A065b8d97Ca88238146d977a9FD06EE53> |
| Last Chance Raffle | 0xB7f36575A70FB5f2909e13d15C065B02EC404d05 | <https://basescan.org/address/0xB7f36575A70FB5f2909e13d15C065B02EC404d05> |
| Bus Staking Pool   | TBD                                        | TBD                                                                       |
| Losers Router      | 0xD36d467c19f06BAFb1f5431518474FCB8d138535 | <https://basescan.org/address/0xD36d467c19f06BAFb1f5431518474FCB8d138535> |
| Bus Ticket Voucher | 0x479C86b7642989307CA3d7Bb83f967EB74fF50B9 | <https://basescan.org/address/0x479C86b7642989307CA3d7Bb83f967EB74fF50B9> |


# The Art

* Artwork for NFTs as well as on the site were all generated using [Midjourney](https://www.midjourney.com/) 5.1 and 5.2
* There were over 49 million prompts generated for bus NFTs
* Of these, \~20,000 were randomly selected to generate images
* Of which 8,888 were hand picked and made the cut!

Ride the Bus ❤️ AI


# About

{% hint style="info" %}
**Join us on our socials!**
{% endhint %}

## Availability

*Ride the Bus* is only available on Base.

## Audits

The project was initially audited by [bytes32](https://twitter.com/bytes032).

There have been some minor changes to the logic as we switched from using USDC to ETH as the protocol token. We thoroughly tested this change manually and with test coverage.

## History

The project was initially slated to launch on Polygon. We didn't generate as much hype as we hoped for on social media, so we pivoted and decided to move to Base in order to take advantage of the flourishing and fast growing userbase on Base!

At some point, we may go cross chain, but for now we are solely focused on Base.

### Modifications

The contracts are immutable aka non-upgradeable aka un-changeable. If bugs are found, they are there for all eternity.

### Team

Ride the bus was created by [0xRider](https://twitter.com/0_rider_x) with help from various internet frens.

### Contact

Find us on [X](https://x.com/0xRideTheBus) or [Discord](https://discord.gg/Hperrn7MD3) or [Telegram](https://t.me/Ride_The_Bus) or [Farcaster](https://warpcast.com/~/channel/ridethebus).


