多签名钱包层次结构(信任系统)

本文介绍了信任系统的抽象,该系统使您可以将托管服务集成到经济关系的任何领域。
存入资金是任何交易的基本组成部分。 如果交易对方不了解彼此的可靠信息,那么欺诈的风险就会增加。 通过这种方式,您可以对分散网络中的争端解决模型,自动交易,安全交易等模型进行编程,而且这种信任系统模型是开放的。 在多订阅钱包层次结构的参与下进行的所有交易都使我们能够验证交易对手的评级,并保护自己免受经济关系新参与者的欺诈性计划的侵害。

目录内容


1 引言
2 多签名钱包的说明
建立钱包层次结构的 3 种方法
4个多日钱包层次结构界面
5个互动流
5.1 标准交互流程
5.2 安全交互流程
5.3 有争议的互动流程
6 协议ESCB9
7 集成信任系统和实现ESCB9协议的智能合约
8 实施ESCB9的合同示例
8.1 以AirBnb为例,针对私人租赁市场的智能合约
8.2一种智能合约,用于将任何加密货币兑换为法定货币并以去中心化方式返还
9个仲裁节点
10 字典

1.简介


托管服务的主要问题是在所有参与者之间建立信任关系。 此外,参与者本身不一定必须对每个关系主题都了解。 总结所有情况,我们将考虑它们都是匿名的。 对于这种信任的关系系统,重要的是调节新参与者与老参与者的关系。 老参与者在关系系统中已经有了一定的评价,因此可以增强信心。 由于在信任系统中没有人认识任何人,因此这会导致对先前评级的验证出现问题。 本文档介绍了基于多订阅加密钱包的信任系统。 可以将这样的系统编程为智能合约。 鉴于以太坊平台的广泛分布,我们将选择该平台作为描述本文档中所有智能合约的平台。

2.多签名钱包的说明


仅当授权参与者之间达成共识才能做出决定时,才允许您确认或取消交易的抽象称为多签名钱包。 在这种情况下,交易是一种原子操作,被编程为执行另一个或相同智能合约中的方法。

这样的抽象的智能合约的接口可以表示为:

  1. 构造函数接受创始成员的地址和交易所需的最低限度确认数
    constructor(address[]:members, uint256:requiredConfirmationCount) 

  2. 授权参与者界面
    1. 获取参与者列表
       static getMembers() -> address[]:address 

    2. 查看会员地址
       static getMember(uint256:indexNumber) -> address:address 

    3. 会员地址验证
       static isMember(address:address) -> bool:value 

    4. 获取钱包的最大参与者数量
       static getMaxMemberCount() -> uint256:value 

    5. 最低共识确认
       static getRequiredConfirmationCount() -> uint256:value 

    6. 添加新成员的事件
       event MemberAddition() -> address:member 

    7. 成员删除事件
       event MemberRemoval() -> address:member 

    8. 更改事件所需的确认执行数量
       event RequiredConfirmationCountChange() -> uint256:count 

    9. 添加成员
       execute addMember(address:member) -> void:value 

    10. 成员删除
       execute removeMember(address:member) -> void:value 

    11. 会员更换
       execute replaceMember(address:currentMember, address:newMember) -> void:value 
    12. 更改强制执行确认的数量
       execute changeRequiredConfirmationCount(uint256:count) -> void:value 


  3. 交易界面
    1. 在参与者的地址上验证交易确认
       static getConfirmationByAddress(uint256:indexNumber, address:addressMember) -> bool:value 

    2. 从交易中获取信息
       static getTransactionInfo(uint256:indexNumber) -> [address:destination, uint256:value, bytes:data, bool:executed] 
    3. 获取此钱包中的交易总数
       static getTransactionCount() -> uint256:value 
    4. 接收交易确认状态
       static isConfirmed(uint256:transactionId) -> bool:value 
    5. 收到确认数
       static getConfirmationCount(uint256:transactionId) -> uint256:count 
    6. 按类型获取交易数量
       static getTransactionCount(bool:pending, bool:executed) -> uint256:count 
    7. 获取确认交易的参与者列表
       static getConfirmations(uint256:transactionId) -> address[]:confirmations 
    8. 在一段时间内按类型获取交易ID的列表
       static getTransactionIds(uint256:from, uint256:to, bool:pending, bool:executed) -> uint256[]:transactionIds 
    9. 派对交易确认活动
       event Confirmation() -> [address:sender, uint256:transactionId, uint256:timeStamp] 
    10. 交易前参与者确认提款事件
       event Revocation() -> [address:sender, uint256:transactionId, uint256:timeStamp] 
    11. 队列事务添加事件
       event Submission() -> [uint256:transactionId] 
    12. 交易执行事件
       event Execution() -> [uint256:transactionId] 
    13. 交易错误事件
       event ExecutionFailure -> [uint256:transactionId] 
    14. 钱包补货活动
       event Deposit -> [address:sender, uint256:amount] 
    15. 会员添加交易
       execute submitTransaction(address:destination, uint256:value, bytes:data) -> uint256:transactionId 
    16. 参与者确认交易
       execute confirmTransaction(uint256:transactionId) -> void:value 
    17. 参加者撤回确认书
       execute revokeConfirmation(uint256:transactionId) -> void:value 
    18. 手动交易
       execute executeTransaction(uint256:transactionId) -> void:value 



