# Verifiers¶

contract Verifiers is MainStorage, MApprovalChain, LibConstants

A Verifier contract is an implementation of a STARK verifier that the exchange service sends STARK proofs to (see IDexStatementVerifier). In addition, the exchange contract can call a verifier to check if a valid proof has been accepted for a given state transition (typically described as a hash on the public input of the assumed proof).

The exchange contract will normally query only one verifier contract for proof validity checks. However, in the event that the verifier algorithm needs to updated, additional verifiers may be registered with the exchange contract by the contract MainGovernance. Such new verifiers are then also be required to attest to the validity of state transitions and only if all the verifiers attest to the validity the state transition is accepted.

Removal of verifiers is also the responsibility of the MainGovernance. The removal process is more sensitive than verifier registration as it may affect the soundness of the system. Hence, this is performed in two steps:

1. The MainGovernance first announces the intent to remove a verifier by calling announceVerifierRemovalIntent

2. After the expiration of a VERIFIER_REMOVAL_DELAY time lock, actual removal may be performed by calling removeVerifier

The removal delay ensures that a user concerned about the soundness of the system has ample time to leave the exchange.

function getRegisteredVerifiers()
external
view
function isVerifier(address verifierAddress)
function registerVerifier(address verifier, string calldata identifier)
function announceVerifierRemovalIntent(address verifier)
function removeVerifier(address verifier)