<!DOCTYPE html>
<html lang="zh" class="-lab">
    <head>
        <base href="/">
        <meta charset="utf-8">
        <meta name="renderer" content="webkit">
        <meta name="force-rendering" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
        
                
        <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
        <meta name="applicable-device" content="pc,mobile">
        
        
        <title>来笙实验室 - Laysense Website</title>
        <meta name="keywords" content="">
        <meta name="description" content="">

        <script>
        if ( !! window.ActiveXObject || "ActiveXObject" in window ) {
            if ( confirm('您正在使用不兼容的浏览器，是否下载最新现代浏览器？') ) {
                window.location.href = "//www.pagepan.com/browser-upgrade.html?ref=" + encodeURIComponent(window.location.href);
            }
        }
        </script>
        <link rel="icon" href="https://static.laysense.cn/favicon.jpg?1710916217">
        <link rel="apple-touch-icon" href="https://static.laysense.cn/touch-icon.png?1710916217">
        <link href="https://static.laysense.cn/assets/css/pagepan.css?1710916217" rel="stylesheet">
        <link href="https://static.laysense.cn/assets/css/theme.css?1710916217" rel="stylesheet">
        <link href="https://static.laysense.cn/assets/css/animate.css?1710916217" rel="stylesheet">
        <link href="https://static.laysense.cn/data/css/article.min.css?1710916217" rel="stylesheet">
        <link href="https://static.laysense.cn/data/css/graphic.min.css?1710916217" rel="stylesheet">
        <link href="https://static.laysense.cn/data/css/global.min.css?1710916217" rel="stylesheet">
        <script>var pagevar = {"rooturl":"\/","baseurl":"\/","domain":"https:\/\/html.laysense.cn","domain3":"https:\/\/static.laysense.cn\/","timestamp":"1710916217","page_id":"1","page_alias":"","page_title":"首页","get_alias":"","get_id":"","get_cid":"","get_tag":"","get_keyword":"","get_pagenum":""};</script>
        <script src="https://static.laysense.cn/assets/js/require.js?1710916217" type="text/javascript"></script>
        <script src="https://static.laysense.cn/assets/js/config.js?1710916217" type="text/javascript"></script>
        <script src="https://static.laysense.cn/assets/js/lib/jquery.js?1710916217" type="text/javascript"></script>    
    </head>
    <body mpa-version="9.1.9" mpa-extension-id="aidjohbjielfdhcaookdaolppglahebo" >


    <section class="pt-18" uk="number/00/09" lvchwq9v="">
    <div class="container container-xl">
        <h2 class="mb-4 center">Binance Launchpad 新币价格计算器 v2.3.1</h2>
        <p class="ls-2 ti-2 center mix-15 f-10">By Laysense Insight Global</p>
        <p class="ls-2 ti-2 center mix-15 f-10">BinanceAPI Status:

        <?php
function apiPost($url = '',Array $data = array())
{
    $data_string = json_encode($data,JSON_UNESCAPED_UNICODE);
    // $data_string = $data;
    $curl_con = curl_init();
    curl_setopt($curl_con, CURLOPT_URL,$url);
    curl_setopt($curl_con, CURLOPT_HEADER, false);
    curl_setopt($curl_con, CURLOPT_POST, true);
    curl_setopt($curl_con, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl_con, CURLOPT_CONNECTTIMEOUT, 5);
    curl_setopt($curl_con, CURLOPT_HTTPHEADER, array(
            'Content-Type: application/json',
            'Content-Length: ' . strlen($data_string))
    );
    curl_setopt($curl_con, CURLOPT_POSTFIELDS, $data_string);
    $res = curl_exec($curl_con);
    $status = curl_getinfo($curl_con);
    curl_close($curl_con);

    if (isset($status['http_code']) && $status['http_code'] == 200) {
        return $res;
    } else {
        return FALSE;
    }
}
function apiGet($url = '')
{
    $curl_con = curl_init();
    curl_setopt($curl_con, CURLOPT_URL,$url);
    curl_setopt($curl_con, CURLOPT_HEADER, false);
    curl_setopt($curl_con, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl_con, CURLOPT_CONNECTTIMEOUT, 5);
    curl_setopt($curl_con, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'X-MBX-APIKEY: ltyPbEe3rOY7NC7AdoCJEYgK3Fm8nVsnQeOvcKlF7AIrumhFd4IMVrBkgD4LVwOP',
        'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0'
    ));
    $res = curl_exec($curl_con);
    $status = curl_getinfo($curl_con);
    curl_close($curl_con);
    $time = curl_getinfo($curl_con)['total_time'];
    return array(json_decode($res),$time);
    
}
function sign($querystring){
    $skey='gSNcQ8S91sPvHbgxUScTKUvHNrzqPgzXh0yB7vs811GHMobtQ9JS0tNNHeHGEkCF';
$window=50000;
$time=round(microtime(true) * 1000);
$querystring=$querystring.'&recvWindow='.$window.'&timestamp='.$time;
$signature=hash_hmac('sha256', $querystring, $skey);
return '?'.$querystring.'&signature='.$signature;
}
$response = apiGet('https://binanceapi.mirrorsite.eu.org/sapi/v1/system/status');
print_r($response[0]->msg.' '.round($response[1]*1000,2).'ms');

