前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >DeFi质押流动性挖矿系统逻辑开发方案|DeFi流动性质押模式Python抓取开发

DeFi质押流动性挖矿系统逻辑开发方案|DeFi流动性质押模式Python抓取开发

原创
作者头像
用户V_StPv888
发布2022-07-06 11:35:10
3190
发布2022-07-06 11:35:10
举报
文章被收录于专栏:开发大于一切开发大于一切

  什么是流动性mining?流动性mining主要是通过提供通证资产进而获取收益。简单来说就是,存入某些通证资产便可对其进行mining。存入某些通证资产便可对其进行mining。之所以会被称为mining也是因为保留了BTCmining的行业说法。

  为什么需要流动性池?

  这些是做市商随时准备买卖任何必要的资产,以确保交易者不必等待其他方出现。基本上,做市商确保市场上始终存在流动性。

  In a typical centralized exchange setup,trading involves the use of an order book model.This model has triggered a need for market makers to help promote trading and maintain a balance between trading pairs.These market makers are ready to buy and sell any necessary assets at any time to ensure that traders do not have to wait for other parties to appear.Basically,market makers should ensure that there is always liquidity in the market.

  但是在DeFi交易中,结合订单簿模型和做市商非常困难,维护成本高,需要大量交易时间。这就是为什么通过智能合约启动自动做市商(AMM)模型来开发DeFi流动性池的原因。

  区块链中,通过工作量证明机制解决了这个互不信任的分布式网络如何在各方利益都能得到确保的情况下达成一致共识的难题。

  (1)请求(request):客户端向主节点发送请求调用服务。

  (2)预准备(pre-prepare):主节点0收到客户端的请求后将其组播给其他副本,即0->123。

  (3)准备(prepare):复制节点1、2、3收到请求后记录,并再次组播给其他复制节点,即1->023、2->013,复制节点3因为宕机失效无法进行组播。

  (4)确认(commit):0、1、2、3节点在prepare阶段,若收到超过一个数量的相同请求,则进入commit阶段,组播commit请求,即0->123、1->023、2->013。

  (5)回复(reply):0、1、2、3节点在commit阶段,若收到超过一定数量的相同请求,则对

  什么是区块链技术?区块链技术包含哪些呢?区块链在数据资产管理和流通中发挥了什么作用呢?

  一、什么是区块链技术

  区块链定义:

  区块链是英文“Blockchain”的翻译,这是一个合成词,原始的意思是由多个区块组成的链。广义上讲,区块链是利用链式数据区块结构验证和存储数据,利用分布式的共识机制和数学算法集体生成和更新数据,利用密码学保证了数据的传输和使用安全,利用自动化脚本代码(智能合约)来编程和操作数据的一种全新的去中心化的基础架构与分布式计算范式。

  Blockchain is an innovative application mode of consensus algorithm,asymmetric encryption algorithm,distributed storage technology,P2P network technology and other computer technologies in the Internet era.Blockchain data is jointly maintained by all nodes,and each node participating in the maintenance can copy and obtain a copy of a complete record,which can realize the distributed establishment of a set of trust mechanism in a weak trust environment without a central authority,Ensure that the data in the system is open,transparent,traceable and difficult to be illegally tampered with.

  二、区块链技术包含哪些

  区块链技术,主要包括:

  分布式存储技术。分布式存储相关技术源于分布式存储系统对于数据分散存储过程中使用的技术,It includes distributed storage,distributed computing,cap theory,consensus algorithm,etc.this technology is used to solve the problems of data storage,backup,fault tolerance and consistency of distributed systems.

  共识算法。区块链作为一种分布式系统,是由多个主机节点通过异步通信方式组成的网络集群,其节点之间需要进行状态复制以保证主机达成一致状态共识。每个区块包含链上前一个区块内容计算出来的哈希值,Modifying any character of any block can lead to the mismatch between the subsequent calculated hash value and the record of the next block,which is easy to be detected by other nodes.Only modifying the contents of all subsequent blocks on the chain can ensure the integrity of the blockchain,但这是一个成本极高或者不可能完成的事情,从而保证了数据的不可篡改性。

  非对称加密算法。非对称加密算法主要用公钥和私钥对数据的存储和传输的加密和解密。非对称加密技术在区块链的应用场景主要包括信息加密、数字签名和登录认证等。区块链系统中涉及到非对称加密算法主要有RSA、D-H、ECC(椭圆曲线加密算法)。

  Timestamp.A timestamp is usually a sequence of characters that identifies the time of a moment.Specifically,it is a complete and verifiable"mark"that can indicate that a piece of data has existed before a certain time.The timestamp in the blockchain is an unalterable record of all events occurring at a certain time in the blockchain database.

  智能合约。智能合约是由事件驱动的、具有状态的、运行在可复制的共享区块链数据账本上的一段计算机代码程序。该程序代码是现实世界中合约和规则的算法实现,能够实现主动或被动的处理数据,控制和管理各类链上数据资产等功能。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
区块链
云链聚未来,协同无边界。腾讯云区块链作为中国领先的区块链服务平台和技术提供商,致力于构建技术、数据、价值、产业互联互通的区块链基础设施,引领区块链底层技术及行业应用创新,助力传统产业转型升级,推动实体经济与数字经济深度融合。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档