Author Topic: D*Match betting in chain  (Read 10736 times)

0 Members and 1 Guest are viewing this topic.

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
D*Match betting in chain
« on: October 21, 2019, 11:52:23 am »
Hello, Elias here.
I wish to experiment how long can i reach in develop a betting app with BitShares prediction markets.

Intro

There is almost nothing definitive but the tech:
  • UI will be a mobile app, with Cordova, MobileUI, Javascript and Brython
  • Development backend server with Python, UVIcorn, Starlette, FastAPI(
  • Backend will facilitate the managing of markets

Vision

* Transparent betting app.
* Node companion server to avoid bloating core-api.
* Manager for betting setups, storing status in asset description.
* Hierarchical dependency of prediction market assets to allow multi-choice bets.

Work notes

* My work is based on design aproach "bi-directional top-down", being "top" the user experience and "down" the tech ground.
* Multiple programing patterns. Although i always begin with procedural with gradual refactor to oop when the code matures.
* Python centric. Always can be a time for C migration, although not in my interest.
* Aside note: Too wide opened mind and prone to break things. Thus bad core developer.



Short introduction of me:
* Member of community since 2017. Fall in love with a mature project that just works.
* My first personal project failed by not being able to get in sync with the blockchain and unclear goals.
* The second project (monotoken (smartasset wallet)) failed for not being according to locals laws.
* This is my third project.   :D



This post along screenshot post will be refreshed periocally in order to reflect status.

v.0.next
* talking with nodes
* market setups
* etc....

v.0.1.1.
* Observable pattern done in brython (Mirroring UI with atributes changes).
* Selecting bets and adding to the betslip.
 
v.0.1
* Foundation for API tech
* Foundation for UI tech
« Last Edit: October 23, 2019, 10:00:31 pm by Elias »

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: D*Match betting in chain
« Reply #1 on: October 21, 2019, 12:04:49 pm »
screenshots



   
 

« Last Edit: December 09, 2019, 09:48:16 pm by Elias »

Offline bench

Re: D*Match betting in chain
« Reply #2 on: October 21, 2019, 12:45:33 pm »
Hi Elias, welcome to the board.

This is a great initiative to bring the functions of the prediction market to the average users!

Does the PM allow a different betting ratio than 1:1?

You are setting up a own full node only for PM?
« Last Edit: October 21, 2019, 12:55:38 pm by bench »
Be part of the change and vote for the bitshares-vision proxy!

Offline clockwork

  • Committee member
  • Sr. Member
  • *
  • Posts: 374
    • View Profile
  • BitShares: clockwork
Re: D*Match betting in chain
« Reply #3 on: October 21, 2019, 01:51:11 pm »
Hello, Elias here.
I wish to experiment how long can i reach in develop a betting app with BitShares prediction markets.

Intro

There is almost nothing definitive but the tech:
  • UI will be a mobile app, with Cordova, MobileUI, Javascript and Brython
  • Development backend server with Python, UVIcorn, Starlette, FastAPI(
  • Backend will facilitate the managing of markets

Vision

* Transparent betting app.
* Node companion server to avoid bloating core-api.
* Manager for betting setups, storing status in asset description.
* Hierarchical dependency of prediction market assets to allow multi-choice bets.

Work notes

* My work is based on design aproach "bi-directional top-down", being "top" the user experience and "down" the tech ground.
* Multiple programing patterns. Although i always begin with procedural with gradual refactor to oop when the code matures.
* Python centric. Always can be a time for C migration, although not in my interest.
* Aside note: Too wide opened mind and prone to break things. Thus bad core developer.



Short introduction of me:
* Member of community since 2017. Fall in love with a mature project that just works.
* My first personal project failed by not being able to get in sync with the blockchain and unclear goals.
* The second project (monotoken (smartasset wallet)) failed for not being according to locals laws.
* This is my third project.   :D



This post will be refreshed periocally in order to reflect status.

v.0.1
* Foundation for API tech
* Foundation for UI tech

Good stuff!

Great to see more devs jumping in to make use of all the tools we have

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: D*Match betting in chain
« Reply #4 on: October 21, 2019, 02:23:39 pm »
Hi Elias, welcome to the board.

This is a great initiative to bring the functions of the prediction market to the average users!

Does the PM allow a different betting ratio than 1:1?

You are setting up a own full node only for PM?

Hi!   
The ratio comes from the market operations: As i'm going forward i'll make some assumptions (some may be wrong). At this moment i understand that buying an option at 0.1 is like back x10 while the inverse is borrowing and selling at 0.9, thus an x1.9 ratio for lay (and x1.1 for back at the buyer side).
For the lay bet (betting a result of 0), more than x1.9 would require another asset representing the inverse side. Thus two markets, one for back and another for lay.

As i don't have nor the hardware neither the ability to operate a node, i have to develop having in mind to be a good companion for a node. The idea is to bring a new interpretation of the blockchain data rather than modify the protocol to adapt to this use case.

cheers

Offline pc

  • Hero Member
  • *****
  • Posts: 1526
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: D*Match betting in chain
« Reply #5 on: October 21, 2019, 04:55:42 pm »
I wish to experiment how long can i reach in develop a betting app with BitShares prediction markets.
[...]
* The second project (monotoken (smartasset wallet)) failed for not being according to locals laws.

Erm, did you check that betting apps are in line with your local laws?


 i don't have nor the hardware neither the ability to operate a node,

You don't *have* to run a node yourself. You should start on testnet. I'm sure someone has a public API node there.

The idea is to bring a new interpretation of the blockchain data rather than modify the protocol to adapt to this use case.

Keep in mind that the chain and the original interpretation are still there. In particular, your assets can be traded, which should be aligned with your new interpretation.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: D*Match betting in chain
« Reply #6 on: October 21, 2019, 05:19:05 pm »
I wish to experiment how long can i reach in develop a betting app with BitShares prediction markets.
[...]
* The second project (monotoken (smartasset wallet)) failed for not being according to locals laws.

Erm, did you check that betting apps are in line with your local laws?

The wallet don't have a value as i perceive value, so went to trash (two test accounts harcoded and unable to properly show memo (don't have motivation to complete)).
A betting house cannot operate without license, but this is only tech and will be opensourced.



 i don't have nor the hardware neither the ability to operate a node,

