sbp – sbp公司区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,sbp – sbp公司区块链毕设代写 是一篇很好的国外资料

sbp

Decentralized sports & event betting platform powered by Ethereum smart contracts and automated market making.

Core Concepts

Event creation

New betting events will initially be created by the founding team by calling a createEvent method on the smart contract. In the future, this event data could be requested from a Chainlink oracle.

Betting

Any Ethereum wallet can place bets on an event by calling the placeBet method on the smart contract and sending a bet option and wager amount in the form of ETH tokens.

This process will be facilitated by a web app which displays all events eligible for betting and allowing users to claim payouts for won bets.

Users will transfer funds and interact with the smart contract by connecting a Metamask wallet.

Outcome reporting

Outcome reporting data will be sourced from Chainlink oracles.

Staking

In order to create a highly liquid market, the platform will incentivize users to stake funds into a liquidity pool, which will be used to payout winning bets. Having a highly liquid pool ensures that, no matter which side wins a bet, there is enough ETH in the pool to pay out all the winners, even if the platform loses money overall.

To incentivize stakers, the platform can offer a percentage cut of the platform fee to the liquidity pool, where each liquidity provider earns a staking reward in proportion to the amount of ETH they are staking relative to the overall pool.

With this model, early stakers will potentially make up a large percentage of the liquidity pool and therefore earn high rewards, but as more stakers add liquidity, it will lower the early stakers’ earnings, as they now make up a smaller percentage of the liquidity pool.

This creates a self-correcting system — in scenarios where there is a low amount of liquidity, people will be more incentivized to stake because rewards will be higher; in contrast, in scenarios where there is excess liquidity, rewards will be lower, incentivizing stakers to exit the liquidity pool and deploy their capital into something more productive.

Odds making

One of the main project challenges is defining the initial payout odds for an event, which in traditional sports betting is usually done by a combination of proprietary computer algorithms and “experts”.

These initial odds could potentially be informed using Chainlink oracles to get the initial sports betting odds defined by Vegas and global sportsbooks.

Another approach is to allow anyone on the platform to create a new betting market for an event (for which the odds will be auto-adjusted as bets come in from both sides), and staking an amount of ETH into the pool to sufficiently cover payouts for either result.

With this model, odds makers will be incentivized to set the initial odds to align as closely as possible with the real world expected outcome in order to maximize their profit by having a balanced book; this is reflective of how most traditional sportsbooks make money.

Passive earning

The platform can move betting pool funds into a decentralized lending platform like Aave or Compound and earn interest from borrowers. This passive interest earning can be passed off to users of the platform in the form of better odds payouts and/or a betting rewards system.

Betting rewards system

The platform can incentivize users to place bets by rewarding every placed bet with a number of reward points proportional to the size of the bet. Points could later be redeemed for ETH by calling the redeemPointsForEth method on the smart contract. These points could be tracked directly on the blockchain in a mapping of address => pointsEarned. Alternatively, the rewards points could be tokenized, allowing users to trade rewards tokens freely across wallets.

Governance

The platform will initially be bootstrapped and governed in large part by the founding team. As the community grows and the platform matures, governance will be incrementally transferred over to the community in the form of a decentralized autonomous organization (DAO).

Holders of a platform-minted ERC20 governance token may cast votes to adopt and reject new proposals to the platform protocol.

Governance token distribution

The governance token could be distributed as a reward to odds makers for maintaining platform events, proportional to the number of events they maintain relative to the total number of events on the platform.

Plan

The development and launch of the platform will be split into several phases as detailed below:

Phase 0

  • Define platform protocol

Phase 1

  • Build Ethereum smart contract with the following features:
    • Accept tokenized bets from addresses on outcome of games
    • Allow bettors to claim payouts for bets won
    • Payout winning bettors using static 1:1 payout odds
  • Build web app front end with the following features:
    • Connect to Metamask wallet
    • Display all scheduled NBA games eligible for betting
    • Accept bets on outcome of games
    • Display current bets for connected wallet addresses
  • Deploy contract to Ethereum Testnet

Phase 2

  • Implement automated market making
  • Use third-party Chainlink oracles to source score data
  • Add automated testing to validate smart contract edge scenarios
  • Solidify fees and business model

Phase 3

  • Deploy contract to Ethereum mainnet

Contributing

Install and run Ganache.

Clone the repository:

$ git clone https://github.com/angelle-sw/sbp

Create a .env file in the root of your repository:

TEST_ENDPOINT=<endpoint> WALLET_MNEMONIC=<wallet-mnemonic> WALLET_INDEX=<wallet-index>

Install dependencies:

$ yarn

Compile contracts:

$ yarn compile

Run migrations:

$ yarn migrate

Run tests (implicitly compiles contracts and runs migrations before running):

$ yarn test

We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.


sbp

核心概念

事件创建

投注

结果报告

投注

被动收益

博彩奖励系统

治理

管理令牌分配

计划

第0阶段

阶段1

第2阶段

贡献

