Code Monkey home page Code Monkey logo

bepro-js-edge's People

Contributors

bepro-bot avatar clarkjoao avatar hvasconcelos avatar lsilvaporto avatar luisclark avatar marcusviniciuslsantos avatar moshmage avatar rodrigosous-a avatar taikaici avatar testetaikai avatar vhcsilva avatar vhcsilva09 avatar webappbot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

bepro-js-edge's Issues

Create 2 more tabs on the Documentation Page

Description

Add 2 pages below Documentation [Readme.md]

  • Contributing [Contributing.md]
  • Rules [Rules.md]

Screenshot 2021-05-25 at 12 37 43

Add information on Contributing with the info below :

  1. How to create a new feature/contract/product [Non Developer]
  2. How to create a new feature/contract/product [Developer]
  3. How to be part of an issue [Developer]
  4. How to review an issue [Developer]
  5. How to use the code available [Developer]
  6. How to use $BEPRO [Validator]

Smart Contract - Marketplace NFTs [@RealFevr]

Description
Simple Marketplace similar to opensea for basic Sale Use of NFTs
The goal is also to make it agnostic

Features

  • Get NFTs on Sale getAllOnSale() - this has to be done off-chain via the events "SaleCreated" & "SaleCanceled"
  • Put NFT on Sale putERC721OnSale(tokenId, price)
  • Remove NFT from sale removeERC721FromSale(tokenId)
  • Buy NFT buy(tokenId)
  • Set Fee structure for all txs [Admin] setFixedFees(address, percentage)
  • Change currency available to use - ERC20 [Admin] changeERC20(currencyAddress)

Object
ERC721Marketplace

Wiki [first version]

Have a wiki with everything explained should anyone need to understand certain aspects from the project or the dev environment setup and usage, tests etc.

Smart Contracts for Bet Settlement

A Traditional Gambling platform wishes to bring all of its settlement on chain by creating its own oracle, smart contracts & liquidity pools. This will be launched on Polygon.

Users connect wallet to the gambling platform e.g. via metamask. The gambling platform already exists but for tradional fiat so will require integration at a later stage. I am not seeking a solution here. Users are able to browse events and select outcomes they would like to bet on. When they submit a bet, they submit a smart contract.

The smart contract contains the selection, the odds & the stake along with the terms of settlement. In order for the information to be confirmed, it checks the market registry to confirm market has been created, and the smart contract then needs to call the oracle to confirm the odds are correct, the size of the stake is acceptable and that wallet is whitelisted.

If the bet is approved because the terms are correct, the funds get matched by funds from the platforms own liquidity pool. Initially this pool is USDT. The pool then pays out the bet if it wins and If it doesn't it keeps the funds.

There is a lot more complexity to the pools but at this early stage I would like to receive quotes to create the template smart contracts for the bets, the liquidity pool and also how we could run our own oracle.

As more background, I am a professional gambler with 10+ years experience in betting. I am looking for a highly motivated co founder who can help with the technichal side to this project.

Available examples
Sportx.bet smart contracts are a good place to start.

Bounty
There is a bounty of up to $15,000 in BEPRO tokens to create the concept

Smart Contract - Marketplace NFTs [@RealFevr]

Description
Simple Marketplace similar to opensea for basic Sale Use of NFTs
The goal is also to make it agnostic

Features

  • Get NFTs on Sale getAllOnSale() - this has to be done off-chain via the events "SaleCreated" & "SaleCanceled"
  • Put NFT on Sale putERC721OnSale(tokenId, price)
  • Remove NFT from sale removeERC721FromSale(tokenId)
  • Buy NFT buy(tokenId)
  • Set Fee structure for all txs [Admin] setFixedFees(address, percentage)
  • Change currency available to use - ERC20 [Admin] changeERC20(currencyAddress)

Object
ERC721Marketplace

Create Vue app for bepro-js documentation

Describe the feature or project
The current JSDoc solution is a pain to update and redesign, and while it serves its "quick to market" purpose it does not satisfy as an actual tool developers use;

To fix this, we should create a Vue2 (typescript) application that's able to digest the documentation from bepro-js and serve it under a github-pages website.

We can achieve this by connecting the two repositories with a dispach_event signal, checking out bepro-js repository, build the vue application and deploy a github website.

