We believe that the best way to push web3 and DeFi is to embed it into people’s habits and pain points to completely change their IRL experiences and turn those pain points into opportunities. We dreamed of making Lima commuters be able to see when the next bus was coming. We now show more than 1K buses GPS real time data. We dreamed of people paying for public transportation with their phones, banks met with us and tried to talk us out of it, we now make it possible in 500 buses. We now want to make public transportation free and believe this will drive it. That goal is what’s pushing us.

What it does

We allow users to pay public transportation rides with Crypto & also allow them to earn $BUS tokens on every ride

How we built it

We knew that user experience was going to be key in order to drive user adoption between commuters so we started thinking about the simplest and most seamless way for our users to add money to their TuBoleto balance and pay for their bus ride. And also, all of this had to be done without changing the current fare model (which is distance based) and without significant infrastructure investment so the bus companies here in Lima would be on board. We needed to identify the specific bus vehicle the user is using without deploying complex in-bus devices and without requiring the user to own the latest high-end smartphone. So we used in-bus QR codes. For the distance based fare model we decided to use the user’s GPS, other sensors and machine learning to identify where the user got on the bus and where he got off. This would reduce user input and so achieve an easier experience as the only things required to ride the bus was to have enough balance and read the QR code. For the part of adding balance we needed to be compatible with the non-crypto wallets that already have widespread use here in Lima but also start with our plan of driving crypto adoption in order to later be able to grow an economy sustainable enough to make public transport free with our $BUS Token. We believe tapping into the Polygon ecosystem is a fantastic fit. On top of having almost non-existent transaction fees -key for micropayments- we are very excited that Polygon has more than +19K dapps which we believe is key to offer more and more value to our Crypto commuters. We think the user should start with public transit and continue into many more verticals, and our BUS token rewards will come in handy for that. In the technical part we knew our target market device of preference was android and we also had a lot of experience building for it (we build TuRuta, now +600K registered users, after all) but we didn’t want to rule out the possibility of expanding to IOS in the mid-term and try to reduce the effort on that part. We did our fair amount of research on hybrid frameworks and built some prototypes before using flutter. So we decided to use flutter for building the UI. We had to build a static website to handle the connection with the wallets, we deployed this with Spheron (with Filecoin). Regarding the database for storing the TuBoleto trips that are ready to be awarded BUS tokens we use Firestore and the UX/UI as you can imagine is all Flutter. For the BUS token smart contract we used an OpenZeppelin preset contract because it had the features we needed and OpenZeppelin provides battle-tested code. As that was the only Smart Contract we didn’t use hardhat this time and we deployed the BUS token using Remix and verified the code on polygon scan using the output from the flattener extension. For minting and awarding the tokens we built some code in typescript scheduled to run on a daily basis using Cloud Functions.

Challenges we ran into

The main challenge we ran into was the fact (we came to realize) that many android device manufacturers don’t closely follow the official android APIs and OS processes policies. This caused TuBoleto to behave differently on many devices, having issues ranging from sensor information (GPS) and activity recognition APIs being very inaccurate to our app being suddenly killed by the OS. We had to add some manufacturer-specific patches that helped in many cases. We also had to increase the user input in situations where we require it & on the devices we need to. We are continuously improving in this area. Another issue happened during our tests on the Mumbai Testnet; the mint-and-transfer transaction took an average of 10 minutes (ranging from 15 seconds to 20 minutes) so our usual stack of having a 1st generation Google Cloud Function with a time limit of 9 minutes wasn’t enough this time. We had to add a 2nd gen Cloud Function (which has a time limit of 60 minutes) to handle the minting.

Accomplishments that we're proud of

Around 500 buses are already connected, we have made a partnership with Mercedes Benz Peru and we have 4X our number of transactions in the last 8 months with only around $500 invested in acquisition. We are also proud of organically appearing on the news and having banks and other financial institutions now being the ones calling us now.

What we learned

We learnt a lot of things: Automatic detection of where the user got off the bus is not going to be perfect from day one but with some fine tuning it can be good enough with some manual user input and some random inspections (from our human personnel) to detect and prevent cheating. This is closely monitored and the model is getting better and better. Based on talking to our users we have learnt that needing to memorize the 12 words to prevent losing their funds is a big ask, and many times a no-go, as they are used to passwords. We will explore more to understand which solutions could reduce this high friction point. We learned that the Mumbai Testnet transaction times are very irregular and it is very important to have this in mind for the user. Thankfully we do lots of outreach and have a Whatsapp line where we offer support so we’ll be ready to help them with any issues and be ready for when we hit mainnet. Many of our users are open and enthusiastic about DeFi and Web3 although it’s important to know that when we interview them about it we don’t necessarily refer to it as Web3 but at the functionalities. We focus on understanding their current problems and needs. We then validate with them if the effort required from them is feasible for them and we validate that the solutions we propose actually solve their problems. This gives us many lessons, like the fact that Polygon tiny fees are crucial for this and makes it better not only than using Ethereum or other chains but even makes it cheaper than some bank transactions.

What's next for TuBoleto - Pay the bus with Crypto & earn Token on each ride!

This is our first iteration to make public transit free by using Web3, we like the fact we inject liquidity from advertisers to ensure real locked up value for our token to reduce the chances of creating bad incentives for inflation to ocurr and harm the user and for us this is just the begining. There are 3 things we are looking forward to, (i) testing to ensure our step into mainnet goes great (ii) keep in contact with our users to give better the wallet creation onboarding experience as the current one has too much friction for the most users we have spoken to and (iii) we want to widen the access to more DeFi tools for our users inside TuBoleto by tapping into the vast Polygon dApp ecosystem , for us this is just a first step towards changing the daily lives of the average person and we believe web 3 can unlock making public transit free and much more.

Built With

Share this project: