91
中文 (Chinese) / Re: 6.0功能预览之一:无抵押借贷(闪电贷)
« on: November 14, 2021, 11:22:53 pm »
主贴补充两个场景:p2p借新还旧、创建资产+提取费池
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
fee 手续费,测试网默认手续费 1 TEST 基本手续费 + 交易大小费每 KB 加 1 BTS (类似转账 MEMO 费)
owner_account 账号,格式 1.2.x
asset_type 资产类型(币种),格式 1.3.x
balance 金额,整数表示,单位是聪
fee_rate 借款费率,整数表示,单位是百万分之一
max_duration_seconds 借款时长,单位是秒
min_deal_amount 最低借款金额(每笔),单位是聪
enabled 是否立即激活,可为 true 或者 false
auto_disable_time 自动下架时间,格式如 "2021-11-30T0:00:00"
acceptable_collateral 接受的抵押物列表及各抵押物折算价,二维数组格式
acceptable_borrowers 接受的借款人列表及各人最大借款额度,列表为空表示无限制,二维数组格式
get_account_history abit-test 10
51517585 2021-11-08T18:21:12 credit_offer_create_operation abit-test (Fee: 1.10156 TEST) result: 1.21.0
>>> get_object 1.21.0
[{
"id": "1.21.0",
"owner_account": "1.2.3833",
"asset_type": "1.3.0",
"total_balance": 100000000,
"current_balance": 100000000,
"fee_rate": 100,
"max_duration_seconds": 86400,
"min_deal_amount": 2000000,
"enabled": true,
"auto_disable_time": "2021-11-30T00:00:00",
"acceptable_collateral": [[
"1.3.1515",{
"base": {
"amount": 10000000,
"asset_id": "1.3.0"
},
"quote": {
"amount": 4000000,
"asset_id": "1.3.1515"
}
}
],[
"1.3.1516",{
"base": {
"amount": 100000,
"asset_id": "1.3.0"
},
"quote": {
"amount": 3000,
"asset_id": "1.3.1516"
}
}
]
],
"acceptable_borrowers": [[
"1.2.0",
5000000
],[
"1.2.6",
8000000
]
]
}
]
fee 手续费,测试网默认手续费 0 ,也就是免费
owner_account 账号,格式 1.2.x
offer_id 要约 ID ,格式 1.21.x
get_account_history abit-test 10
51517968 2021-11-08T18:40:48 credit_offer_delete_operation abit-test (Fee: 0 TEST) result: 1000 TEST
fee 手续费,测试网默认手续费 1 TEST 基本手续费 + 交易大小费每 KB 加 1 BTS (类似转账 MEMO 费)
owner_account 账号,格式 1.2.x
offer_id 要约 ID ,格式 1.21.x
delta_amount 变化金额,可选(不填表示不变),标准金额格式(数量+币种),数量为正为增资,为负为撤资
fee_rate 新的借款费率,可选(不填表示不变),整数表示,单位是百万分之一
max_duration_seconds 新的借款时长,可选(不填表示不变),单位是秒
min_deal_amount 新的最低借款金额(每笔),可选(不填表示不变),单位是聪
enabled 是否激活,可选(不填表示不变),可为 true 或者 false
auto_disable_time 新的自动下架时间,可选(不填表示不变),格式如 "2021-11-30T0:00:00"
acceptable_collateral 新的接受的抵押物列表及各抵押物折算价,可选(不填表示不变),二维数组格式
acceptable_borrowers 新的接受的借款人列表及各人最大借款额度,可选(不填表示不变),二维数组格式
get_account_history abit-test 10
51518361 2021-11-08T19:01:12 credit_offer_update_operation abit-test (Fee: 1.06250 TEST)
>>> get_object 1.21.1
[{
"id": "1.21.1",
"owner_account": "1.2.3833",
"asset_type": "1.3.0",
"total_balance": 102000000,
"current_balance": 102000000,
"fee_rate": 100,
"max_duration_seconds": 300,
"min_deal_amount": 2000000,
"enabled": true,
"auto_disable_time": "2021-11-30T00:00:00",
"acceptable_collateral": [[
"1.3.1515",{
"base": {
"amount": 10000000,
"asset_id": "1.3.0"
},
"quote": {
"amount": 4000000,
"asset_id": "1.3.1515"
}
}
],[
"1.3.1516",{
"base": {
"amount": 100000,
"asset_id": "1.3.0"
},
"quote": {
"amount": 3000,
"asset_id": "1.3.1516"
}
}
]
],
"acceptable_borrowers": [[
"1.2.0",
5000000
],[
"1.2.6",
8000000
],[
"1.2.25530",
6000000
]
]
}
]
fee 手续费,测试网默认手续费 1 TEST
borrower 借款人,格式 1.2.x
offer_id 要约 ID ,格式 1.21.x
borrow_amount 借款金额,标准金额格式(数量+币种)
collateral 抵押品,标准金额格式(数量+币种)
max_fee_rate 可接收的最高费率,单位是百万分之一
min_duration_seconds 可接受的最低借款时长,单位是秒
get_account_history abit-test 10
get_account_history xbt 10
51518802 2021-11-08T19:23:51 credit_offer_accept_operation xbt (Fee: 1 TEST) result: {"impacted_accounts":["1.2.3833"],"new_objects":["1.22.0"]}
>>> get_object 1.21.1
[{
"id": "1.21.1",
"owner_account": "1.2.3833",
"asset_type": "1.3.0",
"total_balance": 102000000,
"current_balance": 99000000,
...
>>> get_object 1.22.0 [{
"id": "1.22.0",
"borrower": "1.2.25530",
"offer_id": "1.21.1",
"offer_owner": "1.2.3833",
"debt_asset": "1.3.0",
"debt_amount": 3000000,
"collateral_asset": "1.3.1515",
"collateral_amount": 1200000,
"fee_rate": 100,
"latest_repay_time": "2021-11-08T19:28:51"
}
]
fee 手续费,测试网默认手续费 1 TEST
account 还款人,格式 1.2.x
deal_id 借款合约 ID ,格式 1.22.x
repay_amount 还款金额,标准金额格式(数量+币种)
credit_fee 支付借款费用,标准金额格式(数量+币种)
get_account_history abit-test 10
get_account_history xbt 10
51520181 2021-11-08T20:34:54 credit_deal_repay_operation xbt (Fee: 1 TEST) result: {"impacted_accounts":["1.2.3833"],"updated_objects":["1.21.1"],"removed_objects":["1.22.3"],"received":[{"amount":1200000,"asset_id":"1.3.1515"}]}
51519428 2021-11-08T19:56:12 credit_deal_repay_operation xbt (Fee: 1 TEST) result: {"impacted_accounts":["1.2.3833"],"updated_objects":["1.21.1","1.22.2"],"received":[{"amount":400000,"asset_id":"1.3.1515"}]}
get_account_history abit-test 10
get_account_history xbt 10
51519008 2021-11-08T19:34:27 credit_deal_expired_operation xbt (Fee: 0 TEST)
>>> get_object 1.11.84564441
[{
"id": "1.11.84564441",
"op": [
74,{
"fee": {
"amount": 0,
"asset_id": "1.3.0"
},
"deal_id": "1.22.1",
"offer_id": "1.21.1",
"offer_owner": "1.2.3833",
"borrower": "1.2.25530",
"unpaid_amount": {
"amount": 3000000,
"asset_id": "1.3.0"
},
"collateral": {
"amount": 1200000,
"asset_id": "1.3.1515"
},
"fee_rate": 100
}
],
"result": [
0,{}
],
"block_num": 51519008,
"trx_in_block": 5,
"op_in_trx": 0,
"virtual_op": 0
}
]
fee 手续费,测试网默认手续费 1 TEST
owner_account 账号,格式 1.2.x
asset_type 资产类型(币种),格式 1.3.x
balance 金额,整数表示,单位是聪
fee_rate 借款费率,整数表示,单位是百万分之一
get_account_history abit-test 10
51352616 2021-11-02T18:50:27 samet_fund_create_operation abit-test (Fee: 1 TEST) result: 1.20.0
>>> get_object 1.20.0
[{
"id": "1.20.0",
"owner_account": "1.2.3833",
"asset_type": "1.3.0",
"balance": 10000000,
"fee_rate": 100,
"unpaid_amount": 0
}
]
fee 手续费,测试网默认手续费 0 ,也就是免费
owner_account 账号,格式 1.2.x
fund_id 池 ID ,格式 1.20.x
get_account_history abit-test 10
51352928 2021-11-02T19:07:57 samet_fund_delete_operation abit-test (Fee: 0 TEST) result: 100 TEST
fee 手续费,测试网默认手续费 1 TEST
owner_account 账号,格式 1.2.x
fund_id 池 ID ,格式 1.20.x
delta_amount 变化金额,可选(不填表示不变),标准金额格式(数量+币种),数量为正为增资,为负为撤资
new_fee_rate 新的借款费率,可选(不填表示不变),整数表示,单位是百万分之一
get_account_history abit-test 10
51353633 2021-11-02T19:47:21 samet_fund_update_operation abit-test (Fee: 1 TEST)
>>> get_object 1.20.1
[{
"id": "1.20.1",
"owner_account": "1.2.3833",
"asset_type": "1.3.0",
"balance": 12000000,
"fee_rate": 200,
"unpaid_amount": 0
}
]
fee 手续费,测试网默认手续费 1 TEST
borrower 借款人,格式 1.2.x
fund_id 池 ID ,格式 1.20.x
borrow_amount 借款金额,标准金额格式(数量+币种)
fee 手续费,测试网默认手续费 1 TEST
account 还款人,格式 1.2.x
fund_id 池 ID ,格式 1.20.x
repay_amount 还款金额,标准金额格式(数量+币种)
fund_fee 支付借款费用,标准金额格式(数量+币种)
1.2.987999 zapata42-witness 3000+500+500 = 4000
1.2.183 hiquanta 3000+500+200 = 3700
1.2.738675 xbtsio-wallet 3000 +200 = 3200
1.2.1035733 syalon 2500 +500 = 3000
1.2.14035 xn-delegate 2000 +200 = 2200
1.2.25010 bhuz 1500 = 1500
1.2.420186 clone (yexiao) 1000 +200 = 1200
1.2.389463 nexus01 (Ross) 1000 +200 = 1200
1.2.35248 in.abit 500+200 = 700
1.2.1031601 btspp-witness 500 = 500