Stores assets and serves as entry point for processing bundles
The Teller contract stores deposited funds and serves as the entry-point for processing bundles of operations. More specifically, the Teller is in charge of two things: non-custodially holding user funds and verifying JoinSplit proofs when processing a bundle of operations. After verifying the JoinSplit proofs, actual execution of the operations is delegated to the Handler contract.
When a deposit is completed from the Deposit Manager, the Teller receives the deposit assets. It also calls the Handler contract (see next section) to insert a new note into the commitment tree corresponding to the deposit. Later on, when the Handler needs to take up assets for executing an operation, it will call the Teller's requestAssets method to gather the funds needed during operation execution.
Entrypoint / Validating Proofs
When a bundler calls processBundle on the Teller, the Teller will batch-verify all joinsplit proofs contained within the bundle to amortize gas costs. If the batched proof verification passes, it will pass operations to the Handler contract one-by-one for processing and execution.