Skip to content

Frequently Asked Questions

Layer 2

Is RedSonic an independent chain?

Yes, RedSonic is a layer2 blockchain for apps/games. RedSonic is a service based on StarkEx, and all of StarkEx's data is on the ETH blockchain network. Its proofs and funds (deposit/withdrawal) are all on the Ethereum mainnet.

How long does it take for the proof of a layer 2 operation to be published on the blockchain?

It typically takes 4-8 hours on testnet and 8-16 hours on mainnet for the proof of every layer 2 operation to be recorded on the main blockchain (layer 1). This is because the proof must be carefully verified and processed by the nodes on the main blockchain to ensure the security and integrity of the data, and this process can take a significant amount of time, depending on the number of transactions and the complexity of the proof. However, users only need to be concerned with this time frame when initiating a withdraw on layer 1 because the status of layer 2 operations is returned in real-time.

Which rollup mechanism is currently used for interaction between layer2 and layer1? What is the timeliness?

RedSonic supports two sidechain schemes to validium(the default option) and zkRollup for interaction between layer 2 and layer 1. The major difference between a validium and a zk-rollup is data availability: validium stores data off-chain, while ZkRollup stores data on-chain. The timeliness of the two schemes is roughly the same.

  1. The execution time for operations on layer 2 is around 300ms.
  2. Submitting confirmation proof from layer 2 to layer 1 generally takes4-8 hours on testnet and 8-16 hours on mainnet. For more information about zkRollup, see how does layer 2 works.


Can I customize the message that Metamask pops up when calling the generateFromEthSignature function?

You can customize the message that pops up but it is not recommended. This is because the modification will cause the generated stark_key to be inconsistent and cannot be used universally in all of the RedSonic-based web3 applications.

Does SDK wallets generated functions always lead to the same key pairs?

Not necessarily, it depends on the generation algorithm you use: If the stark_key pair is generated from an Ethereum private key, they are generated using the same signature and the same Ethereum private key generates the same stark_key pair. If the stark_key pair is generated by a random function, such as the get_random_private_key function in the Unity SDK, the generation principle is consistent with the wallet key generation principle on layer 1, and the algorithm ensures that the wallet will not be repeated when generated. Therefore, you will not get the same stark_key pairs.

Does RedSonic/Starkware know the keypair I generate?

RedSonic/Starkware does not have access to the the public and private keypair generated by the SDK. The key generation function provided by the SDK is a purely algorithm-based local key generation, and does not require an Internet connection to use. Therefore, it is not possible for RedSonic/Starkware to know the private key associated with your public stark key.



What is the cost for withdrawing NFT from layer 2 to layer 1? Will it be cheaper than directly minting on layer 1?

RedSonic does not charge any fees for the withdrawal process. However, users are required to pay gas fees to the relevant blockchain network when withdrawing on Layer 1. This is because the withdrawal process is a two-step process, where the first step involves withdrawing on Layer 2, which is free of charge. And the second step of the withdrawal, which takes place on Layer 1, requires the payment of gas fees to the relevant blockchain network. Withdrawing from L2 to L1 costs roughly the same as a normal transaction fee, as seen in this example. It won't be cheaper than directly withdrawing on L1, but it has a huge advantage for buying NFTs by completely avoiding gas wars. On layer 2, you can perform a free mint and then choose to withdraw to layer 1 during a low gas fee time, potentially saving several times to tens of times more in gas fees.

What is the minimum amount for ETH/ERC20 withdrawal?

The minimum withdrawal unit for ETH and ERC20 is 1 "quantum", which is 0.000001 units. Therefore, you need to withdraw at least 0.000001 units of tokens at a time.

How long does it take to withdraw assets on layer 2?

The withdrawal operations usually complete within 8 hours, so you can check the status of the assets every 30 minutes after initiating a withdrawal. Note that when a withdrawal is completed, it means that the layer 2 proof of the withdrawal has been submitted to layer 1, which also means that the assets can now be withdrawn to the user's layer 1 wallet.


What is the difference between "nonQuantizedAmount" and "quantizedAmount"?

nonQuantizedAmount is the standard unit of Ether, similar to 1 gas. 1 ETH = 10^18 gas. Meanwhile, quantizedAmount is a unique unit of RedSonic (starkex), where 1 quantize = 10^12. Therefore, nonQuantizedAmount can be obtained by multiplying nonQuantizedAmount by 10**6.

Will completed orders still be in the order API? Where can I find it?

Completed orders don’t appear in the order API. The order API only shows orders that haven't been filled yet. If you want to query your filled orders, you can use the record API.

How to know which wallet buys a specific NFT?

You can query the NFT collection API to figure out who buys a specific NFT, see this response as an example.

What are the possible reasons that pending orders are not filled?

There are many reasons why a pending order may not be filled. One possible reason why your order hasn't been filled is that the buyer and the seller are the same user. To prevent order fraud, RedSonic will freeze the user's assets if the buyer and the seller are the same user and the order will not be placed. You can cancel the failed order by using the cancel_order function and re-place the order.


What are the features of the token ID in the NFT collection?

The tokenId in the NFT collection is generated and maintained by RedSonic for its uniqueness. The tokenId values are completely consistent between layer 1 and layer 2, and currently each contract tokenID is monotonically increasing starting from 1. We will add the function to mint the specified tokenID in the future.

Is it possible to customize the royalty of NFTs?

Currently, it is not supported by RedSonic.

How to make ERC721 contract support minting on layer 2?

You must make sure your ERC721 contract includes the MintFor function.

What should I put in the base URI?

The Base URI is a unique identifier used to locate and manage the metadata of each NFT in your collection. It typically looks like a URL or web address and should be a stable and persistent location to access the metadata which includes information such as images and attributes of each NFT. For more information, see Set Up Metadata For Your NFTs.

What is assetid?

assetid is a unique identifier that links your assets on layer 2 with those on layer 1, based on factors such as the type of asset (ETH, ERC20, ERC721), the contract address, and the token ID. However, if the asset is an ERC20 or ETH type, the token ID is not used in the calculation of the assetid.


Can I set marketplace rates? Will RedSonic charge from it?

You can set any marketplace fee, which will be automatically transferred to your address after the user sells NFT. RedSonic charges an additional 0.5% on top of that rate. For example, if your marketplace charges 1%, RedSonic charges another 0.5%. Then a total of 1.5% fee will be charged to the user. You can refer to the marketplace documentation for more information.


What does the expirationTimeStamp parameter mean?

The expirationTimeStamp parameter represents the timeout for deposit/transfer/withdraw operations. Once the processing time of this operation on layer2 exceeds this value, the operation will fail. The unit of this parameter is second (unixtimestamp/3600). The default value and maximum value of this parameter are both 4194303. If you use default value as parameter, this operation will never expire.

What is nonce?

A nonce is a one-time code selected in a random or pseudo-random manner that is used to securely transmit a main password, preventing replay attacks. Similar as in Ethereum, each transaction has a nonce on RedSonic and the nonce value of stark_key increases by 1 after the transaction. For more information, see What is a Nonce.

Why doesn't Metamask pop up on the contract deployment page/demo page?

  1. Make sure to click "Connect Wallet" button on RedSonic Dashboard.
  2. Make sure the Metamask extension is not blocked on Chrome. If your Metamask extension is blocked, follow the Chrome help documentation to unlock the Metamask extension.

What is the pricing of RedSonic?

Currently, RedSonic only charges fees after a user places an order and the transaction is completed. The fee rate is 0.5% of the total price of the order and is only charged to the seller (maker). Please check pricing page for more details.