$maininfo=apiGet('https://binanceapi.mirrorsite.eu.org/bapi/lending/v1/friendly/launchpool/project/listV3?page=1')[0];
$coininfo=$maininfo->data->tracking;
if(!isset($coininfo)||$coininfo==[]||$coininfo==''){
    die('目前没有正在开展的新币挖矿');
}else{
    $coininfo=$coininfo[0];
}
    $detail = [];

foreach ($coininfo->projects as $item) {
    if ($item->asset === 'FDUSD') {
        $detail['fdusd'] = $item;
    } elseif ($item->asset === 'BNB') {
        $detail['bnb'] = $item;
    }
}

$ratelist=apiGet('https://binanceapi.mirrorsite.eu.org/bapi/margin/v1/friendly/margin/asset/all');
$bnbinfo=array();
$bnbinfo['price']=apiGet('https://binanceapi.mirrorsite.eu.org/api/v3/avgPrice?symbol=BNBUSDT')[0]->price;
$bnbinfo['amount']=$detail['bnb']->totalInvestAmount;
$bnbinfo['new']=$detail['bnb']->rebateTotalAmount;
$bnbinfo['rad']=$detail['bnb']->shareRatio;
$bnbinfo['bn_rate']=apiGet('https://binanceapi.mirrorsite.eu.org/sapi/v1/margin/crossMarginData'.sign('coin=BNB'))[0][0]->dailyInterest;
$bnbinfo['venus_rate']=(apiGet('https://venusapi.mirrorsite.eu.org/markets/?chainId=56&underlyingSymbol=BNB')[0]->result[0]->borrowApy)/36500;
$bnbinfo['rate']=max($bnbinfo['bn_rate'],$bnbinfo['venus_rate']);
$bnbinfo['w_rate']=min($bnbinfo['bn_rate'],$bnbinfo['venus_rate']);
#print_r($bnbinfo);


$fdinfo['amount']=$detail['fdusd']->totalInvestAmount;
$fdinfo['new']=$detail['fdusd']->rebateTotalAmount;
$fdinfo['rad']=$detail['fdusd']->shareRatio;
$fdinfo['bn_rate']=apiGet('https://binanceapi.mirrorsite.eu.org/sapi/v1/simple-earn/flexible/list'.sign('asset=FDUSD'))[0]->rows[0]->latestAnnualPercentageRate;
$fdinfo['venus_rate']=(apiGet('https://venusapi.mirrorsite.eu.org/markets/?chainId=56&underlyingSymbol=FDUSD')[0]->result[0]->borrowApy)/100;
$fdinfo['rate']=round(max($fdinfo['bn_rate'],$fdinfo['venus_rate'])/365,5);
$fdinfo['w_rate']=round(min($fdinfo['bn_rate'],$fdinfo['venus_rate'])/365,5);
#print_r($fdinfo);


