setGlobalFactors
params of setGlobalParams -> storage upd
Sets global factor constants to storage.
Types
type setGlobalParams is [@layout:comb] record [
closeFactorF : nat;
liqIncentiveF : nat;
priceFeedProxy : address;
maxMarkets : nat;
]Parameter
Type
Description
closeFactorF
nat
close factor
as float number multiplied by precision= 1000000000000000000n; (1e+18)
liqIncentiveF
nat
liquidation incentive
as float number multiplied by precision= 1000000000000000000n; (1e+18)
interestRateModel
address
priceFeed proxy contract instance
maxMarkets
nat
maximum amount of markets allowed to enter and borrow
Usage
const tokenId = 0; // or new BigNumber(0) or "0"
const yupana = await tezos.contract.at(yTokenAddress);
const proxyContractAddress = "KT1..."
const operation = await yupana.methods.setGlobalFactors(
"500000000000000000",
"1050000000000000000",
proxyContractAddress,
"2",
).send();
await operation.confirmation();PRECISION = pow(10, 18)
config = {
"close_factor": 0.5,
"liquidity_incentive": 1.05
}
token = { "fA12": token_address } # or { "fA2": (token_address, token_id) }
yupana = ContractInterface.from_michelson(code) # or client.contract(contract_address)...
call = yupana.setGlobalFactors(
closeFactorF = int(config["close_factor"] * PRECISION),
liqIncentiveF = int(config["liquidity_incentive"] * PRECISION),
priceFeedProxy = "KT1...",
maxMarkets = 2
)
opg = call.inject()Errors
yToken/not-admin-senderis not contract admin.
Last updated