ZigZag Contract is a heart of ZigZag lending platform. It accepts tokenized collateral in EOS network and sends back a loan in ZIG stablecoin. You can find description of its methods below.
Input parameters:
key
Parameter namevalue
Parameter new value
The intention of the invoker of this contract is to change existing or create new contract parameter.
Input parameters:
symbol
Collateral symbol (EOS)account
Collateral token account (eosio.token)
The intention of the invoker of this contract is to add a new collateral type to the system. It is created inactive by default.
Input parameters:
symbol
Collateral symbolis_active
Collateral activity flag
The intention of the invoker of this contract is to update the status of a collateral type.
Input parameters:
symbol
Collateral symbol
The intention of the invoker of this contract is to delete a disabled collateral from the system and remove it from all contract oracles.
Input parameters:
account
Oracle account namesymbols
List of collateral symbols supported by this oracle
The intention of the invoker of this contract is to add an oracle to the system.
Input parameters:
account
Oracle account name
The intention of the invoker of this contract is to updates the list of collateral symbols supported by a specified oracle.
Input parameters:
account
Oracle account name
The intention of the invoker of this contract is to delete an oracle from the list of supported oracles.
Input parameters:
oracle
Oracle account namecollateral
Collateral symbol to set rate forrate
New or updated exchange rate
The intention of the invoker of this contract is to update or create a new rate for a collateral type by a particular oracle.
Input parameters:
user
Customer accountcollateral
Collateral position to updateinterest
New daily interest rate for the user-collateral pair
The intention of the invoker of this contract is to updates a daily interest rate for a particular user's position.
Input parameters:
name
User to calculate interest forsymbol
Collateral to calculate interest for
The intention of the invoker of this contract is to calculate a daily interest for a particular user's position and add it to amount of that position. Next interest calculation is scheduled after 24 hours.
Input parameters:
user
User to liquidate position forcollateral
Collateral to liquidate position for
The intention of the invoker of this contract is to check if a position is due for liquidation. If it is due for liquidation, transfer collateral amount to an account specified in contract parameters, collect liquidation fee and return the rest to user account.