Skip to content

BASTON02/Fintech_BAM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MSC-FINTECH---BAM---BRIDGE: Transfer capital at the point of sale across FIAT and Crypto for the best price guarenteed.

A repository containing all code and outputs related to the minimum viable product (MVP) for 'Bridge', a fictional Fintech start up. The business model consists of the following features:

  • Direct currency transfer at the point of purchase / sale
  • Efficient currency transfer that finds the best path to ensure the lowest rate during payment

It generates revenue through:

  • Arbitrage opportunities
  • 50% of the savings

General summary

  • Generally, the idea is that users (buyers and sellers) can pay and receive capital at the point of purchase in any currency that they desire.
  • This allows for crypto and fiat to interact directly.
  • Furthermore, due to the vast amount of currencies, there are many paths that can lead from currency A to B, in doing so, the offering finds the optimised path, ensuring the cheapest rate is always taken.
  • This saves money for the client. Furthermore, due to the many paths, arbitrage is theorised to exist. The arbitrage profits are added to the firms profits in the end.

Table of Contents


Overview

This project outlines the steps undertaken as part of this MVP. Several steps took place during development, those being.

  • Selection of scope of currencies
  • Selection of the path finding algorithm (Bellman-Ford)
  • Handling of negative cycles
  • Selecting shortest path
  • Deriving commission and savings earnings
  • Hook up front end using fastapi to react (input and output) Generally, the technical flow consists of the front end interface, written in React.js taking the inputs, feeding it into the backend Juypter notebook that performs the path optimisation. It then derives the rates charged given the fastest path and any arbitrage and returns the transfered rates to the front end in the desired currencies. It also summarises the cost savings and arbitrage earnings for the firm.

Project Structure

As for project structure, the most important files are:

  • Fintech MVP project - backend.ipynb: This is the complete backend that executes the path finding algorithm based on the input (desired currencies and amounts) and returns the outputs (converted amounts into currencies and the savings for the firm and customers).
  • App.tsx (found here:bridge-frontend/src): This is the complete front end of the MVP. The main parts are the input and output connections between the react interface and the back end script. However, it is also has the UI such as the buttons, design and logo to make it aestetically pleasing.

The other files are all supporting documents, mainly used to generate the front end such as the logo themselves and various other files automatically generated by codesandbox (the IDE used for the react interface).

Installation

Clone the repository

git clone https://github.com/your-username/your-repo.git] cd MSC-THESIS---BAM

Install dependencies

pip install -r requirements.txt

Usage

The project is written in both python and react.js. Juypter was used for the backend, while codesandbox was used as the ide to run the react.js script. In order to connect these two scripts, NGROK was used as a private url connection that streams the data transfer between both scripts to one another. This needs to be configured with a new key for every new session. To recreate the demo to have a working MVP, you will need to reinitialise the NGROK session and have your own NGROK account as this is user specific for the time being. Once that has been done, regenerate the API key, add it to the backend script and then freely play with the front end which should now process data in the backend and then display it in the UI.

Data

The project takes user input as the main data. It expects the user's to input the currency and amount as an input. Furthermore, then based on the user input, it will pull data using one or more of the api's at the backend to perform the path finding calculation. This calculation then provides the rates between the currencies and derives how much the transfer resulted in. Lastly, this is then displayed. Therefore the main data involved is based on the user prompt, with additional data coming from other free api's into exchanges.

Results

The outcome is the amount of the selected currency in your selected outcome currency. It therefore transfers the money from the buyers currency and amount, to the sellers currency and amount, no matter if its FIAT or Crypto. It does it in one step without further involvement from the user. As an intermediate outcome, the users, pre to clicking on the transfer button, will get a quote for the transfer. This will show the direct rate, as if no path finding takes place. This is the worst rate that they can get. The path finding algorithm will either choose the direct rate or a better rate. This has to be done to give an estimate prior to the transfer of how much they want to send. This cannot be done using the optimised rate as the optimised rate is hyper sensitive to market movements, so the quoted and actual rate would differ over a matter of seconds.

Contributing

This project is part of my Msc degree and is not open for external contributions. That said, please feel free to use the code and try to improve it. If it works, please reach out!

License

This work is released under an academic research license for non-commercial use.

Contact

Please contact me via BASTON02 as my github handle for any questions.

About

Bridge: Real time currency transaction across Fiat and Crypto at the points of sale, all done at a great rate using path finding optimisation!

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors