Spec Contracts
Spec Contracts do not have independent functionality, but provide a specification for further contracts. Specs can be thought of like an interface in traditional object oriented programming. Specs are useful for allowing contracts to have more flexibility and non-determinism by specifying rules for contracts instead of needing to hardcode exhaustive lists of eligible contracts and assets.
As an example, say we wish to issue an over-collateralized stable coin. As discussed previously, it is greatly preferable to mint against vault shares as opposed to collateralizing assets directly because it distributes state management across many contracts. The creator of the stable coin contract could also issue a Spec Contract which outlined the allowable assets for collateral. Then, in the stable coin's MBA Contract, they can list this Spec Contract as the allowable collateral.
Specs also allow for better interoperability, for example a spec could designate all strongly-pegged Glittr native stable coins, and be updated regularly. Other contracts - both MOAs and MBAs - can allow for 'designated stable coins' to be used as payment or collateral, and future proof the emergence of new stables.
Last updated