FOX Operation Cases

Fox is an Ethereum zkRollup using ZK-EVM and its original ZK-FOAKS technology. ZK-STARKS comes from Zero Knowledge - Fast Objective Argument of Knowledges that is faster than Stark with linear proof time, sublinear verification time, transparent, and proof recursion inside.

As a ZK-Rollup, Fox is secure and efficient. Its operations are not limited to the following, swap, deposit, withdraw, and transfer. All the general-purpose dApps can run on Fox.

Deposit

Deposit refers to the process where users deposit Ethereum and ERC20 tokens into the Fox Layer 2 contract so that those tokens can be used on Layer 2. The Deposit process is initiated by the user on-chain. When Fox monitors that the user transfers tokens to the smart contract, it will update the status tree according to the transaction details. First, it will find the corresponding account to which the transaction belongs, then update the status of the corresponding token under that account based on the deposited amount. If there is no leaf node corresponding to the token under this account, then first create the leaf node corresponding to the token, and then update the status. When the status of the leaf node is updated, the hash of the root node will be updated accordingly. The updated hash of the root node of the state tree, together with the validity proof of the Deposit transaction, will be sent to the Layer 1 contract on-chain.

Withdraw

This operation means that the user withdraws the token from Layer 2, unlocks it from the Fox contract, and sends it to the corresponding Layer 1 account. The Withdraw process is initiated by the user from Layer 2. When the Fox contract receives the user’s withdrawal request, it will update the status of the corresponding token under the corresponding account, and send the updated root node hash and the proof of the Withdraw process to the Layer 1 contract on-chain. After the smart contract verifies it as valid, the contract will unlock the corresponding Token and send it to the account on the corresponding chain.

Transfer

It refers to the process where one user sends a certain token to another user in Layer 2. The Transfer process is initiated by the user on Layer 2. When Fox contract receives the Transfer request, it will find the corresponding sending and receiving accounts according to the request details. And it will update the status of the token under the accounts of the sender and receiver according to the sent amount. The hash of the root node of the state tree will be updated accordingly, and together with the validity proof corresponding to the transfer operation, be sent to the contract on Layer 2. Transfer does not change the on-chain status of the token, because the token is still locked in the Fox contract and has not been transferred on-chain.

Swap

A swap protocol system consists of on-chain smart contracts, an off-chain server, a zero-knowledge proof system, and a front-end user interface.

The swap server can use the Web Socket to interact with the user, and monitor transactions on the Ethereum blockchain. All valid transaction requests will be put into the swap protocol mem pool and processed by the Swap Engine. The Folder will roll up the transactions and generate a new block.

Fox adopts a distributed architecture and uses the latest zero-knowledge proof algorithm PLONK plus FRI to generate proofs.

The Interoperation between Ethereum and Fox
The Interoperation between Ethereum and Fox
The Interoperation of OX Protocol
The Interoperation of OX Protocol
Subscribe to Fox Tech
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.