Friday, July 21, 2023

Rust pop-quiz: BUIDL a FIN trading system

#Rust pop-quiz, ... this is more like: #Rust build-a-system.

You have ./buy: https://github.com/logicalgraphs/crypto-n-rust/blob/main/src/ch09/burn/buy/buy.rs

and ./sell: https://github.com/logicalgraphs/crypto-n-rust/blob/main/src/ch09/burn/sell/sell.rs

BUIDL a system that does this:

./trade 1 "wBTC,axlUSDC,USK,MNTA,wBTC" [order book dir]

and replies with the set of trades and result.

Hint


There is a wBTC_axlUSDC order book, but there is no USK_MNTA order book.

How do you know what order books you have? Or: how do you know how to assemble a trade though various order books from start to finish?

This sounds like a #Rust pop quiz.

Rust pop-quiz! 


(You probably want to do this one ... FRIST!) #FRIST

Say you want to arb $USK using $wBTC, ... 'cuz you EDGY! 😱

Given the order books reposed here.


and the arb-path: "USK,wBTC,axlUSDC,wBTC,USK"

Return the order book file names needed.


Rust pop-quiz 


(you'll want to do this SECNOD!) #SECNOD

Give the order books needed (PT) and the trade-path, e.g.: "USK,wBTC,axlUSDC,wBTC,USK" write ./assemblage which outputs

  • SELL 0.01 wBTC @ 25296.05 on wBTC/USK for 252.8 USK
  • BUY 252.8 USK @ 0.9800 on axlUSDC/USK for ...

No comments:

Post a Comment