project screenshot 1
project screenshot 2
project screenshot 3

Green-Pluto

A social hybrid betting-trading game where AI trading algos compete for profit and users bet on algos

Green-Pluto

Created At

ETHGlobal Lisbon

Winner of

trophy

🏊 Polygon — Build on Polygon

trophy

🏊 zkBob — Pool Prize

trophy

🏊 The Graph — Pool Prize

trophy

🏊 Scroll — Deploy a Smart Contract

Project Description

This is a social platform which allows users to make bets on AI algos. Algo trading competition gamifies and socializes trading,

Algo providers compete with their best algos to make profit for the users. Users bet on algos and always earn algo profits. In addition to algo profits, backers of the winning algo get back their bet principle and divide the pool of other losing bets. If all algos are profitable, everybody gets back at least something. But choosing the winning algo can offer magnificent returns.

So this is a hybrid of trading and betting which is at the same time gamified and enables users to share their thoughts and follow the process of algo trading as if watching race horses. But this time it is like a financial derivative, somewhat similar to binary derivatives but more user friendly and entertaining.

The chairperson (set in the smart contract by the contract owner) assigns algo providers who will use off-chain (current implementation) or on-chain computations to make trades with predetermined assets. Allowed assets are fixed in the contract and every algo uses the same asset. Algo providers must stake some assets to be eligible to manage the algos and assets assigned to algos.

Users deposit funds into the contract and can bet on algos. The chairperson starts the betting period and ends the betting period (can be automated in later implementations based on epochs). After the betting period ends, algo providers get access to funds which have been bet on their algos. The aim of the algo providers is to earn as much as possible during the trading period. After the trading period ends, the chairperson announces the winner (oracle can be used for that in later implementations) and posts the returns. Everybody gets their returns if positive. If negative, this will decrease the winners' pool which will be proportionally divided by all players who bet on the winning algo.

In essence, the game resembles a gambling game but if algos pools will be tokenized or those will emit NFT-s as a representation of the algo share, the game can be viewed as a new type of financial derivative instead. It will even be possible to hedge some of the losses. Always getting the algo profit can make it potentially more interesting and appealing to users.

How it's Made

The logic of the app lives in a smart contract written in solidity. Front-end was built with Next.js, using web3.js, thirdweb components and integrating Metamask. Subgraph was created using npm. Smart contract development was done using Remix.

Solidity code was tested manually, extreme time pressure didn't allow for proper tests. Front-end is not fully developed but main functionality implemented with web3.js and thirdweb libraries. Metamask is integrated, basic visual for onepager created but betting views and more specific admin or algo provider views are not created at the moment. Smart contract is deployed on multiple networks but front-end is not connected to any of those. Smart contract was tested and can be used with Remix or other tools. Source code also uploaded in various network explorers.

Using Polygon or Optimist for deployment is a better option than using mainnet. Creating subgraph with the tools of TheGraph makes following the game easier and historical information available. 1inch is a nice complement to provide users swapping if necessary or an alternative venue for algo execution. Metamask is a central piece interacting with the dApp. Uniswap is used for algo executions, and was mocked in an alternative implementation.

background image mobile

Join the mailing list

Get the latest news and updates