So very generally, I want to build a decentralized orderbook exchange. As i understand, this is not economically feasible on a regular network like ethereum because traders will have to pay tx fees every time they want to put in or update na order onchain. Ive heard that phala network leverages TEE for hteir network. Im not very familiar yet with TEE - does this provide a solution for my usecase where traders can submit and update orders offchain somehow without having to pay x fees? Ideally i would like for all the minor updates such as order submission/update/cancellation to happen in a 0 gas/tx fee offchain environment for speed and cost reasons and only the major updates such as order match/trade to be reported on chain and incur gas/tx fees. Is that possible on phala and how can i do that?
As for TEE, there’s quite some gaps in my knowledge I was hoping to understand. Here’s what I know so far: for all PCs with certain new enough cpu to support TEE, they can run a node for a blockchain/TEE hybrid protocol (ex Phala). Is that correct? So if theres storage in the TEE, lets say some user wants to store some data in there (ex. Orderbook state). So each node will have a copy of the orderbook state living inside the TEE. Is that correct so far? How do these copies of the storage stay in sync with each other when the state is updated?
for ref, my polkadot.js address: 16A23rq7FoL9XNHxVBvKCUjYk58QTogEL6ND13W83hnfXPRe