What inspired me to build bTree.
I conduct research using economic experiments, decentralized blockchains, and am very interested in open science, citizen science, and how the internet connects us all. The ability to do economics experiments, pioneered by Vernon Smith and many others, has turned economics into an actual science. The next step for economic science is to embrace the open science model by using the blockchain to provide an immutable and transparent research record. bTree promises to enable both professional economists and citizen scientists to thrive in a global community that values open and responsible science, while giving credit to those who contribute.
How I built bTree:
For this competition, I used Bolt.new to provide a low-code version of bTree. bTree is a modern web application designed for conducting experimental economics research with blockchain-based incentives. It allows researchers to create, manage, and analyze economic experiments, with real monetary rewards distributed automatically via the Algorand network.
Challenges I ran into
I had four significant challenges. These challenges were due to my limited knowledge of web apps in general and JavaScript in particular. As a consequence, I had to rely on the low-code features of Bolt and was unable to offer solutions on my own.
First, interfacing the Algorand SDK with the Perra Wallet. Even with the Algorand template, it took me a considerable amount of time to get the Pera Wallet to connect an Algorand account to bTree, and then a considerable amount of time to get bTree to build a proper Pay Transaction. My last step is to get Pera Wallet to sign the transaction. I'm still working on this.
Second, the project got very large over time, leading to Bolt warnings. I heeded some of the advice, but not all of it, and started burning through tokens at a very rapid pace. I will look into refactoring the code with an eye to better modular design and hooks for independent testing.
Third, I learned late in the game that I would need a hosted backend server. While the code works fine locally using a local host connection, it needs to be tested with a hosted server. I am still working on this.
Fourth, I waited too long to check the requirements of the hackathon and the need to post a YouTube video. I had to learn how to use Camtasia, produce the video, and get it on YouTube. I learned a lot, but I will have to improve the current video and add videos later on.
Accomplishments that I'm proud of
Here's what makes bTree a great Tool
Experiment Creation and Management:
Researchers can design and configure various economic experiments, including Trust Games, Public Goods Games, planned Auction Mechanisms, and Market Simulations. The platform provides a step-by-step creator with customizable parameters and auto-generated instructions.
Real-time Participant Interaction:
bTree utilizes WebSockets to facilitate real-time communication and synchronization among participants. It supports multi-tab testing, allowing a single user to simulate multiple participants with the same wallet address, each receiving a unique session ID and role.
Blockchain Integration:
Built on the Algorand network, bTree facilitates automated payments and rewards to participants' wallets. It integrates with Pera Wallet for seamless connection and transaction signing. But this is still a work in progress.
Automated Payment System:
A robust payment system handles bulk payment transactions, tracks individual payment statuses, and provides retry mechanisms for failed transactions. Results can be exported in CSV format for record-keeping.
Researcher Dashboard:
The dashboard offers live experiment monitoring, real-time participant tracking, and analytics for experiment results.
Comprehensive Documentation:
Detailed guides are available for running experiments, making new experiments, and troubleshooting common issues.
Secure and Transparent:
All transactions are recorded on the Algorand blockchain, ensuring transparency. The platform emphasizes wallet security, data privacy, and session isolation. Flexible Network Configuration: Supports both Algorand TestNet (for development and testing) and MainNet (for real monetary value experiments).
Current Status:
bTree currently features a fully implemented Trust Game with real-time synchronization and automated payment processing. It provides a solid foundation for future expansion into other experiments, offering a robust and transparent platform for experimental economics research.
What I've learned
So many things.
First, was how to work with Bolt. I now have a better understanding of how Bolt works and its limitations. Given this solid base, in the future, with more time, I will dedicate more time to design, including architecture, modularity, and establish clear milestones. This will help identify potential problems earlier and develop small test projects to gain a deeper understanding of the issue.
Second, I am beginning to understand TypeScript and how to use npm to better advantage. This will help me audit what Bolt is doing and offer more helpful suggestions.
Third, I am beginning to understand how the Algorand blockchain works and how to use it to full advantage. I now have many ideas on how to integrate Algorand wth bTree more fully.
Fourth, I am beginning to appreciate what a complete professional app looks like. This will help me develop more effective economic apps in the future.
Fifth, I discovered that I enjoy hackathons. What a great way to try a novel idea very quickly with minimal risk. In the future, I plan to start earlier and fully utilize the hackathon tools and community.
What's next for bTree
Next steps, not necessarily in priority order, are as follows:
- Set up the payment system.
- Set up a hosted server.
- Set up a database server to hold experimental data and designs.
- Refactor for modularity.
- Add more example experiments and refactor instructions. My goal is to make it possible for an experimental economist using Bolt to build an experiment in one-tenth of the time it currently takes, without incurring professional programming expenses.
- Test that subjects can run on different devices, including mobile phones.
- Start working on ways to make bTree more visible with an easy onboarding process to get people started using it right away.
- Begin exploring ways to establish an international community around mTree, fostering cooperative ventures in designing, building, and conducting experiments.
- Begin exploring ways that citizen scientists can help contribute to and learn more about economics research.
- Explore how the experimenter front-end can integrate with other experimenter platforms like zTree, oTree, and mTree.
- Improve the use of Algorand features on bTree to allow the following:
a. Develop more effective tools for creating and managing subject pools.
b. Register experiments on the blockchain.
c. Have subjects sign informed consent.
d. Register experimental data on the blockchain. e. Register experimenters' notebook entries on the blockchain. f. Provide a mechanism for on-chain governance of the bTree system. g. Allow bTree to interface with Algorand 'smart' contracts to run experiments where the institutions/'smart' contracts are on-chain.
Built With
- algorand-sdk
- bolt.new
- express.js
- framer
- framer-motion
- frontend:-react-18
- node.js
- perawallet
- react-18
- react-router.-backend:-node.js
- socket.io
- socket.io.-blockchain:-algorand-sdk
- tailwind
- tailwind-css
- typescript
- vite
Log in or sign up for Devpost to join the conversation.