We'll make use of kaorun343/vue-property-decorator in junction with class-component notation and jsdoc-json.

E2E for the application should be made with cypress

High level flows

image

image


This vue-app repo will then be forked by bepronetwork so we can use the main github-pages website

Bounty
Bragging rights

Create 2 more tabs on the Documentation Page

Description

Add 2 pages below Documentation [Readme.md]

  • Contributing [Contributing.md]
  • Rules [Rules.md]

Screenshot 2021-05-25 at 12 37 43

Add information on Contributing with the info below :

  1. How to create a new feature/contract/product [Non Developer]
  2. How to create a new feature/contract/product [Developer]
  3. How to be part of an issue [Developer]
  4. How to review an issue [Developer]
  5. How to use the code available [Developer]
  6. How to use $BEPRO [Validator]

Smart-Contract - MiningERC20

Description

Raising capital with ERC20s is completely broken for retail investors
Private sale investors invest at a nominal price
Where fomo kicks in in general platforms like bscpad, polkastarter, coinlist and others
We need a system where products come before the 1st token is minted
The goal of this smart contract is to be easy to integrate with other defi smart contracts so that after they are built users can redeem their tokens on the ecosystem by using the platform - creating a fair way of distributing the token
This should be easy to import into another smart contract where by using the main product smart contract, this one can be called to allocate tokens later redeemable by the platform user.

This should tie to a mint function of the ERC20 in question (of the project) & the Main product smart contract (of the project)

Create a Lending Protocol [ala @Compound.Finance]

Describe the feature or project
Create a simple ERC20 only Protocol where users can borrow until 20% of what they lended initially.
Only ERC20 should be allowed, and you can borrow one ERC20 against other ERC20

Information information :

  • Only ERC20 Tokens that are present in Uniswap with a pair against ETH should be available
  • Ratio of exchange between the borrowed ERC20 Token & the lended ERC20 should be gotten directly from uniswap v3 solidity API (direct solidity calls - against the current price in ETH)
  • Users should have to pay a 1% fee each month to keep their principal available
  • You should be able to lend the protocol funds and get a variable APR based on the amount of borrowers value paid in fees each month

Available examples
compound.finance

Bounty
$100k BEPRO

Who are we
Bepro.Network (BetBlock Technology LDA)

[IP] ERC20TokenLock accept multiple token locks

Improvement proposal on ERC20TokenLock to accept multiple token locks from the same user as long as release date is the same or later into the future, user adds up to his locked tokens stake.

Node version locked to 14.17.0

Describe the bug

When trying to install the package on my container, running on nodejs 14.17.5 (image is using nodejs 14.x), got an error
error [email protected]: The engine "node" is incompatible with this module. Expected version "14.17.0". Got "14.17.5"

Reproduction

  1. Using a container built with image https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.14
  2. Run yarn add bepo-js
  3. Got error described

Expected behavior

Install ok.

Logs, screenshots

