[feature] Data Passthrough
Allow any inbound memo to pass information to the outbound memo. The allows a dev to be able to pass instructions to smart contract after a swap or withdrawal, or opening a loan, etc. Some use cases for this concept
- be able to buy an NFT on ETH with Bitcoin (swaps to ETH, buys NFT with ETH and associates the owner's address to be additional data)
- Swap and stake in a single txn
- Open a loan, then buy an NFT or add liquidity into another contract
Arbitrary data can be embedded into any memo using the
| (vertical pipe) separator.
swap:ETH.ETH::|hello world --> out:<hash>|hello world
The smart contract receiving the outbound memo can parse the text after the
| and act upon that.
- depending on the swap, memo space is not always plentiful, so memos may not be large enough to support complex systems. This is prob solvable, and should be handled separately.
- gas might be more complicated. More gas spent by TC is for the transfer of an asset, and this feature would cause the gas usage to be unlimited in some ways.