What? Sending TRX with MEMO cost another 1 TRX

in blog •  6 months ago 

image.png

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:

  1. Monitor TRX wallet
  2. Users send TRX to this TRX wallet with a Memo (note, with 1 TRX cost)
  3. 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.

  1. User indicates that he/she wants a swap - in the UI, the target token address.
  2. The server generates a new TRX address and asks the user to send TRX to it.
  3. The user sends TRX to this address.
  4. 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🚀!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!