You don't *have* to run a node yourself. You should start on testnet. I'm sure someone has a public API node there.

Sure!  Was a response to "You are setting up a own full node only for PM?"

The idea is to bring a new interpretation of the blockchain data rather than modify the protocol to adapt to this use case.

Keep in mind that the chain and the original interpretation are still there. In particular, your assets can be traded, which should be aligned with your new interpretation.

I wanted to say that, for example, memo can contain metadata which can assist UI clients to recover extra data, like images and so on. (Like watching through colored glasses   8) )


Offline Victor118

Re: D*Match betting in chain
« Reply #7 on: October 23, 2019, 03:24:11 pm »
Great !
Is a prediction asset can be reusable ?
It's too expensive to create one for every NBA match for example !!

Envoyé de mon WAS-LX1A en utilisant Tapatalk


Offline pc

  • Hero Member
  • *****
  • Posts: 1526
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: D*Match betting in chain
« Reply #8 on: October 23, 2019, 05:25:45 pm »
Is a prediction asset can be reusable ?
It's too expensive to create one for every NBA match for example !!

Unfortunately they aren't. This is a known problem.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
websocktes broadcast
« Reply #9 on: November 02, 2019, 11:27:09 pm »


* listener app sends updates to d*match node
* node broadcasts to connected clients
* client send signed ops to btshares node

added video in screenshots post with a live session although random data.

Offline bench

Re: D*Match betting in chain
« Reply #10 on: November 03, 2019, 01:18:05 am »
Unfortunately they aren't. This is a known problem.

Is here a update considered ?
Be part of the change and vote for the bitshares-vision proxy!

Offline pc

  • Hero Member
  • *****
  • Posts: 1526
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: D*Match betting in chain
« Reply #11 on: November 03, 2019, 08:10:44 am »
Is here a update considered ?

BSIP-17 describes a possible solution. IIRC it was never voted on, because BSIP-18 was a much easier to do, but for MPAs which were more in focus back then.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: D*Match betting in chain
« Reply #12 on: November 03, 2019, 09:21:00 pm »


Bet odds and their equivalence with a typical market.

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: D*Match betting in chain
« Reply #13 on: November 15, 2019, 08:42:07 am »
Byproduct of the websockets comm with nodes:
https://gitlab.com/vanissoft/profit-way

Takes every market in a token list and prints the profitable ones.
In the code there is also a seminal bot.

Making use of Litepresence's manualSIGNING to try async operative.

Online sschiessl

Re: D*Match betting in chain
« Reply #14 on: November 15, 2019, 08:58:58 am »
Byproduct of the websockets comm with nodes:
https://gitlab.com/vanissoft/profit-way

Takes every market in a token list and prints the profitable ones.
In the code there is also a seminal bot.

Making use of Litepresence's manualSIGNING to try async operative.

Cool for arbitrage? Related to betting how? :)

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: D*Match betting in chain
« Reply #15 on: November 15, 2019, 10:04:48 am »
Byproduct of the websockets comm with nodes:
https://gitlab.com/vanissoft/profit-way

Takes every market in a token list and prints the profitable ones.
In the code there is also a seminal bot.

Making use of Litepresence's manualSIGNING to try async operative.

Cool for arbitrage? Related to betting how? :)

jejeje. i wanted the engine to be async, thus i tested server-node comms with queue like pattern.
There are some ops missing in manualSIGNING, like tokens creation/modification, i would like to be implemented with the help of litepresence.

Offline Elias

  • Newbie
  • *
  • Posts: 9
    • View Profile
diagram of main components
« Reply #16 on: December 10, 2019, 11:34:21 am »


Functions:
* Client Servers:
  * onboarding, account management
  * feeds clients with data extracted from network (BitShares nodes).
* Admin Servers:
  * create and aprove match proposals
  * keep settings and inject them into op memos
    * settings include child tokens for each match and trusted feeders
    * feed prices

Due the need of multiple tokens for each match, meaning the need to keep dozens of them running concurrently, i'm embrace the idea of reusing of tokens and to use normal market operations combined with GS mechanism. There will be time to retract and switch to prediction markets if they turn to be a better solution. (another reason to use normal tokens is to avoid blockchain polution with past matches ).