I was looking into prototyping the TRX to STEEM swap tool, and surprised to find out that it costs an additional 1 TRX to send a memo.
TRX Swap Tool Design 1.
To allow TRX swap to other tokens such as STEEM, here is a simple design like other existing steem swap tools:
- Monitor TRX wallet
- Users send TRX to this TRX wallet with a Memo (note, with 1 TRX cost)
- Then the server parses this transaction, queries the price, converts, and send tokens to the address specified in the note.
Pros: simple
Cons: 1 TRX cost, users need to specify note in the transaction
TRX Swap Tool Design 2.
Here is an alternative tool.
- User indicates that he/she wants a swap - in the UI, the target token address.
- The server generates a new TRX address and asks the user to send TRX to it.
- The user sends TRX to this address.
- The server monitors the wallet and once funds received, converts and sends the tokens to the given token address in step 1.
Pros: the users do not need to specify the notes.
Cons:
- in order for the server to move the funds out of the new address, a cost needs to be paid, thus not suitable for small amount of swaps.
- more complex, harder to implement.
Do you have other designs?
Thanks for sharing!
Steem to the Moon🚀!
- You can swap the STEEM/SBD to SOL Solana via steem2sol!
- You can swap the STEEM/SBD to ETH Ethereum via steem2eth!
- You can swap the STEEM/SBD to Tether USDT (TRC-20) via steem2usdt!
- You can swap the STEEM/SBD to TRX (TRON) via steem2trx!
- You can swap the STEEM/SBD to BTS (BitShares) via steem2bts!
- Register a free STEEM account at SteemYY!
- Steem Block Explorer
- ChatGPT/Steem Integration: You can type !ask command to invoke ChatGPT
- Steem Witness Table and API
- Other Steem Tools