建立钱包层次结构的3种方法


建立信任系统有两种主要方法。 垂直和水平。 水平构建方式意味着由一位主要父母创建一系列孩子钱包。 垂直的构建​​方式隐含了一个由子钱包组成的链,该子钱包涉及父链。 在这种情况下,父钱包可以是另一个父钱包的孩子。
如我们所见,水平施工路径可能是垂直施工路径的一个亚种。 因此,我们进一步将这种方法放在无人看管的位置。

4个多日钱包层次结构界面


为了建立信任系统,有必要扩展上述多订阅钱包的简单界面,添加用于调节层次结构和自动执行确认的机制,以及推迟执行的可能性。
  1. 构造函数接受父钱包的地址,创始成员的地址,交易所需的最低限度确认数,自动确认的标准时间(以秒为单位)
     constructor(address:parent, address[]:members, uint256:requiredConfirmationCount, uint256:standardTimeAutoConfirmation) 

  2. 会员界面
    1. 获取参与者列表
       static getMembers() -> address[]:address 

    2. 查看参与者地址的功能
       static getMember(uint256:indexNumber) -> address:address 

    3. 会员地址验证
       static isMember(address:address) -> bool:value 

    4. 获得钱包参与者的最大数量
       static getMaxMemberCount() -> uint256:value 

    5. 最低共识确认
       static getRequiredConfirmationCount() -> uint256:value 

    6. 添加新成员的事件
       event memberAddition() -> address:member 

    7. 成员删除事件
       event memberRemoval() -> address:member 

    8. 更改事件所需的确认执行数量
       event requiredConfirmationCountChange() -> uint256:count 

    9. 添加成员
       execute addMember(address:member) -> void:value 

    10. 成员删除
       execute removeMember(address:member) -> void:value 

    11. 会员更换
       execute replaceMember(address:currentMember, address:newMember) -> void:value 

    12. 更改强制执行确认的数量
       execute changeRequiredConfirmationCount(uint256:count) -> void:value 


  3. 层次结构界面
    1. 获取儿童钱包列表
       static getChildren() -> address[]:wallets 

    2. 检查钱包地址是否是当前地址的子地址
       static isChild() -> bool:value 

    3. 通过isChild通过对比来检查钱包地址是否是当前地址的父母。
    4. 会员钱包附件活动
       event childAttachment() -> [address:address,uint256:timeStamp] 

    5. 儿童钱包清除活动
       event childRemoval() -> [address:address,uint256:timeStamp] 

    6. 贴上儿童钱包
       execute attachChild(addres:child) -> void:value 

    7. 删除子钱包
       execute removeChild(address:address) -> void:value 

    8. 将一个孩子的钱包换成另一个
       execute replaceChild(address:newAddress) -> void:value 


  4. 交易界面
    1. 检查交易状态
       static getTransactionStatus(uint256:transactionId) -> enum:{submitted,completed,frozen,disputed,reverted} 

    2. 检查交易状态是否合规
       static isTransactionStatus(uint256:transactionId, uint256:enumStatusNumber) -> bool:value 

    3. 在参与者的地址上验证交易确认
       static getConfirmationByAddress(uint256:transactionId, address:addressMember) -> bool:value 

    4. 从交易中获取信息
       static getTransactionInfo(uint256:transactionId) -> [address:destination, uint256:value, bytes:data, bool:executed] 

    5. 获取钱包中的交易总数
       static getTransactionCount() -> uint256:value 

    6. 接收交易确认状态
       static isConfirmed(uint256:transactionId) -> bool:value 

    7. 收到确认数
       static getConfirmationCount(uint256:transactionId) -> uint256:count 

    8. 按类型获取交易数量
       static getTransactionCount(bool:pending, bool:executed) -> uint256:count 

    9. 获取确认交易的参与者列表
       static getConfirmations(uint256:transactionId) -> address[]:confirmations 

    10. 抽出时间进行自动确认
       static getTimeAutoConfirmation(uint256:transactionId) -> uint256:timestamp 

    11. 在一段时间内按类型获取交易ID的列表
       static getTransactionIds(uint256:from, uint256:to, bool:pending, bool:executed) -> uint256[]:transactionIds 

    12. 派对交易确认活动
       event Confirmation() -> [address:sender, uint256:transactionId, uint256:timeStamp] 

    13. 自动交易确认事件
       event AutoConfirmation() -> [uint256:transactionId, uint256:timeStamp] 

    14. 交易前参与者确认提款事件
       event Revocation() -> [address:sender, uint256:transactionId, uint256:timeStamp] 

    15. 队列事务添加事件
       event Submission() -> [uint256:transactionId] 

    16. 交易执行事件
       event Execution() -> [uint256:transactionId] 

    17. 交易错误事件
       event ExecutionFailure -> [uint256:transactionId] 

    18. 交易状态更改为冻结事件
       event TransactionFrozen -> [uint256:transactionId] 

    19. 交易状态更改为争议事件
       event TransactionDisputed -> [uint256:transactionId] 

    20. 交易状态更改为返回的事件
       event TransactionReverted -> [uint256:transactionId] 

    21. 钱包补货活动
       event Deposit -> [address:sender, uint256:amount] 

    22. 添加交易以执行
       execute submitTransaction(address:destination, uint256:value, uint256:TimeAutoConfirmation, bytes:data) -> uint256:transactionId 

    23. 交易确认
       execute confirmTransaction(uint256:transactionId) -> void:value 

    24. 撤销确认
       execute revokeConfirmation(uint256:transactionId) -> void:value 

    25. 将交易状态更改为冻结
       execute setTransactionStatus(uint256:transactionId, uint256:enumStatusNumber) -> void:value 

    26. 手动交易
       execute executeTransaction(uint256:transactionId) -> void:value 


  5. 评分管理
    1. 获得评级
       static getRatingByAddress(address:agent) -> [uint256:negativeRating, uint256:positiveRating, uint256:countRatingRecords] 

    2. 通过地址和序列号获取评分历史
       static getRatingRecordForAddress(address:agent, uint256:indexNumber) -> void:value 

    3. 将记录添加到评分的事件
       event RatingRecordAdded -> [address:author, address:agent, bytes32:smartContractAddress, bool:positiveOrNegative, uin256:ratingNumber, bytes:comment, uint256:indexNumber] 

    4. 将记录添加到地址的评价中
       execute addRatingRecord(address:agent, bytes32:smartContractAddress, bool:positiveOrNegative, uin256:ratingNumber, bytes:comment) -> void:value 


  6. 与ESCB9协议集成
    1. 在地址处检查此钱包附带的智能合约是否为具有ESCB9实现的智能合约
        static isAttachedESCB9SmartContract(address:smartContract) -> bool:result 

    2. 检查此钱包附有ESCB9的智能合约的存款状态
        static getDepositStatusForESCB9SmartContract(address:smartContract) -> enum:{awaiting,founded,returned} 

    3. 与ESCB9钱包实现附加智能合约的事件
       event AttachingESCB9SmartContract -> [address:smartContract] 

    4. 附带ESCB9钱包的智能合约的存款事件
       event ConfirmationForDepositESCB9SmartContract -> [address:smartContract, uint256:sum, bytes:notice] 

    5. 将具有ESCB9实现的智能合约附加到钱包
       execute attachESCB9SmartContract(address:smartContract) -> void:value 

    6. 通过ESCB9实现的智能合约的存款确认。 如果存放在外部系统中,则该通知将带有标签。 如果存款以ETH为单位,则在执行该方法时发送存款金额。
       execute fundDepositForESCB9SmartContract(address:smartContract, uint256:sum, bytes:notice) -> void:value 