#$best=($bnbinfo['amount']*$bnbinfo['price']*$bnbinfo['rate']*$coininfo->duration)/$bnbinfo['new'];
#$worst=(($bnbinfo['amount']*$bnbinfo['price']*$bnbinfo['rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$bnbinfo['rad']+(($fdinfo['amount']*$fdinfo['rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$fdinfo['rad'];
$best=(($bnbinfo['amount']*$bnbinfo['price']*$bnbinfo['rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$bnbinfo['rad']+(($fdinfo['amount']*$fdinfo['rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$fdinfo['rad'];
$worst=(($bnbinfo['amount']*$bnbinfo['price']*$bnbinfo['w_rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$bnbinfo['rad']+(($fdinfo['amount']*$fdinfo['w_rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$fdinfo['rad'];

?>
        </p>

		<div class="center">

        </div>
    </div>
</section>
<section class="py-15" uk="number/d1/95" lvchvl77="">

    <div class="container container-fluid">
        
        <style>
            [lvchvl77] textarea,
            [lvchvl77] input {
                width: 100%;
                border: 0;
                outline: 0;
                background-color: var(--bg-alpha-95);
        		color: var(--mix);
                padding: 15px 20px;
                border: 1px solid transparent;
            }
        	
            [lvchvl77] textarea::placeholder,
            [lvchvl77] input::placeholder {
                color: var(--mix-25)
            }
        
            [lvchvl77] .submit.success {
                background-color: #64bf78;
        		border-color: #64bf78;
                color: #fff;
        		opacity: 1;
            }
        	
            [lvchvl77] .submit.error {
                background-color: #ef766c;
        		border-color: #ef766c;
                color: #f5f5f5;
        		opacity: 1;
            }
        	
            .tippy-box[data-theme~='tomato'] {
        	  background-color: tomato;
        	  color: yellow;
        	}
        	
        	.tippy-box[data-theme~='tomato'] .tippy-arrow {
        		color: #ff6347;
        	}
        </style>
        
                
        <div class="grid">
            <div class="col-span-12 col-span-5-md col-span-6-lg">
                <picture class="">
                    <img class="obj-cover obj-center h-full-md" src="https://laysense.cn/data/file/choong-deng-xiang-rVHIqG9tTOE-unsplash-zip.webp" srcset="https://laysense.cn/data/file/choong-deng-xiang-rVHIqG9tTOE-unsplash-zip.webp">
                </picture>
            </div>
            <div class="col-span-12 col-span-7-md col-span-6-lg">
                <form class="px-10 py-15 p-15-lg p-18-xl bg-mix-38 h-full" action="?action=yes" method="get">
                	<ul class="grid gap-3 gap-2-lg gap-1-xl justify-center">
                    <li class="col-span-12 col-span-2-xl">
                        新币名称<br />
                        <img style="max-height:40px;" alt="REZ" src="https://binanceapi.mirrorsite.eu.org/static/images/coin/<?php echo(strtolower($coininfo->rebateCoin));?>.svg" class="css-n0oash">
                        <span style="font-size:20px;">

                        <?php echo($coininfo->rebateCoin);?>
        </span>
                    </li>
                		<li class="col-span-12 col-span-4-xl">
                            新币总量
                			<input  type="number" min="1" name="new_amount" value="<?php echo($coininfo->rebateTotalAmount);?>" readonly>
                		</li>
                        <li class="col-span-12 col-span-3-xl">
                            挖矿天数
                        	<input id='during' type="number"  max="30" min="1"  name="days" value="<?php echo($coininfo->duration);?>"  readonly>
                        </li>
                        <li class="col-span-12 col-span-3-xl">
                            结束日期<br />
                            <span style="font-size:20px;">
                        <?php echo(date("n月d日 H点",$coininfo->mineEndTime));?>
                            </span>
                        </li>
                        <!--li class="col-span-12 col-span-6-xl">
                            当前BNB年化利率(%)
                			<input oninput="this.value = this.value.replace(/[^0-9]/g, '');" type="number" max="500" min="1" name="bnb_arp" value="90" placeholder="当前BNB利率(%)" required="" >
                		</li>
                        <li class="col-span-12 col-span-6-xl">
                            当前BNB市场价格
                        	<input type="number" name="days" value="" placeholder="挖矿时间(天)" required="">
                        </li-->
                        <li class="col-span-12 col-span-3-xl">
                            当前BNB年化利率(%)
                			<input  type="number" max="500" min="1" name="bnb_arp" value="<?php echo(round($bnbinfo['rate']*36500,2));?>" readonly>
                		</li>
                        <li class="col-span-12 col-span-3-xl">
                            当前BNB市场价格($)
                        	<input id='bnbprice' type="number" name="days" value="<?php echo(round($bnbinfo['price'],2));?>" readonly>
                        </li>
                        <li class="col-span-12 col-span-6-xl">
                            当前BNB抵押数量(枚)
                        	<input id='bnball' type="number" name="days" value="<?php echo(round($bnbinfo['amount'],5));?>" readonly>
                        </li>
                        <li class="col-span-12 col-span-6-xl">
                            当前BNB抵押价值($)
                        	<input  type="number" name="days" value="<?php echo(round($bnbinfo['price']*$bnbinfo['amount'],4));?>" readonly>
                        </li>
                        <li class="col-span-12 col-span-6-xl">
                            BNB矿池代币(新币)
                        	<input id='bnbnew' type="number" name="days" value="<?php echo($bnbinfo['new']);?>" readonly>
                        </li>

                        <li class="col-span-12 col-span-3-xl">
                            当前FDUSD年化利率(%)
                			<input  type="number" max="500" min="1" name="bnb_arp" value="<?php echo(round($fdinfo['rate']*36500,2));?>" readonly>
                		</li>
                        <li class="col-span-12 col-span-9-xl">
                            当前FDUSD抵押数量(枚)
                        	<input id='fdall' type="number" name="days" value="<?php echo(round($fdinfo['amount'],5));?>" readonly>
                        </li>
                        <li class="col-span-12 col-span-3-xl">
                            FDUSD占比(%)
                        	<input type="number" name="days" value="<?php echo(round($fdinfo['rad']*100,0));?>" readonly>
                        </li>
                        <li class="col-span-12 col-span-9-xl">
                        FDUSD矿池代币(新币)
                        	<input id='fdnew' type="number" name="days" value="<?php echo($fdinfo['new']);?>" readonly>
                        </li>
                        <li class="col-span-12 col-span-6-xl">
                            最低估价($)
                        	<input id='lp' type="number" name="days" value="<?php echo(round($worst,4));?>" readonly>
                        </li>
                        <li class="col-span-12 col-span-6-xl">
                        最佳估价($)
                        	<input id='hp' type="number" name="days" value="<?php echo(round($best,4));?>" readonly>
                        </li>


                		<li class="col-span-12 col-span-6-xl">
                            您投入的BNB数量
                        	<input id='bnbinput' type="number" name="days" value="0" oninput="caculate()" >
                        </li>
                        <li class="col-span-12 col-span-6-xl">
                        您投入的FDUSD数量
                        	<input id='fdinput' type="number" name="days" value="0" oninput="caculate()" >
                        </li>
                        <li class="col-span-12 col-span-4-xl">
                            获取新币数量
                        	<input id='gain' type="number" name="days" value="" readonly>
                        </li>
                        <li class="col-span-12 col-span-4-xl">
                            最低价值($)
                        	<input id='lvalue' type="number" name="days" value="" readonly>
                        </li>
                        <li class="col-span-12 col-span-4-xl">
                            最高价值($)
                        	<input id='hvalue' type="number" name="days" value="" readonly>
                        </li>
                		<li class="col-span-12 col-span-6-xl">
                            最低ARR(%)
                        	<input id='larr' type="number" name="days" value="" readonly>
                        </li>
                        <li class="col-span-12 col-span-6-xl">
                            最高ARR(%)
                        	<input id='harr' type="number" name="days" value="" readonly>
                        </li>
                	</ul>
                </form>
            </div>
        </div>
        
                
    </div>
    <script>
        function caculate(){
            var during=$('#during').val();

            var fd=$('#fdinput').val();
            var bnb=$('#bnbinput').val();
            var bnbp=$('#bnbprice').val();
            var bnbm=(bnb*bnbp).toFixed(4);

            if(bnb<=0){
                bnb=0;
            }
            if(bnbm<=0){
                bnbm=0;
            }
            if(fd<=0){
                fd=0;
            }
            var fdall=$('#fdall').val();
            var fdnew=$('#fdnew').val();
            var bnball=$('#bnball').val();
            var bnbnew=$('#bnbnew').val();
            var fdcoin=fd/fdall*fdnew;
            var bnbcoin=bnb/bnball*bnbnew;
            var coin=(fdcoin+bnbcoin).toFixed(4);
            $('#gain').val(coin);
            var lp=$('#lp').val();
            var hp=$('#hp').val();
            var lvalue=(coin*lp).toFixed(4);
            var hvalue=(coin*hp).toFixed(4);
            $('#lvalue').val(lvalue);
            $('#hvalue').val(hvalue);
           
            larr=((lvalue/(bnbm+fd))*36500/during).toFixed(3);
            harr=((hvalue/(bnbm+fd))*36500/during).toFixed(3);
            $('#larr').val(larr);
            $('#harr').val(harr);
        }
    </script>
</section>


    <script src="https://static.laysense.cn/asset/js/app/main.js?" type="text/javascript"></script>    </body>
</html>

