The on-chain interactions of any off-chain exchange occur usually when users initiate deposit or withdrawal requests. In Zex, all such interactions are managed through the ZexPorta module.
As mentioned earlier, ZexPorta constantly monitors blockchain transactions and filters out transfers that correspond to deposits made to our platform. Once a deposit is identified, ZexPorta requests its validators to confirm the deposit and generate a threshold signature using the FROST algorithm. After the individual signature shares are aggregated, the deposit data, along with the aggregated signature, is sent to ZexCora for sequencing and execution.
When a user initiates a withdrawal request in ZexCora, the request is first processed off-chain. ZexPorta observes this new withdrawal request registered and finalised in ZexCora. After preprocessing steps (which may vary depending on the specific blockchain), ZexPorta requests the ZexCora nodes on EigenLayer to issue a threshold signature for the withdrawal. Once the signature shares are aggregated, ZexPorta broadcasts the withdrawal transaction on-chain, completing the transfer from the platform to the user’s wallet, along with the verified signature.
Note: Zex has no authority to transfer funds from the vault without the confirmation of EigenLayer nodes. We'll expain this in the .