{
"version": "eosio::abi/1.1",
"types": [],
"structs": [
{
"name": "addcollater",
"base": "",
"fields": [
{
"name": "symbol",
"type": "symbol"
},
{
"name": "account",
"type": "name"
}
]
},
{
"name": "addinterest",
"base": "",
"fields": [
{
"name": "user",
"type": "name"
},
{
"name": "collateral",
"type": "symbol"
}
]
},
{
"name": "addoracle",
"base": "",
"fields": [
{
"name": "account",
"type": "name"
},
{
"name": "symbols",
"type": "symbol[]"
}
]
},
{
"name": "collateral_item",
"base": "",
"fields": [
{
"name": "symbol",
"type": "symbol"
},
{
"name": "account",
"type": "name"
},
{
"name": "is_active",
"type": "bool"
}
]
},
{
"name": "delcollater",
"base": "",
"fields": [
{
"name": "symbol",
"type": "symbol"
}
]
},
{
"name": "deloracle",
"base": "",
"fields": [
{
"name": "account",
"type": "name"
}
]
},
{
"name": "liquidate",
"base": "",
"fields": [
{
"name": "user",
"type": "name"
},
{
"name": "collateral",
"type": "symbol"
}
]
},
{
"name": "oracle_item",
"base": "",
"fields": [
{
"name": "account",
"type": "name"
},
{
"name": "symbols",
"type": "symbol[]"
}
]
},
{
"name": "param_item",
"base": "",
"fields": [
{
"name": "key",
"type": "name"
},
{
"name": "value",
"type": "string"
}
]
},
{
"name": "position_item",
"base": "",
"fields": [
{
"name": "account",
"type": "name"
},
{
"name": "amount_collateral",
"type": "asset"
},
{
"name": "amount_borrowed",
"type": "asset"
},
{
"name": "amount_interest",
"type": "asset"
},
{
"name": "interest_rate",
"type": "float64"
},
{
"name": "next_interest",
"type": "uint32"
}
]
},
{
"name": "rate_item",
"base": "",
"fields": [
{
"name": "account",
"type": "name"
},
{
"name": "rate_to_usd",
"type": "float64"
}
]
},
{
"name": "setcollater",
"base": "",
"fields": [
{
"name": "symbol",
"type": "symbol"
},
{
"name": "is_active",
"type": "bool"
}
]
},
{
"name": "setinterest",
"base": "",
"fields": [
{
"name": "user",
"type": "name"
},
{
"name": "collateral",
"type": "symbol"
},
{
"name": "interest",
"type": "float64"
}
]
},
{
"name": "setoracle",
"base": "",
"fields": [
{
"name": "account",
"type": "name"
},
{
"name": "symbols",
"type": "symbol[]"
}
]
},
{
"name": "setparam",
"base": "",
"fields": [
{
"name": "key",
"type": "name"
},
{
"name": "value",
"type": "string"
}
]
},
{
"name": "setrate",
"base": "",
"fields": [
{
"name": "oracle",
"type": "name"
},
{
"name": "collateral",
"type": "symbol"
},
{
"name": "rate",
"type": "float64"
}
]
}
],
"actions": [
{
"name": "addcollater",
"type": "addcollater",
"ricardian_contract": "Input parameters:\n\n* `symbol` Collateral symbol (EOS)\n* `account` Collateral token account (eosio.token)\n\n### Intent\nINTENT. The intention of the invoker of this contract is to add a new collateral type to the system. It is created inactive by default."
},
{
"name": "addinterest",
"type": "addinterest",
"ricardian_contract": "Input parameters:\n\n* `name` User to calculate interest for\n* `symbol` Collateral to calculate interest for\n\n### Intent\nINTENT. 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."
},
{
"name": "addoracle",
"type": "addoracle",
"ricardian_contract": "Input parameters:\n\n* `account` Oracle account name\n* `symbols` List of collateral symbols supported by this oracle\n\n### Intent\nINTENT. The intention of the invoker of this contract is to add an oracle to the system."
},
{
"name": "delcollater",
"type": "delcollater",
"ricardian_contract": "Input parameters:\n\n* `symbol` Collateral symbol\n\n### Intent\nINTENT. The intention of the invoker of this contract is to delete a disabled collateral from the system and remove it from all contract oracles."
},
{
"name": "deloracle",
"type": "deloracle",
"ricardian_contract": "Input parameters:\n\n* `account` Oracle account name\n\n### Intent\nINTENT. The intention of the invoker of this contract is to delete an oracle from the list of supported oracles."
},
{
"name": "liquidate",
"type": "liquidate",
"ricardian_contract": "Input parameters:\n\n* `user` User to liquidate position for\n* `collateral` Collateral to liquidate position for\n\n### Intent\nINTENT. 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."
},
{
"name": "setcollater",
"type": "setcollater",
"ricardian_contract": "Input parameters:\n\n* `symbol` Collateral symbol\n* `is_active` Collateral activity flag\n\n### Intent\nINTENT. The intention of the invoker of this contract is to update the status of a collateral type."
},
{
"name": "setinterest",
"type": "setinterest",
"ricardian_contract": "Input parameters:\n\n* `user` Customer account\n* `collateral` Collateral position to update\n* `interest` New daily interest rate for the user-collateral pair\n\n### Intent\nINTENT. The intention of the invoker of this contract is to updates a daily interest rate for a particular user's position."
},
{
"name": "setoracle",
"type": "setoracle",
"ricardian_contract": "Input parameters:\n\n* `account` Oracle account name\n\n### Intent\nINTENT. The intention of the invoker of this contract is to updates the list of collateral symbols supported by a specified oracle."
},
{
"name": "setparam",
"type": "setparam",
"ricardian_contract": "Input parameters:\n\n* `key` Parameter name\n* `value` Parameter new value\n\n### Intent\nINTENT. The intention of the invoker of this contract is to change existing or create new contract parameter."
},
{
"name": "setrate",
"type": "setrate",
"ricardian_contract": "Input parameters:\n\n* `oracle` Oracle account name\n* `collateral` Collateral symbol to set rate for\n* `rate` New or updated exchange rate\n\n### Intent\nINTENT. The intention of the invoker of this contract is to update or create a new rate for a collateral type by a particular oracle."
}
],
"tables": [
{
"name": "collaterals",
"index_type": "i64",
"key_names": [],
"key_types": [],
"type": "collateral_item"
},
{
"name": "oracles",
"index_type": "i64",
"key_names": [],
"key_types": [],
"type": "oracle_item"
},
{
"name": "params",
"index_type": "i64",
"key_names": [],
"key_types": [],
"type": "param_item"
},
{
"name": "positions",
"index_type": "i64",
"key_names": [],
"key_types": [],
"type": "position_item"
},
{
"name": "rates",
"index_type": "i64",
"key_names": [],
"key_types": [],
"type": "rate_item"
}
],
"ricardian_clauses": [],
"error_messages": [],
"abi_extensions": [],
"variants": [],
"action_results": []
}