基本cookies
始终处于活动状态
分析cookies
  • 定义平台协议
  • 构建以太坊eth智能合约,具有以下功能:接受来自地址的令牌化投注游戏结果允许投注者使用静态1:1赔付赔率为赢注的投注者申请赔付
  • 接受来自游戏结果地址的标记化投注
  • 允许投注者使用静态1:1赔付赔率来申领中奖投注者的赔付
  • 使用静态1:1赔付赔率构建web应用前端功能:Connect to Metamask wallet显示符合投注条件的所有预定NBA比赛接受对游戏结果的投注显示连接钱包地址的当前赌注
  • 连接到Metamask钱包
  • 显示所有预定的符合投注条件的NBA比赛
  • 接受对比赛结果的投注
  • 显示当前对已连接钱包地址的赌注
  • 将合同部署到以太坊eth测试网
  • 实施自动做市
  • 使用第三方链链接oracles获取得分数据
  • 添加自动测试以验证智能合约边缘场景
  • 巩固费用和商业模式
  • 部署与以太坊eth主网签订合同
  • 以太坊eth智能合约和自动做市为动力的分散式体育赛事博彩平台。

    核心概念

    事件创建

    新的投注事件最初将由创始团队通过调用智能合约上的createEvent方法来创建。在以后的事件中,oracle可能会请求一个数据链。

    投注

    任何以太坊eth钱包都可以通过调用智能合约上的placeBet方法,以ETH代币的形式发送下注选项和下注金额,对某个事件下注。

    这一过程将由一个web应用程序提供帮助,该应用程序显示所有符合投注条件的事件,并允许用户为中奖赌注申领奖金。

    用户将通过连接Metamask钱包转移资金并与智能合约交互。

    结果报告

    结果报告数据将来自链链接oracle。

    投注

    为了创造一个高流动性的市场,该平台将激励用户将资金投入流动性池,用于支付中奖赌注。拥有一个高流动性的池可以确保,无论哪一方赢得赌注,池中都有足够的以太币支付所有赢家,即使平台整体亏损。

    为了激励staker,平台可以向流动性池提供一定比例的平台费用削减,其中每个流动性提供者根据其所下注的ETH相对于整体池的金额获得一个赌注奖励。

    在这种模式下,早期投资者可能会在流动性池中占很大比例,因此会获得高回报,但随着更多的投资者增加流动性,这将降低早期投资者的收益,因为他们现在在流动性池中所占的比例较小。

    这就形成了一个自我修正系统——在流动性较低的情况下,人们会更积极地参与投资,因为回报会更高;相反,在流动性过剩的情况下,回报会更低,激励投资者退出流动性池,并将其资本配置到更具生产力的领域。

    被动收益

    项目的主要挑战之一是确定赛事的初始赔付概率,在传统的体育博彩中,这通常是由专有的计算机算法和“专家”组合完成的。

    这些初始赔率可能会通过使用链接oracles得到拉斯维加斯和全球体育图书公司定义的初始体育博彩赔率。

    另一种方法是允许平台上的任何人为某个事件创建一个新的投注市场(在双方投注时,赔率将自动调整),并在池中下注一定数量的以太币,以充分支付任何一个结果的支出。

    通过这种模式,赔率制定者将被激励设定初始赔率,使其尽可能与现实世界的预期结果保持一致,以便通过平衡账簿实现利润最大化;这反映了大多数传统体育书籍是如何赚钱的。

    博彩奖励系统

    该平台可以将博彩池资金转移到分散的借贷平台(如Aave或Compound)中,并从借款人那里获得利息。这种被动的利息收入可以通过更好的赔率支付和/或投注奖励系统的形式传递给平台的用户。

    治理

    该平台可以激励用户下注,通过奖励每一次下注,奖励点数与下注规模成比例。稍后,可以通过调用智能合约上的RequirePointsForth方法将点数兑换为ETH。这些点可以直接在区块链blockchain上的地址映射中跟踪。另外,奖励积分可以标记化,允许用户在钱包之间自由交易奖励代币。

    管理令牌分配

    该平台最初将由创始团队引导和管理。随着社区的发展和平台的成熟,治理将以分散自治组织(DAO)的形式逐渐转移到社区。

    平台铸造ERC20治理代币的持有人可以投票通过和拒绝平台协议的新提案。

    计划

    管理令牌可以作为奖励分发给维护平台事件的赔率制造者,与他们维护的事件数量相对于平台上的事件总数成比例。

    第0阶段

    平台的开发和发布将分为以下几个阶段:

    阶段1

    • 定义平台协议

    第2阶段

    • 构建以太坊eth智能合约,具有以下功能:接受来自地址的令牌化投注游戏结果允许投注者使用静态1:1赔付赔率为赢注的投注者申请赔付
    • 连接到Metamask钱包
    • 实施自动做市

    贡献

    • 使用第三方链链接oracles获取得分数据
    • 添加自动测试以验证智能合约边缘场景
    • 巩固费用和商业模式
    • 部署与以太坊eth主网签订合同

    基本cookies

    • Deploy contract to Ethereum mainnet

    始终处于活动状态

    安装并运行Ganache。

    克隆存储库:

    $ git clone https://github.com/angelle-sw/sbp

    在存储库的根目录下创建一个.env文件:

    TEST_ENDPOINT=<endpoint> WALLET_MNEMONIC=<wallet-mnemonic> WALLET_INDEX=<wallet-index>

    安装依赖项:

    $ yarn

    编译合同:

    $ yarn compile

    运行迁移:

    $ yarn migrate

    运行测试(在运行之前隐式编译合同并运行迁移):

    $ yarn test

    我们使用可选的第三方分析cookies来了解你如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。

    部分转自网络,侵权联系删除区块链源码网

    www.interchains.cc

    https://www.interchains.cc/19116.html

    区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
    区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » sbp – sbp公司区块链毕设代写

    提供最优质的资源集合

    立即查看 了解详情