#Arbitrage Memoir
💰 I discovered an opportunity by chance, and I risk-free arbitraged 2 BTC by buying low and selling high within a month, which was worth about $120,000 at the time.
🧑💻 Next, I will share the process of discovering that opportunity, as well as the thought process and implementation code.

1️⃣ In January 2024, when the inscriptions were trading hot, besides inscriptions, I noticed another protocol, the Lightning Network Nostr. At that time, Nostr offered airdrops worth hundreds of USDT upon registration, which quickly became popular on Twitter. I participated with a small amount, and soon it multiplied several times.
2️⃣ Then, during the participation process, I noticed that there were buy orders with prices far exceeding the sell order prices in the order history. So, I tried to see if I could place a buy order with a price higher than the sell order, and it really worked. That is to say, there were such arbitrage opportunities in this trading market.
3️⃣ So I immediately researched the Nostr protocol and checked the official Lnfi documentation:
https://docs.lnfi.network/marketplace/marketplace-commands…
I found a unique way to interact with Nostr Relayer via WebSocket, sending and receiving messages. The order book information can be returned through the page API interface.
4️⃣ After completing the above research process, everything fell into place, so I tested a transaction and completed a trade directly through the Nostr protocol. Next comes the normal development process, where I crazily read order book data, detected low-priced sell orders or high-priced buy orders, and immediately completed the transaction via the interface.
5️⃣ Since there were other competitors at that time, I also purchased 100 temporary servers to build a Redis server for data sharing, with one server responsible for placing orders.
6️⃣ Currently, such opportunities still exist on the platform, but later the official added a price difference detection feature, which reduced the number of users. When users place orders, there will be prompts for excessive price differences, greatly reducing arbitrage opportunities.
Next, I will share the arbitrage code from that time within a day on this post and publish it in my GitHub arbitrage code repository: https://github.com/foolstack-omg/block-tech-sharing
Currently, the code repository has received 430✨ and 166 forks.
Twitter account🐦 @0x0_zero