Parameters
The parameters section will contain all the parameters you intend to use in your product.
Smart Contracts do not store state. Instead, they fetch the current state of Vault. This enables us to guarantee consistency and performance
across all Contracts. One of the key elements of state exposed to Smart Contracts are Parameters.
All bank accounts need to be parameterized to some extent. For example, lending terms are unique to each lending customer, an d s avings
products can have varying interest rates. This is stored and configured as Contract Parameters in Vault. Hooks are stateless. Th erefore, Vault
has to be the source of truth for this parametrization meaning the Smart Contract hooks will retrieve parameter data from the Vault
database.
Smart Contract Parameters have 3 levels:
Instance level parameters are unique to each “instance” of the Smart Contract ( ie , each individual customer
Template level parameters are shared by all instances of a Smart Contract (i.e. all instances of a specific product version).
Global level parameters are shared by all Smart Contracts (i.e. all accounts on your vault instance can access these paramete rs)
There is also one other type of parameter to consider
Derived Parameters: These are functions you can use to retrieve data from an account,
e.g. Amount of Interest paid out to an account since opening. These use a hook called ‘ derived_parameters