How about building multi-assets transaction routing?

Dear 1inch team and community,
here is an idea about new function, hope you’re interested in it.
As a crypto trader, I change my position quite often. Many of these trades can be done well on DEXs, and especially thanks to 1inch, it’s really a great tool to do large-scale trading.
But there is one kind of trades which I cannot find any tool (both DEX and CEX) to do it. It’s multi-asset trading in one transaction (at least one click on trader’s view).
I made a simple graph below:


For instance, I own $7k value of $ETH and $3k value of USDC, if now I want to build a long position of wBTC ($10K), I need to sell my ETH and USDC. That’s normally would need to 2 transactions. Can this be done by 1 transaction?
Another case is that if I’m bearish about the market, I need to sell all my assets to USDC, it would be great if I could do it by 1 click.
Personally I will be very gald to see if there is a tool can make this happen. I post here to see how many people share the same need with me and hope 1inch team will be interested in it.
Thanks for reading, any comment is welcome.

5 Likes

Thanks for posting your ideas on the forum, the proposal resonates with me, esp. the part when you are talking about possibility of swapping all portfolio assets into one single asset. I find this specifically useful for the case when the gas cost of swapping so-called “dust” is in times greater than the asset value.

4 Likes

This would be a really helpful feature. Although, gas is the first thing that comes to mind, as multi-asset swaps = multiple incurred gas fees (within the route). For Ethereum Mainnet in its current state, this could be too expensive for small users and/or consolidating wallet dust.

Perhaps multi-asset swaps could be implemented on one of the L2s or sidechains first (as a trial), then rolled out to ETH Mainnet after the merge or (maybe EIP4488).

5 Likes

That’s a great idea, I would love to have this functionality!

3 Likes

Already Posted here

  • It was raised in community ama too to have such kind of feature where Anton said that he worked on some prototype of it which works very efficiently
1 Like

Gas optimization of such a combination of trades will be really low. I think 25-40k of gas only.

6 Likes

Wow! Much thanks! Glad to see someone has the same idea, which may indicates this feature is demanding.
Wondering how it proceed now.

1 Like

Thanks for giving the feedback on tech side.
I think the key demand for multi-assets routing is not about gas-saving. If a trader have to sell multi assets for one asset, s/he would do it one by one. The gas cost won’t stop him/her doing it.
Or as @tradersnow said, we could do it on L2 or some cheaper L1, and then do it on Ethereum mainnet.

1 Like

Thanks!
Many would like to clean the “dust” assets. I"m not sure this feature could save lots of gas on cleaning the “dust” or not on Ethereum mainnet, but it could provide much easiness and convenience to do this on L2s or cheaper L1s.

2 Likes

Really helpful suggestions, thank you!

1 Like

BTW this functionality to swap dust could be built on top of 1inch, the worst part it that you still need to execute approves for each separate token.

3 Likes

But that sounds like a limit on top of Crypto Wallet or Extensions we using like metamask to which we have to approve each popup .

So how about making a custom extension or under app feature in iOS to load such data at once ?
1inch App can provide security to such swap built right in the App

1 Like

I think somebody in forum said something about high gas fee & how doing “Batching” Transactions a day can reduce overhead costs on swap fee

1 Like

What about batched approvals and/or permit 712 tokens for this dust collection / multi-swap?

3 Likes

I’d like to Bring forth some Documentation and research papers done by teams over this .
I’m compiling so that it can shed some light on this tech .

Link : iBatch: Saving Ethereum Fees via Secure and Cost-Effective Batching of Smart-Contract Invocations (ESEC/FSE 2021 - Research Papers) - ESEC/FSE 2021

Link : EIP-1155: Multi Token Standard

Most of the dust tokens do not have this feature.

5 Likes

Thx, will check it.

  1. It makes sense to compose similar trades to join source tokens, swap, and split destination tokens. This is what actually would happen if you’ll just use Limit Orders.

  2. EIP-1155 is a multi-ERC20 implementation - it is not related to the topic, it is about their inner implementation.

5 Likes

It was raised in community ama too to have such kind of feature where Anton said that he worked on some prototype of it which works very efficiently

This is the timestamped link: The 1inch Wallet: a user-friendly entry point to the DeFi space - YouTube (24:52 – 28:30).

It seems like, with most existing ERC-20s, there would only be like a minor gas savings compared to trading the coins individually (saves ~20k gas per token while the rest of the swap costs 300-500k gas per token).


I really like the convenience factor, though. I have a wallet with a multiple older ERC-20s that I’ve been meaning to swap for a while, but going through a half dozen transactions doesn’t really seem worth it.

3 Likes

Thx for the links. As I said it can be built on top of 1inch by any other developer but it will NOT actually solve the issue with multiple transactions because it would require approve() transactions.

3 Likes

I talked to the 1inch Foundation Grant writing team about this – they believe it is a good idea and are interested in reviewing grant applications from teams that want to build this out – 1inch Grant Program - Application.

1inch Foundation has their own money that they can use to fund protocol development from a 3rd party team. This would not require spending any DAO treasury funds, so would not need to go through the whole 1IP process (the 1inch Foundation grant process is much faster moving).

So, if anyone reading this wants to take the initiative and submit a grant application for building this multi-asset routing on top of 1inch Network, please do so and let me or @Natalia know once it is in. Or if you know a team that is willing to build this out, please link them to this thread and encourage them to apply for a grant!

3 Likes