πŸ€·β€β™‚οΈThe Host Contract

The 'Host contract' exists on the chain the user is transacting on, for example, Ethereum. Due to the inherently transparent nature of EVM chains, this contract cannot be tasked with retaining any information (state) without that state becoming public knowledge. All state is retained entirely by the Enclave contract.

The Host contract simply does 2 things, it accepts deposits, and it executes transfers of funds.

Users initiate a deposit which automatically prompts the Celer IM Bridge to package the context of the transaction (the sender and amount), and execute that transaction against the Enclave contract on Sapphire which records the transaction thus updating the contract's state.

When a transfer or withdrawal is made, the logic flow is reversed. The user interacts directly with the Enclave contract which automatically prompts the Host contract to complete a transaction.

Logic flow of Deposits

Last updated