zkSync Lite - paying for a transfer with a different fee token #618
-
Hello! For the last three years, every month, we (Storj Labs) have been paying our storage node operators over zkSync Lite with STORJ token. We also support vanilla Ethereum of course, and as of last year started support for Era as well. This month, STORJ token is no longer listed as available for fee payment on https://zkscan.io/explorer/tokens/, which I understand to be a problem of trading volume. This is a big bummer, but not insurmountable. We are alright with paying fees for zkSync Lite in Ethereum or even USDC these days. But I can't figure out how to do it! I can't find a zkSync Lite API that actually allows for specifying a different fee token for a transfer. Here is specific code, found here: https://github.com/matter-labs/zksync/blob/master/sdk/zksync.js/src/utils.ts#L779
You'll notice that the token type is only included in the serialization once, and I don't know if there's a different serialization version that supports separated tokens for fee payment vs token transfer. This is a relatively urgent request - we will need to fall back to layer 1 transfers for these payments if we can't resolve this in the next few days (layer 1 transfers have some additional restrictions due to higher transfer fees, so this isn't great). Does anyone know how to either pay for a transfer with a different fee token via an API, or alternatively, know of an easy way to get STORJ supported for fee payment again? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Hello! Thank you for reaching out with your query regarding the use of a different fee token for transactions on zkSync Lite. Based on the information you've provided and the current capabilities of zkSync Lite, here's what you need to know: Paying Fees with Different TokensIn zkSync Lite, the ability to pay transaction fees using tokens other than the one being transferred (such as paying fees in ETH or USDC while transferring STORJ) is supported through the concept of "gasless meta-transactions." This means users can pay transaction fees in the tokens being transferred without needing to own ETH or any other specific tokens. However, this typically requires the token used for paying fees to have sufficient liquidity and be listed on platforms like Uniswap, and its price available on CoinGecko. Current Issue with STORJAs you mentioned, STORJ is no longer listed as available for fee payment on zkScan, likely due to trading volume issues. This directly affects the ability to use STORJ for fee payments. Possible Solutions
RecommendationGiven the urgency of your situation, I recommend preparing for a potential temporary shift to Layer 1 transfers while simultaneously working on boosting STORJ's liquidity and trading volume to meet the requirements for fee payment on zkSync Lite. Additionally, reaching out directly to the zkSync support or developer community might provide more tailored advice or updates on potential upcoming features that could address your needs. For any further assistance or to discuss this issue with the zkSync team, you might want to join the zkSync developer community on Discord where you can ask more detailed technical questions. I hope this information helps, and you find a viable solution soon! Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Whoa, an AI. The AI mostly said back to me what I said, though I would specifically like to avoid falling back to layer 1, though it is the only option I know of for forward progress (we are not going to artificially change trading volumes). But before we do that, I hope that this message serves as me reaching out to the zkSync support and developer community directly. I would love a human's thoughts on this issue. |
Beta Was this translation helpful? Give feedback.
Regarding transfer and paying fee in a different token:
This basically means making 2 transfers in a batch, where one of the transaction is your main transfer with 0 fee, and the other one is 0 amount transfer to yourself with fee token of your choice.