April 12, 2019

This is how I build a simple crypto exchange using AWS serverless and web3.js, does it look useful to you?

CodeRecipe.ai @coderecipe

I built this basic crypto exchange, like Coinbase, for buying and selling cryptocurrencies such as Ethereum. You can see the source code and demo in the post. Any feedback would be greatly appreciated!!



  1. 1

    I experienced some pretty painful response times doing a test. Is that the cold start effect? It's also not clear who would use such a crypto exchange, don't exchanges have to be highly centralized to get the best market rate? perhaps better to include more user walk-through scenarios so we get exactly what you're aiming at for this prototype and the full blown thing.

    Or is it more for in person fiat-2-crypto trades where using the wallet a lot gets tedious?

    1. 1

      Thanks for your feedback!
      response time: yes its the cold start and it is because I set this AutoPause: true and this SecondsUntilAutoPause: 300 :( (you can see the entire configuration in the source code). Those 2 combined means if there isn’t any activities going on after 5 mins, it will pause the unit altogether. Then it takes some time to boost it up again from 0 to anything greater than 0. It is a demo for everyone to access so I am a bit conservative here, I should have made it clear and I will add a note there in a moment. Apologize for the confusion. I believe if you are setting this up for production use, you can set the AutoPause to false then you wouldn’t see such problem.

      User scenarios:
      As is, it is more suitable for a many to one fiat-2-crypto trades where the seller/exchange manually set a price and the buyer buys it. Currently as a hack I put the price as an input on the buyer end, but I will change that later to make it more accurate. To make it a better exchange with price fluctuated automatically, I think we just need to add a price controller that listen to transactions and set price dynamically according to the volume and market price, which could be accomplished with additional lambdas? What do you think?

Recommended Posts