Inspiration

We understand that there exists industry standard software such as NoSQL allowing for "horizontal" scaling for databases. However, in a system where bandwidth is precious (owing the TikTok's international reach), we have decided to come up with a novel solution for a distributed database, using a weighted network of nodes which work to verify transactions and solve conflicts.

What it does

Nodes are grouped into differing weights. A lower weight indicates a higher stability, so nodes will propose verified transactions towards other nodes with one lower weight. When the node with a lower weight rejects the proposed transaction, the node which proposed it will re-sync using our sophisticated algorithm to reduce networking costs.

How we built it

We used flask to prove the effectiveness of our concept. There are routes for "/transact" and "/query" implemented with HTTP to allow for interaction. For cryptography, we used ECDSA and SECP256k1 in python, where our command line interface allows users to generate key pairs and requires them to authorise transactions using their key pair.

Challenges we ran into

We were initially unsure of how to proceed with making a distributed system with different code running on each machine. However, we were able to sort out a detailed API with HTTP routes and wisely allocated roles for the hackathon, which allowed us to finish this project to our satisfaction.

Accomplishments that we're proud of

We believe that this system we have made is able to query and transact quickly and with a low chance of failure, double spending, etc. due to how it has been structured. We were able to build an asynchronous yet secure system between machines, although this was only our first time working with distributed systems.

What we learned

We learnt the importance of a well documented system to build a system with many moving components as well as many complex machines involved. There has to be trust that every component is playing its part correctly and safely, to ensure the security of the entire system.

What's next for T Pay

We plan to rebuild it with a faster framework, such as Rocket.rs. Based on industrial needs, we also look forward to incorporating cryptographic algorithms to increase its security and robustness.

Built With

Share this project:

Updates