5个互动流


任何智能合约都可以集成到多签名钱包的层次结构中。 这样的整合将产生互动流。 一般而言,我们区分几种类型的流:
  • 标准 。 以这种形式,交易自动进行。 没有钱包层次结构的授权成员的参与。
  • 受保护的 。 通过这种形式,交易时间可以从自动确认时间的标准增加到必要的时间。 在这种情况下,钱包层次结构的授权成员必须参与。
  • 有争议的 。 以这种形式,交易参与者可以冻结交易。 在这种情况下,必须建立钱包层次结构的授权成员才能达成共识。

信任系统中的每个钱包都有许多全权参与者,这些参与者都会下达判决。 出于简单的推理,我们将把钱包中的所有授权参与者合并为一个概念- 仲裁器

5.1标准交互流程


为了简化表示,我们将商品和服务的概念引入转移对象(object)的概念,并将法定货币,加密货币的概念引入转移手段(means)的概念。
交易对象(对象的所有者)与交易对象(资金的所有者)进行交易以进行交换。 在这种情况下,对象的所有者通过将标准化交易发送到多签名钱包层次结构中的授权钱包之一来创建智能托管合同。 在这种情况下,该交易由第三方注册为信任系统。 对于每个事务,确定执行的标准时间。 交易对手,即资金的拥有者,通过将资金转移到信托系统来在交易中进行存款。 之后,对象的所有者将对象转移给资金的所有者。 资金的所有者检查对象的质量。 如果在交易时间结束之前他没有确认质量,则将资金作为交易的一部分转移给对象的所有者。 双方都给对方舒适度等级。 因此,资金的所有者可以在交易结束之前更改交互的流程。 在将资金转移给对象的所有者之后,资金的所有者可以在层次结构级别中向更高级别的钱包提出申请,以在法规规定的时间内解决纠纷。 在此时间之后,交易的评级将应用于双方,交易将不可撤消。