docker@2ce4719310f5:/usr/src/app$ node -v
v14.17.5
docker@2ce4719310f5:/usr/src/app$ yarn add bepro-js
yarn add v1.22.5
[1/4] Resolving packages...
warning bepro-js > [email protected]: ๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
warning bepro-js > [email protected]: use String.prototype.padStart()
warning bepro-js > [email protected]: ๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
warning bepro-js > babel-cli > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning bepro-js > mocha > [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
warning bepro-js > ipfs-http-client > [email protected]: This module has been superseded by @ipld/dag-cbor and multiformats
warning bepro-js > ipfs-http-client > [email protected]: This module has been superseded by @ipld/dag-pb and multiformats
warning bepro-js > ipfs-http-client > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > babel-plugin-transform-runtime > babel-runtime > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning bepro-js > babel-cli > babel-register > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning bepro-js > babel-cli > babel-polyfill > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning bepro-js > babel-cli > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning bepro-js > ipfs-http-client > ipld-dag-cbor > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > ipfs-http-client > ipld-dag-pb > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > ipfs-http-client > ipld-raw > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > jsdoc-template > gulp-css-base64 > [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning bepro-js > jsdoc-template > gulp-css-base64 > [email protected]: request has been deprecated, see request/request#3142
warning bepro-js > web3 > web3-bzz > swarm-js > [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
warning bepro-js > web3 > web3-eth > web3-eth-accounts > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning bepro-js > web3 > web3-eth > web3-eth-ens > content-hash > [email protected]: stable api reached
warning bepro-js > web3 > web3-eth > web3-eth-ens > content-hash > cids > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > web3 > web3-eth > web3-eth-ens > content-hash > multihashes > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > web3 > web3-bzz > swarm-js > eth-lib > servify > [email protected]: request has been deprecated, see request/request#3142
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
error [email protected]: The engine "node" is incompatible with this module. Expected version "14.17.0". Got "14.17.5"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command

versions, packages, etc
Node : 14.17.5

Smart Contract - Collectibles NFT [@RealFevr]

Requester
Real Fevr (https://fantasy.realfevr.com/)

Description
A decentralized NFT Factory where users are able to open packs with football events

Master Variables

  1. realFvrTokenAddress (Real Fvr Token Address) address
  2. admin (onlyOwner modifier) address
  3. realfvrTokenPriceInUSD uint256
  4. packs Structure

Libraries to Inherit

  • Ownable
  • ERC721
  • ERC1151
  • ERC20 (to access the real fvr token)

Features

  • createPacks(paks_number, nfts_per_pack, price, series, drop, pack_type, initial_id) [ADMIN]
  • editPackLimit(pack_type, series, drop) [ADMIN]
  • deletePacks(pack_type, series, drop)
  • deletePacksById(packIds)
  • getPacks(pack_type, series, drop)
  • getPacksByAddress(address)
  • getPackbyId(pack_id)
  • setPackPrice(pack_type, price, series, drop) [ADMIN]
  • setTokenPriceInUSD(price_in_usd) [ADMIN]
  • countOpenedPacks(pack_type, series, drop)
  • countClosedPacks(pack_type, series, drop)
  • offerPack(pack_type, series, drop, amount, dest_wallet) [ADMIN]
  • buyPack(pack_type, series, drop)
  • openPack(pack_id)

Create a Lending Protocol [ala @Compound.Finance]

Describe the feature or project
Create a simple ERC20 only Protocol where users can borrow until 20% of what they lended initially.
Only ERC20 should be allowed, and you can borrow one ERC20 against other ERC20

Information information :

  • Only ERC20 Tokens that are present in Uniswap with a pair against ETH should be available
  • Ratio of exchange between the borrowed ERC20 Token & the lended ERC20 should be gotten directly from uniswap v3 solidity API (direct solidity calls - against the current price in ETH)
  • Users should have to pay a 1% fee each month to keep their principal available
  • You should be able to lend the protocol funds and get a variable APR based on the amount of borrowers value paid in fees each month

Available examples
compound.finance

Bounty
$100k BEPRO

Who are we
Bepro.Network (BetBlock Technology LDA)

Smart Contract - Collectibles NFT [@RealFevr]

Requester
Real Fevr (https://fantasy.realfevr.com/)

Description
A decentralized NFT Factory where users are able to open packs with football events

Master Variables

  1. realFvrTokenAddress (Real Fvr Token Address) address
  2. admin (onlyOwner modifier) address
  3. realfvrTokenPriceInUSD uint256
  4. packs Structure

Libraries to Inherit

  • Ownable
  • ERC721
  • ERC1151
  • ERC20 (to access the real fvr token)

Features

  • createPacks(paks_number, nfts_per_pack, price, series, drop, pack_type, initial_id) [ADMIN]
  • editPackLimit(pack_type, series, drop) [ADMIN]
  • deletePacks(pack_type, series, drop)
  • deletePacksById(packIds)
  • getPacks(pack_type, series, drop)
  • getPacksByAddress(address)
  • getPackbyId(pack_id)
  • setPackPrice(pack_type, price, series, drop) [ADMIN]
  • setTokenPriceInUSD(price_in_usd) [ADMIN]
  • countOpenedPacks(pack_type, series, drop)
  • countClosedPacks(pack_type, series, drop)
  • offerPack(pack_type, series, drop, amount, dest_wallet) [ADMIN]
  • buyPack(pack_type, series, drop)
  • openPack(pack_id)

Liquifier: A tool to parse Solidity.json contracts

Bounty
#72 Integrate Automated Javascript Class creation based on Solidity Class

Describe the solution
Introduces a cli tool, liquifier, that parses the provided Abi object from the solidity json file, filters out the functions and creates the corresponding javascript class with dummy function body that calls __sendTx on the contract method, with the needed arguments.
A basic documentation of the entry params is also created, as well as a interface file.

Preview
image
image

more can be seen by cloning https://github.com/moshmage/bepro-js/tree/feat/liquifier and issuing

$ npm install
$ node liquifier -h

ETH Wallet
0x0e6B6ae33f345E1CbAc096a2644f7748F347d218

[IP] ERC20TokenLock accept multiple token locks

Improvement proposal on ERC20TokenLock to accept multiple token locks from the same user as long as release date is the same or later into the future, user adds up to his locked tokens stake.

Smart-Contract - MiningERC20

Description

Raising capital with ERC20s is completely broken for retail investors
Private sale investors invest at a nominal price
Where fomo kicks in in general platforms like bscpad, polkastarter, coinlist and others
We need a system where products come before the 1st token is minted
The goal of this smart contract is to be easy to integrate with other defi smart contracts so that after they are built users can redeem their tokens on the ecosystem by using the platform - creating a fair way of distributing the token
This should be easy to import into another smart contract where by using the main product smart contract, this one can be called to allocate tokens later redeemable by the platform user.

This should tie to a mint function of the ERC20 in question (of the project) & the Main product smart contract (of the project)

Integrate Automated Javascript Class creation based on Solidity Class

Describe the feature or project
Automatically write the javascript objects under /src/models/X by using the code behind /contracts/X functions, this should be used to automate the process of generating documentation and adding functions to systems

Available examples
Non available

Bounty
100k BEPRO

Who are we
BetBlock Technology LDA

Integrate Automated Javascript Class creation based on Solidity Class

Describe the feature or project
Automatically write the javascript objects under /src/models/X by using the code behind /contracts/X functions, this should be used to automate the process of generating documentation and adding functions to systems

Available examples
Non available

Bounty
100k BEPRO

Who are we
BetBlock Technology LDA

ROUL - Casino Dapp request [@skyistoohigh - telegram]

Hey!

We launched our token 10 days ago it's a jackpot defi token on the BSC. We take 5% on all transaction that we send to a jackpot wallet. Every 4 hours someone is picked randomly, and win the wallet content. Already 50+ winners, around $17,000 worth of tokens won.

We have a few specificities around jackpot (there are 3, every 4 hours, every day, every week) but that's already up and running from jackpot contracts like the 4 hour one: https://bscscan.com/address/0xc9d691840a1b4b79610e9db656aa9f8f1a374f09#events

As next step, we also want to allow holders to bet their tokens in different games. We were thinking of slots machines encoded in the blockchain. So basically no hidden algorithm to make the house win more money. Fair game where everyone can see their odds real time. No fees for the house.

So a few things are necessary here:

  • Contract to handle players listing, tokens lost / earned
  • a contract per game (we'd start with one of a few options slot / dices / cards / etc..)
  • a Dapp to deposit tokens + play games from browser (security challenge here)

We love the community and we'd love to find someone that would be interested in helping us, in exchange for bepro tokens + roul tokens.

Cheers

@skyistoohigh (telegram)

Liquifier: A tool to parse Solidity.json contracts

Bounty
#72 Integrate Automated Javascript Class creation based on Solidity Class

Describe the solution
Introduces a cli tool, liquifier, that parses the provided Abi object from the solidity json file, filters out the functions and creates the corresponding javascript class with dummy function body that calls __sendTx on the contract method, with the needed arguments.
A basic documentation of the entry params is also created, as well as a interface file.

Preview
image
image

more can be seen by cloning https://github.com/moshmage/bepro-js/tree/feat/liquifier and issuing

$ npm install
$ node liquifier -h

ETH Wallet
0x0e6B6ae33f345E1CbAc096a2644f7748F347d218

Create Vue app for bepro-js documentation

Describe the feature or project
The current JSDoc solution is a pain to update and redesign, and while it serves its "quick to market" purpose it does not satisfy as an actual tool developers use;

To fix this, we should create a Vue2 (typescript) application that's able to digest the documentation from bepro-js and serve it under a github-pages website.

We can achieve this by connecting the two repositories with a dispach_event signal, checking out bepro-js repository, build the vue application and deploy a github website.

We'll make use of kaorun343/vue-property-decorator in junction with class-component notation and jsdoc-json.

E2E for the application should be made with cypress

High level flows

image

image


This vue-app repo will then be forked by bepronetwork so we can use the main github-pages website

Bounty
Bragging rights

Node version locked to 14.17.0

Describe the bug

When trying to install the package on my container, running on nodejs 14.17.5 (image is using nodejs 14.x), got an error
error [email protected]: The engine "node" is incompatible with this module. Expected version "14.17.0". Got "14.17.5"

Reproduction

  1. Using a container built with image https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.14
  2. Run yarn add bepo-js
  3. Got error described

Expected behavior

Install ok.

Logs, screenshots

docker@2ce4719310f5:/usr/src/app$ node -v
v14.17.5
docker@2ce4719310f5:/usr/src/app$ yarn add bepro-js
yarn add v1.22.5
[1/4] Resolving packages...
warning bepro-js > [email protected]: ๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
warning bepro-js > [email protected]: use String.prototype.padStart()
warning bepro-js > [email protected]: ๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
warning bepro-js > babel-cli > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning bepro-js > mocha > [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
warning bepro-js > ipfs-http-client > [email protected]: This module has been superseded by @ipld/dag-cbor and multiformats
warning bepro-js > ipfs-http-client > [email protected]: This module has been superseded by @ipld/dag-pb and multiformats
warning bepro-js > ipfs-http-client > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > babel-plugin-transform-runtime > babel-runtime > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning bepro-js > babel-cli > babel-register > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning bepro-js > babel-cli > babel-polyfill > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning bepro-js > babel-cli > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning bepro-js > ipfs-http-client > ipld-dag-cbor > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > ipfs-http-client > ipld-dag-pb > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > ipfs-http-client > ipld-raw > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > jsdoc-template > gulp-css-base64 > [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning bepro-js > jsdoc-template > gulp-css-base64 > [email protected]: request has been deprecated, see request/request#3142
warning bepro-js > web3 > web3-bzz > swarm-js > [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
warning bepro-js > web3 > web3-eth > web3-eth-accounts > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning bepro-js > web3 > web3-eth > web3-eth-ens > content-hash > [email protected]: stable api reached
warning bepro-js > web3 > web3-eth > web3-eth-ens > content-hash > cids > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > web3 > web3-eth > web3-eth-ens > content-hash > multihashes > [email protected]: This module has been superseded by the multiformats module
warning bepro-js > web3 > web3-bzz > swarm-js > eth-lib > servify > [email protected]: request has been deprecated, see request/request#3142
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
error [email protected]: The engine "node" is incompatible with this module. Expected version "14.17.0". Got "14.17.5"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command

versions, packages, etc
Node : 14.17.5

ROUL - Casino Dapp request [@skyistoohigh - telegram]

Hey!

We launched our token 10 days ago it's a jackpot defi token on the BSC. We take 5% on all transaction that we send to a jackpot wallet. Every 4 hours someone is picked randomly, and win the wallet content. Already 50+ winners, around $17,000 worth of tokens won.

We have a few specificities around jackpot (there are 3, every 4 hours, every day, every week) but that's already up and running from jackpot contracts like the 4 hour one: https://bscscan.com/address/0xc9d691840a1b4b79610e9db656aa9f8f1a374f09#events

As next step, we also want to allow holders to bet their tokens in different games. We were thinking of slots machines encoded in the blockchain. So basically no hidden algorithm to make the house win more money. Fair game where everyone can see their odds real time. No fees for the house.

So a few things are necessary here:

  • Contract to handle players listing, tokens lost / earned
  • a contract per game (we'd start with one of a few options slot / dices / cards / etc..)
  • a Dapp to deposit tokens + play games from browser (security challenge here)

We love the community and we'd love to find someone that would be interested in helping us, in exchange for bepro tokens + roul tokens.

Cheers

@skyistoohigh (telegram)

Smart Contract - [@LOOPhole.finance]

Description
LOOPhole's main goal is to drive investors to hodl their assets.
Loophole offers segregated liquidity pools, at the beginning just for WBTC and ETH (Main Pools), investors stake their assets in these pools. While an investor keeps the stake in the pool, the system yields back LOOPhole tokens through liquidity mining.
In order to promote the hodling strategy, whenever an investor wants to exit some pool he incurs in a fixed penalty over their current stake. Part of such penalty (i.e. 50%) is distributed among the remaining participants of the pool, while the remaining 50% is added to another pool: the LOOP pool. The LOOP pool offers another strategy of staking but in addition it is also a way of effectively decreasing the exit's penalty: if an investor stakes the LOOPhole tokens earned from farming, or buys directly LOOPhole tokens in the open market, he will benefit directly from his own exit as well as from the exits of other investors.

Variables

Main Pools and Loop Pool

  1. totalPool uint256
  2. entryStakeTotal uint256
  3. entryStakeUser map
  4. entryStakeAdjusted map
  5. totalDistributedPenalty uint256
  6. exitPenalty uint256
  7. exitPenaltyLP uint256

Features

Main Pools and Loop Pool

  • stake(user, amount)
  • exit(user, amount)
  • currentStake(user)
  • earnings(user)

Main Pools

  • swapCollectedPenalty(amount) /* swap collected penalty from main pools exits for LOOPhole tokens in the open market*/
  • liquidityMining(amount)

Loop Pool

  • addReward(amount) /* adds to the LOOP pool the amount in LOOPhole tokens corresponding to half the penalty for leaving the main pools. */
  • burn(amount)

Algos

Both staking and exiting a pool require a set of steps and modification of the Variables

Main Pools

stake(user, amount):

  • prevAdjustedEntryStake = entryStakeAdjusted[user]
  • entryStakeAdjusted[user] = prevAdjustedEntryStake + (amount * entryStakeTotal / totalPool )
  • entryStakeTotal = entryStakeTotal + ( entryStakeAdjusted[user] - prevAdjustedEntryStake)
  • entryStakeUser[user] = entryStakeUser[user] + amount
  • totalPool = totalPool + amount

exit(user, amount):

  • totalDistributedPenalty = totalDistributedPenalty + amount * exitPenalty / 2
  • currentStake = currentStake(user)
  • entryStakeTotal = entryStakeTotal - (amount / currentStake) * entryStakeAdjusted[user]
  • entryStakeAdjusted[user] = entryStakeAdjusted[user] - (amount / currentStake) * entryStakeAdjusted[user]
  • entryStakeUser[user] = entryStakeUser[user] - amount
  • totalPool = totalPool - amount * (1 - exitPenalty / 2)
  • swapCollectedPenalty( amount * exitPenalty / 2)
  • return amount * (1 - exitPenalty)

currentStake(user):

  • return totalPool * (entryStakeAdjusted[user] / entryStakeTotal)

Loop Pool

stake(user, amount): -> the exact same as the Main Pools

exit(user, amount):

  • currentStake = currentStake(user)
  • entryStakeTotal = entryStakeTotal - (amount / currentStake) * entryStakeAdjusted[user]
  • entryStakeAdjusted[user] = entryStakeAdjusted[user] - (amount / currentStake) * entryStakeAdjusted[user]
  • entryStakeUser[user] = entryStakeUser[user] - amount
  • totalPool = totalPool - amount
  • liquidityMining(amount * exitPenaltyLP / 2 )
  • burn( amount * exitPenaltyLP / 2 )
  • return amount * (1 - exitPenaltyLP)

currentStake(user): -> the exact same as the Main Pools

addReward(amount):

  • totalDistributedPenalty = totalDistributedPenalty + amount
  • totalPool = totalPool + amount

Smart Contract - [@LOOPhole.finance]

Description
LOOPhole's main goal is to drive investors to hodl their assets.
Loophole offers segregated liquidity pools, at the beginning just for WBTC and ETH (Main Pools), investors stake their assets in these pools. While an investor keeps the stake in the pool, the system yields back LOOPhole tokens through liquidity mining.
In order to promote the hodling strategy, whenever an investor wants to exit some pool he incurs in a fixed penalty over their current stake. Part of such penalty (i.e. 50%) is distributed among the remaining participants of the pool, while the remaining 50% is added to another pool: the LOOP pool. The LOOP pool offers another strategy of staking but in addition it is also a way of effectively decreasing the exit's penalty: if an investor stakes the LOOPhole tokens earned from farming, or buys directly LOOPhole tokens in the open market, he will benefit directly from his own exit as well as from the exits of other investors.

Variables

Main Pools and Loop Pool

  1. totalPool uint256
  2. entryStakeTotal uint256
  3. entryStakeUser map
  4. entryStakeAdjusted map
  5. totalDistributedPenalty uint256
  6. exitPenalty uint256
  7. exitPenaltyLP uint256

Features

Main Pools and Loop Pool

  • stake(user, amount)
  • exit(user, amount)
  • currentStake(user)
  • earnings(user)

Main Pools

  • swapCollectedPenalty(amount) /* swap collected penalty from main pools exits for LOOPhole tokens in the open market*/
  • liquidityMining(amount)

Loop Pool

  • addReward(amount) /* adds to the LOOP pool the amount in LOOPhole tokens corresponding to half the penalty for leaving the main pools. */
  • burn(amount)

Algos

Both staking and exiting a pool require a set of steps and modification of the Variables

Main Pools

stake(user, amount):

  • prevAdjustedEntryStake = entryStakeAdjusted[user]
  • entryStakeAdjusted[user] = prevAdjustedEntryStake + (amount * entryStakeTotal / totalPool )
  • entryStakeTotal = entryStakeTotal + ( entryStakeAdjusted[user] - prevAdjustedEntryStake)
  • entryStakeUser[user] = entryStakeUser[user] + amount
  • totalPool = totalPool + amount

exit(user, amount):

  • totalDistributedPenalty = totalDistributedPenalty + amount * exitPenalty / 2
  • currentStake = currentStake(user)
  • entryStakeTotal = entryStakeTotal - (amount / currentStake) * entryStakeAdjusted[user]
  • entryStakeAdjusted[user] = entryStakeAdjusted[user] - (amount / currentStake) * entryStakeAdjusted[user]
  • entryStakeUser[user] = entryStakeUser[user] - amount
  • totalPool = totalPool - amount * (1 - exitPenalty / 2)
  • swapCollectedPenalty( amount * exitPenalty / 2)
  • return amount * (1 - exitPenalty)

currentStake(user):

  • return totalPool * (entryStakeAdjusted[user] / entryStakeTotal)

Loop Pool

stake(user, amount): -> the exact same as the Main Pools

exit(user, amount):

  • currentStake = currentStake(user)
  • entryStakeTotal = entryStakeTotal - (amount / currentStake) * entryStakeAdjusted[user]
  • entryStakeAdjusted[user] = entryStakeAdjusted[user] - (amount / currentStake) * entryStakeAdjusted[user]
  • entryStakeUser[user] = entryStakeUser[user] - amount
  • totalPool = totalPool - amount
  • liquidityMining(amount * exitPenaltyLP / 2 )
  • burn( amount * exitPenaltyLP / 2 )
  • return amount * (1 - exitPenaltyLP)

currentStake(user): -> the exact same as the Main Pools

addReward(amount):

  • totalDistributedPenalty = totalDistributedPenalty + amount
  • totalPool = totalPool + amount

Wiki [first version]

Have a wiki with everything explained should anyone need to understand certain aspects from the project or the dev environment setup and usage, tests etc.

Smart Contracts for Bet Settlement

A Traditional Gambling platform wishes to bring all of its settlement on chain by creating its own oracle, smart contracts & liquidity pools. This will be launched on Polygon.

Users connect wallet to the gambling platform e.g. via metamask. The gambling platform already exists but for tradional fiat so will require integration at a later stage. I am not seeking a solution here. Users are able to browse events and select outcomes they would like to bet on. When they submit a bet, they submit a smart contract.

The smart contract contains the selection, the odds & the stake along with the terms of settlement. In order for the information to be confirmed, it checks the market registry to confirm market has been created, and the smart contract then needs to call the oracle to confirm the odds are correct, the size of the stake is acceptable and that wallet is whitelisted.

If the bet is approved because the terms are correct, the funds get matched by funds from the platforms own liquidity pool. Initially this pool is USDT. The pool then pays out the bet if it wins and If it doesn't it keeps the funds.

There is a lot more complexity to the pools but at this early stage I would like to receive quotes to create the template smart contracts for the bets, the liquidity pool and also how we could run our own oracle.

As more background, I am a professional gambler with 10+ years experience in betting. I am looking for a highly motivated co founder who can help with the technichal side to this project.

Available examples
Sportx.bet smart contracts are a good place to start.

Bounty
There is a bounty of up to $15,000 in BEPRO tokens to create the concept

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.