老鱼 avatar

P3D价格分析

chaimyu

Published: 21 Jul 2018 › Updated: 21 Jul 2018P3D价格分析

P3D价格分析

以前经常会偷懒不爱分析,现在对新出的一些东西尽量多分析下,何况这个周末又比较清闲,一天能赚几个ETH很知足了,只恨投太少...

价格计算

合约是公开的,可以在这看到:
https://etherscan.io/address/0xb3775fb83f7d12a36e0475abdd1fca35c091efbe#code

卖价计算

    function sellPrice() 
        public 
        view 
        returns(uint256)
    {
        // our calculation relies on the token supply, so we need supply. Doh.
        if(tokenSupply_ == 0){
            return tokenPriceInitial_ - tokenPriceIncremental_;
        } else {
            uint256 _ethereum = tokensToEthereum_(1e18);
            uint256 _dividends = SafeMath.div(_ethereum, dividendFee_  );
            uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends);
            return _taxedEthereum;
        }
    }

买价计算

    function buyPrice() 
        public 
        view 
        returns(uint256)
    {
        // our calculation relies on the token supply, so we need supply. Doh.
        if(tokenSupply_ == 0){
            return tokenPriceInitial_ + tokenPriceIncremental_;
        } else {
            uint256 _ethereum = tokensToEthereum_(1e18);
            uint256 _dividends = SafeMath.div(_ethereum, dividendFee_  );
            uint256 _taxedEthereum = SafeMath.add(_ethereum, _dividends);
            return _taxedEthereum;
        }
    }

从以上代码可以看到卖出和买入都会有手续费,dividendFee_现在设为10,也就是手续费为10%。

具体看看 tokensToEthereum_() 这个函数怎么根据token量计算需要的ETH的,如下:

     function tokensToEthereum_(uint256 _tokens)
        internal
        view
        returns(uint256)
    {

        uint256 tokens_ = (_tokens + 1e18);
        uint256 _tokenSupply = (tokenSupply_ + 1e18);
        uint256 _etherReceived =
        (
            // underflow attempts BTFO
            SafeMath.sub(
                (
                    (
                        (
                            tokenPriceInitial_ +(tokenPriceIncremental_ * (_tokenSupply/1e18))
                        )-tokenPriceIncremental_
                    )*(tokens_ - 1e18)
                ),(tokenPriceIncremental_*((tokens_**2-tokens_)/1e18))/2
            )
        /1e18);
        return _etherReceived;
    }

看起来有点复杂,其实比Bancor算法简单多了,把一些防止出错的机制去掉,容易理解的简单公式就是:

ETH = P3D增量价格 * P3D供应量

P3D增量价格固定为0.00000001ETH

也就是说P3D代币供应量越大,价格就越高,没有总量限制,但供应量大了以后价格也高了,很难保证供应量继续增长。

这样对价格关注的人就知道关注哪个数据了,那就是供应量,同时从供应量也大概知道价格,不用什么软件,直接打开ethersan.io的合约页面:https://etherscan.io/address/0xb3775fb83f7d12a36e0475abdd1fca35c091efbe#readContract

totalSupply决定了买卖价格,注意去掉后18位精度(decimals),大约3000000。

按以上价格算当前价格大概为:3000000 * 0.00000001 = 0.03

买价加10%大概为0.033,卖价减10%大概为0.027,这个与显示的sellPrice和buyPrice是一致的。

后期预测

知道价格计算方法,我们也可以预测价格再翻一倍到0.06需要多少ETH,由于供应量增加价格也会增加,不做复杂的算法,简单取个中间价格0.045计算(可能很不合理,怎么也在0.03到0.06之间):

3000000 * 0.045 = 135000(ETH)

而现在到这个价共有51037个ETH在合约上,就是totalEthereumBalance这个值。

那么135000个ETH多少钱呢?按3000RMB一个计算得约4亿RMB。

再看看以太坊的日成交量,各自预测吧!

归零吗

那如果后续没有资金进入,大家都出P3D在什么价格能达到平衡?还是归零呢?

都出了供应量很少,当然价格可能归零,但是别忘了还有一个F3D的奖池分配呢,这就是这游戏考虑得好的地方。F3D玩法参考钱多人傻速来-F3D

除了熊队不分配奖池给P3D持有者外,蛇队是20%,鲸、牛队是10%,按现在F3D奖池大概20000个ETH算算看:

20000 * 10% = 2000(ETH)

20000 * 20% = 4000(ETH)

现在有3000000个P3D,那只要游戏结束(在不是熊队情况下,这块没太明白,还得看看F3D最后怎么算结果),按现价每个P3D大概价值在0.00067到0.0013。而出现大批出P3D的情况下,供应量肯定不是3000000了,大概在供应量50万到100万之间会取得平衡(再出就不如等游戏结束分红了),这也是如果砸盘时可以考虑进入的价格位置。

从这也看出F3D这个游戏还是有必要继续增长的,才能保证P3D的价格。


感谢您阅读 chaimyu@chaimyu 的帖子,期待您能留言交流!

Leave P3D价格分析 to:

Written by

One day sitting in the well looked at the sky, blowing the wind uphole, jumping out of the well, dancing in the wind!

Read more #p3d posts


Best Posts From 老鱼

We have not curated any of chaimyu's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From 老鱼