5.2安全交互流程


如果由于某些原因超出了交易对手的控制范围,必须延长交易的截止日期,那么,在当事方的同意下,多签名层次结构钱包(仲裁者)可以更改为交易分配的时间。 更改时间后,分配给事务的交互流将返回到标准流的逻辑级别。

5.3有争议的互动流程


如果交易过程中对象的质量不适合交易对手,即他为多签名钱包层次结构的信托系统提供资金的所有者,则交易可能会被冻结。 在这种情况下,直到发布交易判决之前,保证金都不会转移到交易对象的所有者对方。 资金持有人必须向交易的仲裁人提供大量证据。 此后,仲裁员作出有利于交易对方之一的裁决。 如果交易的任何一方对判决不满意,它将按照多重签名钱包层次结构中的顺序转到更高的钱包。 通过所有层次结构实例后,任何一方都可以请求公开投票。 这种例外措施只能由绝对的钱包分配。

6协议ESCB9


Solidity中的ESCB9协议示例作为抽象智能合约(该协议正在开发中,可能会发生更改)
 contract ESCB9 { /** * Modificator for arbitrage */ modifier onlyArbitrage() { require(msg.sender == arbitrage()); _; } /** * Modificator for checking deposit status */ modifier isDeposited { uint i; bytes memory _funcName = bytes4(keccak256("getDepositStatusForESCB9SmartContract(address)")); bytes memory _concat = new bytes(_funcName.length + 32); for(i=0; i < address(this).length; i++) { _concat[i] = address(this)[i]; } require(arbitrage().call.value(0)(_concat) == 1); // “founded” for enum _; } event confirmed(uint256 unixtimestamp, bytes32 notice); event frozen(uint256 unixtimestamp, bytes32 notice); event disputed(uint256 unixtimestamp, bytes32 notice); event canceled(uint256 unixtimestamp, bytes32 notice); /** * @notice Function to approve escrow deal and confirm success * @return Success of operation **/ function confirm(notice) public onlyArbitrage returns(bool); /** * @notice Function to freeze escrow deal * @return Success of operation **/ function freeze(notice) public onlyArbitrage returns(bool); /** * @notice Function to dispute escrow deal * @return Success of operation **/ function dispute(notice) public onlyArbitrage returns(bool); /** * @notice Function to cancel escrow deal and confirm fail * @return Success of operation **/ function cancel(notice) public onlyArbitrage returns(bool); /** * @notice Function to get seller's address * @return Seller's address **/ function seller() public returns(address); /** * @notice Function to get custom type for ESCB9 smart contract * @return Type **/ function type() public returns(bytes); /** * @notice Function to get buyer's address * @return Buyer's address **/ function buyer() public returns(address); /** * @notice Function to get sum for deal * @return Sum of deal in wei **/ function depositedSum() public returns(uint256); /** * @notice Function to get arbitrage's address * @return Arbitrage's address **/ function arbitrage() public returns(address); } 


7集成信任系统和实现ESCB9协议的智能合约


要在您自己的项目中使用多重签名钱包的层次结构的信任系统,您需要创建一个实现ESCB9标准的智能合约,并将这种智能合约附加到没有附属钱包的仲裁者之一。 多订阅层次结构中的此类钱包称为“输入节点”。 所有上游多重签名钱包均称为“仲裁节点”。

8实施ESCB9的合同示例


8.1以AirBnb为例,针对私人租赁市场的智能合约


 // Don't use this code, it can be not working or contain the vulnerability, for demonstration purpose only pragma solidity ^0.4.21; /// @title rentMyApartmentESCB9 - Allows rent object on market with escrow service. The safe way to do deal for counterparties. /// @author Konstantin Viktorov - <ceo@escrowblock.net> contract rentMyApartmentESCB9 is ESCB9 { // 2018-05-10 18:25 in unix timestamp uint256 constant public checkInTime = 1525965900; // 2018-05-20 18:25 in unix timestamp uint256 constant public checkOutTime = 1526829900; // Coordinates in bytes format. For example 56.865129,35.881540 bytes constant public coordinates = "0x35362e3836353132392c33352e383831353430"; // Google maps link, as example, but better add Url to landing page bytes constant public externalUrl = "0x68747470733a2f2f676f6f2e676c2f6d6170732f6e783563396b6737384170"; /** * Encrypted information, see https://github.com/ethereumjs/ethereumjs-wallet and * https://github.com/pubkey/eth-crypto/blob/master/tutorials/encrypted-message.md * For example you can leave here information about pin-code for smart lock **/ bytes constant private privateInformation = '0x0dfef623523483245687234'; modifier only_before_check_in { require(getNow() < checkInTime); _; } modifier only_after_check_out { require(getNow() > checkOutTime); _; } modifier only_during_renting { require(getNow() > checkInTime && getNow() < checkOutTime); _; } modifier only_not_in_during_renting { require(getNow() < checkInTime && getNow() > checkOutTime); _; } /** * @notice ESCB9 interface * @notice Function to get address of apartment owner * @return Seller's address **/ function seller() public returns(address) { return "0x27a36731337cdee360d99b980b73e24f6e188618"; } /** * @notice ESCB9 interface * @notice Function to get custom type for ESCB9 smart contract * @return Type **/ function type() public returns(bytes) { return "rent"; } /** * @notice ESCB9 interface * @notice Function to get address of renter * @return Buyer's address **/ function buyer() public returns(address) { return "0xb582baaF7e749d6aA98A22355A9d08B4c4d013C8"; } /** * @notice ESCB9 interface * @notice Function to get sum for deal * @return Sum of deal in wei **/ function depositedSum() public returns(uint256) { return 1000000000000000000; //1 ETH in weis } /** * @notice ESCB9 interface * @notice Function to get arbitrage's address * @return Arbitrage's address **/ function arbitrage() public returns(address) { return "0xe91065d8bb2392121a8fbe6a81e79782fbc89dd4"; } /** * @notice ESCB9 interface * @notice Function to approve escrow deal and confirm success * @param Some comment * @return Success of operation **/ function confirm(notice) public onlyArbitrage only_after_check_out returns(bool) { confirmed(getNow(), notice); } /** * @notice ESCB9 interface * @notice Function to freeze escrow deal * @param Some comment * @return Success of operation **/ function freeze(notice) public onlyArbitrage only_during_renting returns(bool) { frozen(getNow(), notice); } /** * @notice ESCB9 interface * @notice Function to dispute escrow deal * @return Success of operation **/ function dispute() public onlyArbitrage only_after_check_out returns(bool) { disputed(getNow(), notice); } /** * @notice ESCB9 interface * @notice Function to cancel escrow deal and confirm fail * @return Success of operation **/ function cancel() public onlyArbitrage only_not_in_during_renting returns(bool) { canceled(getNow(), notice); } /** * @notice Get current unix time stamp **/ function getNow() constant public returns (uint) { return now; } /** * @notice Get private information when renter will pay deposit **/ function getPrivateInformation() constant isDeposited public returns (bytes) { return privateInformation; } } 


8.2一种智能合约,用于将任何加密货币兑换为法定货币并以去中心化方式返还


下文描述的智能合约示例使您无需交换者和第三方服务即可直接用BTC兑换法定货币。 BTC卖方将智能合约中的金额转移到BTC区块链中的存款中。 买方在确认仲裁员的押金后,自动将合同中规定的金额转入合同中包含的帐户或塑料卡号。 一名参与者提出上诉后,仲裁员可以介入交易过程。 最初,定金将被冻结,如果各方不同意达成共识,则该合同将成为有争议的,并进一步解决有争议的互动流程。
 // Don't use this code, it can be not working or contain the vulnerability, for demonstration purpose only pragma solidity ^0.4.21; /// @title p2pExchangeESCB9 - Allows exchanging any cryptocurrencies on fiat money and back, directly between users. The safe way to do deal for counterparties. /// @desc This example shows as exchange fiat money on BTC (forward flow) /// @author Konstantin Viktorov - <ceo@escrowblock.net> contract p2pExchangeESCB9 is ESCB9 { // in minimal decimals, for example, 500.000 rubles is equal 50000000 kopeks uint256 constant public inputAmount = 50000000; // RUR in bytes bytes constant public inputCurrency = "0x525552"; // in minimal decimals, for example, 1 BTC is equal 100000000 satoshi uint256 constant public outputAmount = "100000000"; // BTC in bytes bytes constant public outputCurrency = "0x425443"; // Deposit can be place only before this time const bytes public closeTime = "1526829900"; // use "forward" way, when output currency will be deposited or "backward" if input currency will be deposited uint256 constant public depositWay = "forward"; /** * Encrypted information, see https://github.com/ethereumjs/ethereumjs-wallet and * https://github.com/pubkey/eth-crypto/blob/master/tutorials/encrypted-message.md **/ /** * Encrypted information for placing deposit, for example BTC address **/ bytes private externalDepositAddress = "0x3139333978476346484d6f464b465845564754415761706b3537694e6a3579556b52"; /** * Encrypted information for the amount of deposit, for example for BTC 8 decimals can be added 2-3 chars from 0-9 as pin-code for deal. See more in EscrowBlock WhitePaper * If output amount is equal 100000000, then deposited amount can be 100000123 **/ bytes private externalDepositAmount = "0x5f5e17b"; /** * Encrypted information for sending amount to seller, for example credit card number or bank account, for example 4242424242424242 **/ bytes private externalIncomingAddress = "0xf12765df4c9b2"; modifier only_before_close_time { require(getNow() < closeTime); _; } modifier only_after_close_time { require(getNow() > closeTime); _; } /** * @notice ESCB9 interface * @notice Function to get address of apartment owner * @return Seller's address **/ function seller() public returns(address) { return "0x27a36731337cdee360d99b980b73e24f6e188618"; } /** * @notice ESCB9 interface * @notice Function to get custom type for ESCB9 smart contract * @return Type **/ function type() public returns(bytes) { return "exchange"; } /** * @notice ESCB9 interface * @notice Function to get address of renter * @return Buyer's address **/ function buyer() public returns(address) { return "0xb582baaF7e749d6aA98A22355A9d08B4c4d013C8"; } /** * @notice ESCB9 interface * @notice Function to get sum for deal * @return Sum of deal in minimal decimals **/ function depositedSum() public returns(uint256) { rerurn outputAmount; } /** * @notice ESCB9 interface * @notice Function to get arbitrage's address * @return Arbitrage's address **/ function arbitrage() public returns(address) { return "0xe91065d8bb2392121a8fbe6a81e79782fbc89dd4"; } /** * @notice ESCB9 interface * @notice Function to approve escrow deal and confirm success * @param Some comment * @return Success of operation **/ function confirm(notice) public onlyArbitrage only_after_close_time returns(bool) { confirmed(getNow(), notice); } /** * @notice ESCB9 interface * @notice Function to freeze escrow deal * @param Some comment * @return Success of operation **/ function freeze(notice) public onlyArbitrage only_after_close_time returns(bool) { frozen(getNow(), notice); } /** * @notice ESCB9 interface * @notice Function to dispute escrow deal * @return Success of operation **/ function dispute() public onlyArbitrage only_after_close_time returns(bool) { disputed(getNow(), notice); } /** * @notice ESCB9 interface * @notice Function to cancel escrow deal and confirm fail * @return Success of operation **/ function cancel() public onlyArbitrage only_before_close_time returns(bool) { canceled(getNow(), notice); } /** * @notice Get current unix time stamp **/ function getNow() constant public returns (uint) { return now; } /** * @notice Get private information for buyer when seller sent deposit **/ function getExternalIncomingAddress() constant isDeposited public returns (bytes) { return externalIncomingAddress; } /** * @notice Get private information about amount for seller for sending deposit **/ function getExternalDepositAmount() constant public returns (bytes) { return externalDepositAmount; } /** * @notice Get private information about address for seller for sending deposit **/ function getExternalDepositAddress() constant public returns (bytes) { return externalDepositAddress; } } 


9个仲裁节点


为了维护信任系统的工作,引入了多个签名钱包的层次结构。 仲裁节点,即层次结构中具有子钱包的此类钱包,充当争端解决的保证人。 此类节点的全权代表只能由上级任命。 每个授权参与者通过分配有争议的互动流程而获得的红利和奖金,将获得奖励。 奖金数额由共识决定。
为了获得仲裁节点中授权参与者的状态,必须在授权参与者的地址上具有共识定义的令牌数量。因此,保证了仲裁节点的所有参与者稳定地接收股息。多签名钱包的层次结构越高,授权参与者的地址上应出现的令牌越多。

10字典


以太坊是一种开源技术,可让您创建去中心化,不变的交易链。可以在智能合约中记录的某些条件下执行每个交易。
智能合约 -用Solidity编写,在以太坊虚拟机中执行的逻辑,使您能够扩展交易逻辑。
多签名钱包(仲裁者)是一种特殊的智能合约,由一组可以确认或取消交易的授权参与者控制。使用多订阅钱包机制,您可以创建用于交易的网关链,并及时监控执行或退款。
对象的所有者-是房东,供应商,软件产品的开发人员等。即,出售对象并最终获得保证金的人。
资金所有者 -是软件产品的承租人,购买者,客户等。也就是说,将资金存入对象以购买产品或服务的人。

Source: https://habr.com/ru/post/zh-CN412655/


All Articles