GuessThePrice by GTP Team - Decentralized platform for forecasting asset prices on BTT network

I think that next asset will be ETH :pray:

1 Like

Consistency is key, always!!
Keep building.

1 Like

Thank you! @manfred_jr :hugs:

1 Like

Thank you for your reply, I understand that well now

1 Like

@ines_valerie I’m glad to hear that you found the answer helpful! If you have any more questions or need further clarification, feel free to ask.

welcome. Amazing work !

it could be Solana or even Doge : )

:tada::tada::tada:Exciting update: New market added - ETH

We’re thrilled to announce that we’ve successfully added support for a new market:

  • Ethereum (ETH)!

Now you can make forecasts about the price movements of Ethereum.

Happy predicting! :chart_with_upwards_trend::moneybag:


1 Like

You guessed @donaldg !

Maybe next time :wink:

It’s well, so any decision I made is based on my own risk

1 Like

Adding support for Eth, does this mean possibility of migration to other chains asides Tron moving forward?
If yes, it’s really bullish for the future of GTP.

1 Like

Absolutely.
You understood correctly.

1 Like

Hello again @manfred_jr .
Thanks for your question, and we’re glad to see your interest in our project!

Adding support for assets like “ETH,” “BTC,” or any other asset doesn’t mean integrating a new chain into our platform. “GuessThePrice” currently operates on the BitTorrent Chain [Testnet], and the addition of these assets simply provides users with more options for creating price forecasts.

If your question relates to the possibility of adding new chains or transforming our platform into a multi-chain price forecasting platform, then yes, it is indeed possible.

However, it’s important to clarify that, for now, our primary focus remains on the BitTorrent Chain.

Thanks

1 Like

Considering your project goal, it is a great choice. Kudos to team, all the best

1 Like

Thank you @AdelEdv !

Yes I find it very very helpful because you take your time to explain and your words are simple and straight to the point, thank you

1 Like

Hello GTP team! Thank for joining the TRON hackathon, first of all kudos for open sourcing your project!

By checking your repo I could not find the Band protocol integration, would you please point to the contract for me please?

I’m curious to know why you didn’t add BTT price prediction as well as it is straightforward to add it using Band.

Overall the UI of your site looks great, keep on building with such quality!

Keep on building on BTTC :slight_smile:

I clearly get it how you intend to stand the line and stay focused by building solely on Tron/BitTorrent Chain, thanks for sharing and goodluck.

1 Like

Hello @SimbadMarino !


I will try to explain everything to you in as much detail as possible.


  • I followed the “Band Protocol” documentation. Link: With Solidity | Band Protocol .
    The documentation says (quote):

    To query prices from Band Protocol’s oracle, a smart contract should reference Band’s StdReference contract, specifically the getReferenceData and getReferenceDatabulk methods.



Simple example from documentation [Link]

import interfaces/IStdReference.sol
contract Demo {
    IStdReference public ref;

    constructor(IStdReference _ref) public {
        ref = _ref;
    }

    function demo() external view returns (IStdReference.ReferenceData memory) {
        return ref.getReferenceData("BTC", "USD");
    }
}

How did I integrate this?

The integration can be seen in the file ForecastMarketplace.sol

  • I declared the interface IStdReference (line 12 - 22):

    interface IStdReference {
        struct ReferenceData {
            uint256 rate;
            uint256 lastUpdatedBase;
            uint256 lastUpdatedQuote;
        }
    
        function getReferenceData(string memory _base, string memory _quote) external view returns (ReferenceData memory);
    
        function getReferenceDataBulk(string[] memory _bases, string[] memory _quotes) external view returns (ReferenceData[] memory);
    }
    

  • As in the example from the documentation, I set the StdReferenceProxy address at the time of deployment (in constructor) and save it in the ref variable:

    // line 25
    IStdReference public ref;  
    
    // line 54 - 59
    constructor(IStdReference _ref) ERC721("ForecastMarket", "ForecastMarket") {
            ref = _ref;
            contractOwner = msg.sender;
            lastMarketplaceId = 0;
            lastForecastId = 0;
        }
    

    In our case, this is the address of deployed contract in the BTT Testnet - 0x8c064bCf7C0DA3B3b090BAbFE8f3323534D84d68


  • And then in the necessary methods of my contract I call the getReferenceData method, which returns the price of the desired asset.
    Example: View method that returns the price of an asset:

    // line 161 - 163
    function getAssetPrice(string memory assetName) public view returns (uint256) {
        return ref.getReferenceData(assetName, "USD").rate;
    }
    

Let me know if I answered your question.


Thanks for the mention, we were just thinking about adding BTT (BitTorrent) these days.
We did it today. :slight_smile:
And yes, you’re right, it was easy to add BTT using BandChain Price Feeds, like other previously added assets (TRX, BTC, ETH).

Below you can see screenshots of what it looks like.


Thank you !


• P.S.

I checked the explorer and saw a failed transaction (I assume that you tried to buy a forecast from the “Explore & Trade” section)

I checked what was going on and realized that there was an error in the recent frontend update :sweat_smile: (a different contract address was specified). The error has now been fixed :white_check_mark:

If this was you, you can try buying a forecast again and let me know how it worked out for you.

2 Likes