The on-chain contract contains a mapping from Ethereum addresses to stark-keys, which is used as the off-chain identifier. This promises that if Alice withdraws money from an off-chain vault with a key that belongs to her, only she can actually control these funds on L1.
In addition, the on-chain contract naturally handles registering, depositing and withdrawing USDC from/to the system, and also contains the commitment to the full balance state of the system, found in L2.
The off-chain logic handles trades, liquidations, transfers and deleverages, as well as updating the oracle prices. It stores the entire balance of all the users, and periodically submit STARK proofs, attesting the validity of the balances change, given the user’s transactions.
You can read more about our authors here.