Vocabulary fixes

This commit is contained in:
timurgordon
2025-05-05 11:32:09 +03:00
parent a7c0772d9b
commit 2760f00a30
27 changed files with 588 additions and 329 deletions

View File

@@ -89,7 +89,7 @@
<div class="d-flex align-items-center">
{% if asset.asset_type == "Token" %}
<i class="bi bi-coin me-2 text-warning"></i>
{% elif asset.asset_type == "NFT" %}
{% elif asset.asset_type == "Artwork" %}
<i class="bi bi-image me-2 text-primary"></i>
{% elif asset.asset_type == "Real Estate" %}
<i class="bi bi-building me-2 text-success"></i>
@@ -162,7 +162,7 @@
<div class="d-flex align-items-center">
{% if asset_type.type == "Token" %}
<i class="bi bi-coin me-2 text-warning"></i>
{% elif asset_type.type == "NFT" %}
{% elif asset_type.type == "Artwork" %}
<i class="bi bi-image me-2 text-primary"></i>
{% elif asset_type.type == "Real Estate" %}
<i class="bi bi-building me-2 text-success"></i>

View File

@@ -23,7 +23,7 @@
<label for="assetTypeFilter" class="form-label">Asset Type</label>
<select class="form-select" id="assetTypeFilter">
<option value="all">All Types</option>
<option value="NFT">NFT</option>
<option value="Artwork">Artwork</option>
<option value="Token">Token</option>
<option value="RealEstate">Real Estate</option>
<option value="Commodity">Commodity</option>

View File

@@ -69,7 +69,7 @@
<div class="d-none d-md-flex">
<ul class="navbar-nav flex-row">
<li class="nav-item mx-3">
<a class="nav-link text-white {% if active_page == 'about' %}active{% endif %}" target="_blank" href="https://info.ourworld.tf/zaz">
<a class="nav-link text-white {% if active_page == 'about' %}active{% endif %}" target="_blank" href="https://info.ourworld.tf/zdfz">
About
</a>
</li>
@@ -194,7 +194,7 @@
<small>Convenience, Safety and Privacy</small>
</div>
<div class="col-md-4 text-center mb-2 mb-md-0">
<a class="text-white text-decoration-none mx-2" target="_blank" href="https://info.ourworld.tf/zaz">About</a>
<a class="text-white text-decoration-none mx-2" target="_blank" href="https://info.ourworld.tf/zdfz">About</a>
<span class="text-white">|</span>
<a class="text-white text-decoration-none mx-2" href="/contact">Contact</a>
</div>

View File

@@ -45,7 +45,7 @@
<div class="card mb-3">
<div class="card-body">
<h5 class="card-title">Website</h5>
<p class="card-text">https://info.ourworld.tf/zaz</p>
<p class="card-text">https://info.ourworld.tf/zdfz</p>
</div>
</div>
</div>

View File

@@ -53,8 +53,8 @@
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="lending-tab" data-bs-toggle="tab" data-bs-target="#lending" type="button" role="tab" aria-controls="lending" aria-selected="false">
<i class="bi bi-cash-coin me-1"></i> Lending & Borrowing
<button class="nav-link" id="providing-receiving-tab" data-bs-toggle="tab" data-bs-target="#providing-receiving" type="button" role="tab" aria-controls="providing-receiving" aria-selected="false">
<i class="bi bi-cash-coin me-1"></i> Providing & Receiving
</button>
</li>
<li class="nav-item" role="presentation">
@@ -81,7 +81,7 @@
<div class="tab-content mt-3" id="defiTabsContent">
{% include "defi/tabs/overview.html" %}
{% include "defi/tabs/lending_borrowing.html" %}
{% include "defi/tabs/providing_receiving.html" %}
{% include "defi/tabs/liquidity.html" %}
{% include "defi/tabs/staking.html" %}
{% include "defi/tabs/swap.html" %}

View File

@@ -27,8 +27,8 @@
<option value="TFT" data-type="token" data-value="5000" data-amount="10000" data-unit="TFT" data-img="/static/img/tokens/tft.png">
ThreeFold Token (TFT) - 10,000 TFT ($5,000)
</option>
<option value="ZAZ" data-type="token" data-value="2500" data-amount="5000" data-unit="ZAZ" data-img="/static/img/tokens/zaz.png">
Zanzibar Token (ZAZ) - 5,000 ZAZ ($2,500)
<option value="ZDFZ" data-type="token" data-value="2500" data-amount="5000" data-unit="ZDFZ" data-img="/static/img/tokens/zdfz.png">
Zanzibar Token (ZDFZ) - 5,000 ZDFZ ($2,500)
</option>
</optgroup>
<!-- Digital Assets -->
@@ -207,7 +207,7 @@
<td>
<div class="d-flex align-items-center">
<i class="bi bi-image me-2 text-primary"></i>
Beach Property NFT
Beach Property Artwork
</div>
</td>
<td>$25,000</td>
@@ -232,8 +232,8 @@
<tr>
<td>
<div class="d-flex align-items-center">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="20" height="20" class="rounded-circle me-1">
1,000 ZAZ
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="20" height="20" class="rounded-circle me-1">
1,000 ZDFZ
</div>
</td>
<td>$500</td>
@@ -297,7 +297,7 @@
</div>
<div class="alert alert-warning mb-0">
<i class="bi bi-exclamation-triangle"></i> Your Beach Property NFT collateral is close to the liquidation threshold. Consider adding more collateral or repaying part of your synthetic assets.
<i class="bi bi-exclamation-triangle"></i> Your Beach Property Artwork collateral is close to the liquidation threshold. Consider adding more collateral or repaying part of your synthetic assets.
</div>
</div>
</div>

View File

@@ -1,18 +1,18 @@
<div class="tab-pane fade" id="lending" role="tabpanel" aria-labelledby="lending-tab">
<div class="tab-pane fade" id="providing" role="tabpanel" aria-labelledby="providing-tab">
<div class="row">
<div class="col-md-6">
<div class="card mb-4">
<div class="card-header bg-primary text-white">
<i class="bi bi-box-arrow-right me-1"></i> Lend Your Assets
<i class="bi bi-box-arrow-right me-1"></i> Provide Your Assets
</div>
<div class="card-body">
<p class="card-text">Earn interest by lending your digital assets to the ZAZ DeFi platform.</p>
<p class="card-text">Earn profit share by providing your digital assets to the ZDFZ DeFi platform.</p>
<form action="/defi/lending" method="post">
<form action="/defi/providing" method="post">
<div class="mb-3">
<label for="asset" class="form-label">Select Asset</label>
<select class="form-select" id="asset" name="asset_id" required>
<option value="" selected disabled>Choose an asset to lend</option>
<option value="" selected disabled>Choose an asset to provide</option>
{% for asset in recent_assets %}
{% if asset.status == 'Active' %}
<option value="{{ asset.id }}" data-type="{{ asset.asset_type }}" data-value="{{ asset.current_valuation }}">
@@ -34,27 +34,27 @@
<div class="mb-3">
<label for="duration" class="form-label">Duration</label>
<select class="form-select" id="duration" name="duration" required>
<option value="7">7 days (2.5% APY)</option>
<option value="30" selected>30 days (4.2% APY)</option>
<option value="90">90 days (6.8% APY)</option>
<option value="180">180 days (8.5% APY)</option>
<option value="365">365 days (12.0% APY)</option>
<option value="7">7 days (2.5% Expected Return %)</option>
<option value="30" selected>30 days (4.2% Expected Return %)</option>
<option value="90">90 days (6.8% Expected Return %)</option>
<option value="180">180 days (8.5% Expected Return %)</option>
<option value="365">365 days (12.0% Expected Return %)</option>
</select>
</div>
<div class="alert alert-success">
<div class="d-flex justify-content-between">
<span>Estimated Interest:</span>
<strong id="interestEstimate">0.00 TFT</strong>
<span>Estimated Profit Share:</span>
<strong id="profitShareEstimate">0.00 TFT</strong>
</div>
<div class="d-flex justify-content-between">
<span>Return Amount:</span>
<span>Expected Return:</span>
<strong id="returnAmount">0.00 TFT</strong>
</div>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-primary">Lend Asset</button>
<button type="submit" class="btn btn-primary">Provide Asset</button>
</div>
</form>
</div>
@@ -64,12 +64,12 @@
<div class="col-md-6">
<div class="card mb-4">
<div class="card-header bg-success text-white">
<i class="bi bi-box-arrow-in-left me-1"></i> Borrow Against Assets
<i class="bi bi-box-arrow-in-left me-1"></i> Receive Against Assets
</div>
<div class="card-body">
<p class="card-text">Borrow digital assets using your existing assets as collateral.</p>
<p class="card-text">Receive digital assets by contributing your existing assets as security.</p>
<form action="/defi/borrowing" method="post">
<form action="/defi/receiving" method="post">
<div class="mb-3">
<label for="collateralAsset" class="form-label">Collateral Asset</label>
<select class="form-select" id="collateralAsset" name="collateral_asset_id" required>
@@ -85,55 +85,55 @@
</div>
<div class="mb-3">
<label for="borrowingAsset" class="form-label">Asset to Borrow</label>
<select class="form-select" id="borrowingAsset" name="asset_id" required>
<label for="receivingAsset" class="form-label">Asset to Receive</label>
<select class="form-select" id="receivingAsset" name="asset_id" required>
<option value="TFT" selected>ThreeFold Token (TFT)</option>
<option value="BTC">Bitcoin (BTC)</option>
<option value="ETH">Ethereum (ETH)</option>
<option value="USDT">Tether (USDT)</option>
<option value="ZAZ">Zanzibar Token (ZAZ)</option>
<option value="ZDFZ">Zanzibar Token (ZDFZ)</option>
</select>
</div>
<div class="mb-3">
<label for="borrowingAmount" class="form-label">Borrow Amount</label>
<label for="receivingAmount" class="form-label">Receiving Amount</label>
<div class="input-group">
<input type="number" class="form-control" id="borrowingAmount" name="amount" min="0.01" step="0.01" required>
<span class="input-group-text" id="borrowingAssetSymbol">TFT</span>
<input type="number" class="form-control" id="receivingAmount" name="amount" min="0.01" step="0.01" required>
<span class="input-group-text" id="receivingAssetSymbol">TFT</span>
</div>
<div class="form-text">You can borrow up to 70% of your collateral value.</div>
<div class="form-text">You can receive up to 70% of your collateral value.</div>
</div>
<div class="mb-3">
<label for="borrowingTerm" class="form-label">Duration</label>
<select class="form-select" id="borrowingTerm" name="duration" required>
<option value="7">7 days (3.5% APR)</option>
<option value="30" selected>30 days (5.2% APR)</option>
<option value="90">90 days (7.8% APR)</option>
<option value="180">180 days (9.5% APR)</option>
<label for="receivingTerm" class="form-label">Duration</label>
<select class="form-select" id="receivingTerm" name="duration" required>
<option value="7">7 days (3.5% Expected Return %)</option>
<option value="30" selected>30 days (5.2% Expected Return %)</option>
<option value="90">90 days (7.8% Expected Return %)</option>
<option value="180">180 days (9.5% Expected Return %)</option>
</select>
</div>
<div class="alert alert-warning">
<div class="d-flex justify-content-between">
<span>Collateral Ratio:</span>
<strong id="borrowCollateralRatio">0%</strong>
<strong id="collateralRatio">0%</strong>
</div>
<div class="d-flex justify-content-between">
<span>Interest Due:</span>
<strong id="interestDue">0.00 TFT</strong>
<span>Obligation Due:</span>
<strong id="obligationDue">0.00 TFT</strong>
</div>
<div class="d-flex justify-content-between">
<span>Total Repayment:</span>
<strong id="borrowTotalRepayment">0.00 TFT</strong>
<strong id="totalRepayment">0.00 TFT</strong>
</div>
<div class="progress mt-2">
<div id="borrowCollateralRatioBar" class="progress-bar bg-success" role="progressbar" style="width: 0%"></div>
<div id="collateralRatioBar" class="progress-bar bg-success" role="progressbar" style="width: 0%"></div>
</div>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-success">Borrow Asset</button>
<button type="submit" class="btn btn-success">Receive Asset</button>
</div>
</form>
</div>
@@ -141,23 +141,23 @@
</div>
</div>
<!-- Active Lending & Borrowing Positions -->
<!-- Active Providing & Receiving Positions -->
<div class="card mb-4">
<div class="card-header">
<i class="bi bi-list-check me-1"></i> Your Active Positions
</div>
<div class="card-body">
<ul class="nav nav-pills mb-3" id="lendingPositionsTabs" role="tablist">
<ul class="nav nav-pills mb-3" id="positionsTabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="lending-positions-tab" data-bs-toggle="pill" data-bs-target="#lending-positions" type="button" role="tab" aria-controls="lending-positions" aria-selected="true">Lending</button>
<button class="nav-link active" id="providing-positions-tab" data-bs-toggle="pill" data-bs-target="#providing-positions" type="button" role="tab" aria-controls="providing-positions" aria-selected="true">Providing</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="borrowing-positions-tab" data-bs-toggle="pill" data-bs-target="#borrowing-positions" type="button" role="tab" aria-controls="borrowing-positions" aria-selected="false">Borrowing</button>
<button class="nav-link" id="receiving-positions-tab" data-bs-toggle="pill" data-bs-target="#receiving-positions" type="button" role="tab" aria-controls="receiving-positions" aria-selected="false">Receiving</button>
</li>
</ul>
<div class="tab-content" id="lendingPositionsTabsContent">
<div class="tab-pane fade show active" id="lending-positions" role="tabpanel" aria-labelledby="lending-positions-tab">
<div class="tab-content" id="positionsTabsContent">
<div class="tab-pane fade show active" id="providing-positions" role="tabpanel" aria-labelledby="providing-positions-tab">
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
@@ -165,17 +165,17 @@
<th>Asset</th>
<th>Amount</th>
<th>Value</th>
<th>APY</th>
<th>Expected Return %</th>
<th>Start Date</th>
<th>End Date</th>
<th>Interest Earned</th>
<th>Profit Share Earned</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% if lending_positions and lending_positions|length > 0 %}
{% for position in lending_positions %}
{% if providing_positions and providing_positions|length > 0 %}
{% for position in providing_positions %}
<tr>
<td>
<div class="d-flex align-items-center">
@@ -185,10 +185,10 @@
</td>
<td>{{ position.base.amount }} {{ position.base.asset_symbol }}</td>
<td>${{ position.base.value_usd | round(precision = 2) }}</td>
<td>{{ position.base.apy }}%</td>
<td>{{ position.base.expected_return }}%</td>
<td>{{ position.base.created_at | date }}</td>
<td>{{ position.base.expires_at | date }}</td>
<td>{{ position.interest_earned | round(precision = 2) }} {{ position.base.asset_symbol }}</td>
<td>{{ position.profit_share_earned | round(precision = 2) }} {{ position.base.asset_symbol }}</td>
<td>
<span class="badge bg-{% if position.base.status == 'Active' %}success{% elif position.base.status == 'Completed' %}info{% elif position.base.status == 'Liquidated' %}danger{% else %}warning{% endif %}">
{{ position.base.status }}
@@ -203,23 +203,23 @@
{% endfor %}
{% else %}
<tr>
<td colspan="9" class="text-center">No active lending positions found</td>
<td colspan="9" class="text-center">No active providing positions found</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="borrowing-positions" role="tabpanel" aria-labelledby="borrowing-positions-tab">
<div class="tab-pane fade" id="receiving-positions" role="tabpanel" aria-labelledby="receiving-positions-tab">
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Borrowed Asset</th>
<th>Received Asset</th>
<th>Amount</th>
<th>Collateral</th>
<th>Collateral Ratio</th>
<th>Interest Rate</th>
<th>Expected Return %</th>
<th>Start Date</th>
<th>Due Date</th>
<th>Status</th>
@@ -227,8 +227,8 @@
</tr>
</thead>
<tbody>
{% if borrowing_positions and borrowing_positions|length > 0 %}
{% for position in borrowing_positions %}
{% if receiving_positions and receiving_positions|length > 0 %}
{% for position in receiving_positions %}
<tr>
<td>
<div class="d-flex align-items-center">
@@ -251,7 +251,7 @@
<span>{{ position.collateral_ratio | round(precision=0) }}%</span>
</div>
</td>
<td>{{ position.base.apy }}%</td>
<td>{{ position.base.expected_return }}%</td>
<td>{{ position.base.created_at|date }}</td>
<td>{{ position.base.expires_at|date }}</td>
<td>
@@ -268,7 +268,7 @@
{% endfor %}
{% else %}
<tr>
<td colspan="9" class="text-center">No active borrowing positions found</td>
<td colspan="9" class="text-center">No active receiving positions found</td>
</tr>
{% endif %}
</tbody>

View File

@@ -35,9 +35,9 @@
<div class="d-flex align-items-center">
<div class="position-relative me-2">
<img src="/static/img/tokens/tft.png" alt="TFT" width="24" height="24" class="rounded-circle">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle position-absolute" style="left: 15px; top: 0;">
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle position-absolute" style="left: 15px; top: 0;">
</div>
TFT-ZAZ
TFT-ZDFZ
</div>
</td>
<td>$1,250,000</td>
@@ -47,8 +47,8 @@
<td>0.2%</td>
<td>
<div class="btn-group">
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addLiquidityModal" data-pool="TFT-ZAZ">Add</button>
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#removeLiquidityModal" data-pool="TFT-ZAZ">Remove</button>
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addLiquidityModal" data-pool="TFT-ZDFZ">Add</button>
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#removeLiquidityModal" data-pool="TFT-ZDFZ">Remove</button>
</div>
</td>
</tr>
@@ -78,10 +78,10 @@
<td>
<div class="d-flex align-items-center">
<div class="position-relative me-2">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle">
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle">
<img src="/static/img/tokens/usdt.png" alt="USDT" width="24" height="24" class="rounded-circle position-absolute" style="left: 15px; top: 0;">
</div>
ZAZ-USDT
ZDFZ-USDT
</div>
</td>
<td>$850,000</td>
@@ -91,8 +91,8 @@
<td>0.59%</td>
<td>
<div class="btn-group">
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addLiquidityModal" data-pool="ZAZ-USDT">Add</button>
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#removeLiquidityModal" data-pool="ZAZ-USDT">Remove</button>
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addLiquidityModal" data-pool="ZDFZ-USDT">Add</button>
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#removeLiquidityModal" data-pool="ZDFZ-USDT">Remove</button>
</div>
</td>
</tr>
@@ -113,16 +113,16 @@
</div>
<div class="card-body">
<div class="row">
<!-- TFT-ZAZ Position -->
<!-- TFT-ZDFZ Position -->
<div class="col-md-6 col-lg-4 mb-4">
<div class="card h-100">
<div class="card-header bg-light">
<div class="d-flex align-items-center">
<div class="position-relative me-2">
<img src="/static/img/tokens/tft.png" alt="TFT" width="24" height="24" class="rounded-circle">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle position-absolute" style="left: 15px; top: 0;">
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle position-absolute" style="left: 15px; top: 0;">
</div>
TFT-ZAZ
TFT-ZDFZ
</div>
</div>
<div class="card-body">
@@ -139,8 +139,8 @@
<strong>500 TFT</strong>
</div>
<div class="d-flex justify-content-between mb-2">
<span>ZAZ:</span>
<strong>1,250 ZAZ</strong>
<span>ZDFZ:</span>
<strong>1,250 ZDFZ</strong>
</div>
<div class="d-flex justify-content-between mb-2">
<span>Earned Fees:</span>
@@ -151,24 +151,24 @@
<strong class="text-success">12.5%</strong>
</div>
<div class="d-grid gap-2">
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addLiquidityModal" data-pool="TFT-ZAZ">Add Liquidity</button>
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#removeLiquidityModal" data-pool="TFT-ZAZ">Remove Liquidity</button>
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addLiquidityModal" data-pool="TFT-ZDFZ">Add Liquidity</button>
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#removeLiquidityModal" data-pool="TFT-ZDFZ">Remove Liquidity</button>
<button class="btn btn-sm btn-outline-success">Claim Rewards</button>
</div>
</div>
</div>
</div>
<!-- ZAZ-USDT Position -->
<!-- ZDFZ-USDT Position -->
<div class="col-md-6 col-lg-4 mb-4">
<div class="card h-100">
<div class="card-header bg-light">
<div class="d-flex align-items-center">
<div class="position-relative me-2">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle">
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle">
<img src="/static/img/tokens/usdt.png" alt="USDT" width="24" height="24" class="rounded-circle position-absolute" style="left: 15px; top: 0;">
</div>
ZAZ-USDT
ZDFZ-USDT
</div>
</div>
<div class="card-body">
@@ -181,8 +181,8 @@
<strong>0.59%</strong>
</div>
<div class="d-flex justify-content-between mb-2">
<span>ZAZ:</span>
<strong>2,500 ZAZ</strong>
<span>ZDFZ:</span>
<strong>2,500 ZDFZ</strong>
</div>
<div class="d-flex justify-content-between mb-2">
<span>USDT:</span>
@@ -197,8 +197,8 @@
<strong class="text-success">15.8%</strong>
</div>
<div class="d-grid gap-2">
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addLiquidityModal" data-pool="ZAZ-USDT">Add Liquidity</button>
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#removeLiquidityModal" data-pool="ZAZ-USDT">Remove Liquidity</button>
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addLiquidityModal" data-pool="ZDFZ-USDT">Add Liquidity</button>
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#removeLiquidityModal" data-pool="ZDFZ-USDT">Remove Liquidity</button>
<button class="btn btn-sm btn-outline-success">Claim Rewards</button>
</div>
</div>
@@ -226,7 +226,7 @@
<select class="form-select" id="firstToken" name="first_token" required>
<option value="" selected disabled>Select first token</option>
<option value="TFT">ThreeFold Token (TFT)</option>
<option value="ZAZ">Zanzibar Token (ZAZ)</option>
<option value="ZDFZ">Zanzibar Token (ZDFZ)</option>
<option value="BTC">Bitcoin (BTC)</option>
<option value="ETH">Ethereum (ETH)</option>
<option value="USDT">Tether (USDT)</option>
@@ -246,7 +246,7 @@
<select class="form-select" id="secondToken" name="second_token" required>
<option value="" selected disabled>Select second token</option>
<option value="TFT">ThreeFold Token (TFT)</option>
<option value="ZAZ">Zanzibar Token (ZAZ)</option>
<option value="ZDFZ">Zanzibar Token (ZDFZ)</option>
<option value="BTC">Bitcoin (BTC)</option>
<option value="ETH">Ethereum (ETH)</option>
<option value="USDT">Tether (USDT)</option>
@@ -256,7 +256,7 @@
<label for="secondTokenAmount" class="form-label">Amount</label>
<div class="input-group">
<input type="number" class="form-control" id="secondTokenAmount" name="second_token_amount" min="0.000001" step="0.000001" required>
<span class="input-group-text" id="secondTokenSymbol">ZAZ</span>
<span class="input-group-text" id="secondTokenSymbol">ZDFZ</span>
</div>
</div>
</div>
@@ -268,7 +268,7 @@
<span class="input-group-text" id="firstTokenSymbolRatio">TFT</span>
<span class="input-group-text">=</span>
<input type="number" class="form-control" id="initialPrice" name="initial_price" min="0.000001" step="0.000001" required>
<span class="input-group-text" id="secondTokenSymbolRatio">ZAZ</span>
<span class="input-group-text" id="secondTokenSymbolRatio">ZDFZ</span>
</div>
</div>
<div class="mb-3">

View File

@@ -1,6 +1,6 @@
<div class="tab-pane fade show active" id="overview" role="tabpanel" aria-labelledby="overview-tab">
<div class="alert alert-info">
<h4 class="alert-heading"><i class="bi bi-info-circle"></i> Welcome to the ZAZ DeFi Platform!</h4>
<h4 class="alert-heading"><i class="bi bi-info-circle"></i> Welcome to the ZDFZ DeFi Platform!</h4>
<p>Our decentralized finance platform allows you to maximize the value of your digital assets through various financial services.</p>
<hr>
<p class="mb-0">Use the tabs above to explore lending, borrowing, liquidity pools, staking, swapping, and collateralization features.</p>

View File

@@ -0,0 +1,260 @@
{#
This is a compliant version of the previous lending_borrowing.html tab. All terminology is updated to "Providing" and "Receiving".
#}
<div class="tab-pane fade" id="providing-receiving" role="tabpanel" aria-labelledby="providing-receiving-tab">
<div class="row">
<div class="col-md-6">
<div class="card mb-4">
<div class="card-header bg-primary text-white">
<i class="bi bi-box-arrow-right me-1"></i> Provide Your Assets
</div>
<div class="card-body">
<p class="card-text">Earn profit share by providing your digital assets to the ZDFZ DeFi platform.</p>
<form action="/defi/providing" method="post">
<div class="mb-3">
<label for="asset" class="form-label">Select Asset</label>
<select class="form-select" id="asset" name="asset_id" required>
<option value="" selected disabled>Choose an asset to provide</option>
{% for asset in recent_assets %}
{% if asset.status == 'Active' %}
<option value="{{ asset.id }}" data-type="{{ asset.asset_type }}" data-value="{{ asset.current_valuation }}">
{{ asset.name }} ({{ asset.asset_type }}) - ${{ asset.current_valuation }}
</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="mb-3">
<label for="amount" class="form-label">Amount</label>
<div class="input-group">
<input type="number" class="form-control" id="amount" name="amount" min="0.01" step="0.01" required>
<span class="input-group-text" id="assetSymbol">TFT</span>
</div>
</div>
<div class="mb-3">
<label for="duration" class="form-label">Duration</label>
<select class="form-select" id="duration" name="duration" required>
<option value="7">7 days (2.5% Expected Return %)</option>
<option value="30" selected>30 days (4.2% Expected Return %)</option>
<option value="90">90 days (6.8% Expected Return %)</option>
<option value="180">180 days (8.5% Expected Return %)</option>
<option value="365">365 days (12.0% Expected Return %)</option>
</select>
</div>
<div class="alert alert-success">
<div class="d-flex justify-content-between">
<span>Estimated Profit Share:</span>
<strong id="profitShareEstimate">0.00 TFT</strong>
</div>
<div class="d-flex justify-content-between">
<span>Expected Return:</span>
<strong id="returnAmount">0.00 TFT</strong>
</div>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-primary">Provide Asset</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card mb-4">
<div class="card-header bg-success text-white">
<i class="bi bi-box-arrow-in-left me-1"></i> Receive Against Assets
</div>
<div class="card-body">
<p class="card-text">Receive digital assets by contributing your existing assets as security.</p>
<form action="/defi/receiving" method="post">
<div class="mb-3">
<label for="collateralAsset" class="form-label">Collateral Asset</label>
<select class="form-select" id="collateralAsset" name="collateral_asset_id" required>
<option value="" selected disabled>Choose a collateral asset</option>
{% for asset in recent_assets %}
{% if asset.status == 'Active' %}
<option value="{{ asset.id }}" data-type="{{ asset.asset_type }}" data-value="{{ asset.current_valuation }}">
{{ asset.name }} ({{ asset.asset_type }}) - ${{ asset.current_valuation }}
</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="mb-3">
<label for="collateralAmount" class="form-label">Collateral Amount</label>
<div class="input-group">
<input type="number" class="form-control" id="collateralAmount" name="collateral_amount" min="0.01" step="0.01" required>
<span class="input-group-text" id="collateralAssetSymbol">TFT</span>
</div>
</div>
<div class="mb-3">
<label for="receivingAsset" class="form-label">Asset to Receive</label>
<select class="form-select" id="receivingAsset" name="asset_id" required>
<option value="" selected disabled>Choose an asset to receive</option>
{% for asset in recent_assets %}
{% if asset.status == 'Active' %}
<option value="{{ asset.id }}" data-type="{{ asset.asset_type }}" data-value="{{ asset.current_valuation }}">
{{ asset.name }} ({{ asset.asset_type }}) - ${{ asset.current_valuation }}
</option>
{% endif %}
{% endfor %}
</select>
<div class="form-text">You can receive up to 70% of your collateral value.</div>
</div>
<div class="mb-3">
<label for="receivingTerm" class="form-label">Duration</label>
<select class="form-select" id="receivingTerm" name="duration" required>
<option value="7">7 days (3.5% Profit Share Rate)</option>
<option value="30" selected>30 days (5.2% Profit Share Rate)</option>
<option value="90">90 days (8.1% Profit Share Rate)</option>
<option value="180">180 days (9.5% Profit Share Rate)</option>
</select>
</div>
<div class="alert alert-warning">
<div class="d-flex justify-content-between">
<span>Collateral Ratio:</span>
<strong id="collateralRatio">0.00%</strong>
</div>
<div class="d-flex justify-content-between">
<span>Profit Share Owed:</span>
<strong id="profitShareOwed">0.00 TFT</strong>
</div>
<div class="d-flex justify-content-between">
<span>Total to Repay:</span>
<strong id="totalToRepay">0.00 TFT</strong>
</div>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-success">Receive Asset</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row mt-4">
<div class="col-12">
<div class="card">
<div class="card-header bg-primary text-white">
<i class="bi bi-list-ul me-1"></i> Providing Positions
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-striped table-hover mb-0">
<thead>
<tr>
<th>Asset</th>
<th>Amount</th>
<th>Expected Return</th>
<th>Start Date</th>
<th>Due Date</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% if providing_positions and providing_positions|length > 0 %}
{% for position in providing_positions %}
<tr>
<td>
<div class="d-flex align-items-center">
<div class="token-icon me-2"></div>
{{ position.base.asset_name }}
</div>
</td>
<td>{{ position.base.amount }} {{ position.base.asset_symbol }}</td>
<td>{{ position.base.expected_return }}%</td>
<td>{{ position.base.created_at|date }}</td>
<td>{{ position.base.expires_at|date }}</td>
<td>
<span class="badge bg-{% if position.base.status == 'Active' %}success{% elif position.base.status == 'Completed' %}info{% elif position.base.status == 'Liquidated' %}danger{% else %}warning{% endif %}">
{{ position.base.status }}
</span>
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="6" class="text-center">No active providing positions found</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row mt-4">
<div class="col-12">
<div class="card">
<div class="card-header bg-success text-white">
<i class="bi bi-list-ul me-1"></i> Receiving Positions
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-striped table-hover mb-0">
<thead>
<tr>
<th>Asset</th>
<th>Amount</th>
<th>Collateral</th>
<th>Collateral Ratio</th>
<th>Profit Share Rate</th>
<th>Start Date</th>
<th>Due Date</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% if receiving_positions and receiving_positions|length > 0 %}
{% for position in receiving_positions %}
<tr>
<td>
<div class="d-flex align-items-center">
<div class="token-icon me-2"></div>
{{ position.base.asset_name }}
</div>
</td>
<td>{{ position.base.amount }} {{ position.base.asset_symbol }}</td>
<td>
<div class="d-flex align-items-center">
<div class="token-icon me-2"></div>
{{ position.collateral_amount }} {{ position.collateral_asset_symbol }}
</div>
</td>
<td>
<div class="d-flex align-items-center">
<div class="progress flex-grow-1 me-2" style="height: 8px;">
<div class="progress-bar {% if position.collateral_ratio >= 200 %}bg-success{% elif position.collateral_ratio >= 150 %}bg-warning{% else %}bg-danger{% endif %}" role="progressbar" style="width: {% if (position.collateral_ratio / 3) > 100 %}100{% else %}{{ position.collateral_ratio / 3 }}{% endif %}%"></div>
</div>
<span>{{ position.collateral_ratio | round(precision=0) }}%</span>
</div>
</td>
<td>{{ position.base.expected_return }}%</td>
<td>{{ position.base.created_at|date }}</td>
<td>{{ position.base.expires_at|date }}</td>
<td>
<span class="badge bg-{% if position.base.status == 'Active' %}success{% elif position.base.status == 'Completed' %}info{% elif position.base.status == 'Liquidated' %}danger{% else %}warning{% endif %}">
{{ position.base.status }}
</span>
</td>
<td>
<div class="btn-group">
<button class="btn btn-sm btn-outline-primary">Repay</button>
</div>
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="9" class="text-center">No active receiving positions found</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -75,23 +75,23 @@
</div>
</div>
<!-- ZAZ Staking -->
<!-- ZDFZ Staking -->
<div class="col-md-6 col-lg-4 mb-4">
<div class="card h-100">
<div class="card-header bg-success text-white">
<div class="d-flex align-items-center">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle me-2">
<h6 class="mb-0">Zanzibar Token (ZAZ)</h6>
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle me-2">
<h6 class="mb-0">Zanzibar Token (ZDFZ)</h6>
</div>
</div>
<div class="card-body">
<div class="d-flex justify-content-between mb-2">
<span>Total Staked:</span>
<strong>2,750,000 ZAZ</strong>
<strong>2,750,000 ZDFZ</strong>
</div>
<div class="d-flex justify-content-between mb-2">
<span>Your Stake:</span>
<strong>500 ZAZ</strong>
<strong>500 ZDFZ</strong>
</div>
<div class="d-flex justify-content-between mb-3">
<span>APY:</span>
@@ -99,7 +99,7 @@
</div>
<form action="/defi/staking" method="post">
<input type="hidden" name="asset_id" value="ZAZ">
<input type="hidden" name="asset_id" value="ZDFZ">
<div class="mb-3">
<label for="zazStakingPeriod" class="form-label">Staking Period</label>
<select class="form-select" id="zazStakingPeriod" name="staking_period">
@@ -113,20 +113,20 @@
<div class="mb-3">
<label for="zazStakeAmount" class="form-label">Amount to Stake</label>
<div class="input-group">
<input type="number" class="form-control" id="zazStakeAmount" name="amount" min="50" step="1" placeholder="Min 50 ZAZ">
<span class="input-group-text">ZAZ</span>
<input type="number" class="form-control" id="zazStakeAmount" name="amount" min="50" step="1" placeholder="Min 50 ZDFZ">
<span class="input-group-text">ZDFZ</span>
</div>
</div>
<div class="alert alert-success mb-3">
<div class="d-flex justify-content-between">
<span>Estimated Rewards:</span>
<strong id="zazEstimatedRewards">0 ZAZ</strong>
<strong id="zazEstimatedRewards">0 ZDFZ</strong>
</div>
</div>
<div class="d-grid gap-2">
<button class="btn btn-success" id="zazStakeButton">Stake ZAZ</button>
<button class="btn btn-success" id="zazStakeButton">Stake ZDFZ</button>
</div>
</form>
</div>
@@ -177,7 +177,7 @@
</div>
<div class="d-flex justify-content-between">
<span>Reward Token:</span>
<strong>ZAZ</strong>
<strong>ZDFZ</strong>
</div>
</div>
@@ -239,16 +239,16 @@
<tr>
<td>
<div class="d-flex align-items-center">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle me-2">
Zanzibar Token (ZAZ)
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle me-2">
Zanzibar Token (ZDFZ)
</div>
</td>
<td>500 ZAZ</td>
<td>500 ZDFZ</td>
<td>$250</td>
<td>2025-04-01</td>
<td>2025-05-01</td>
<td>12.0%</td>
<td>5.0 ZAZ</td>
<td>5.0 ZDFZ</td>
<td><span class="badge bg-success">Active</span></td>
<td>
<button class="btn btn-sm btn-outline-success">Claim Rewards</button>
@@ -258,15 +258,15 @@
<td>
<div class="d-flex align-items-center">
<i class="bi bi-image me-2 text-primary"></i>
Beach Property NFT
Beach Property Artwork
</div>
</td>
<td>1 NFT</td>
<td>1 Artwork</td>
<td>$25,000</td>
<td>2025-02-10</td>
<td>2026-02-10</td>
<td>10.0%</td>
<td>450 ZAZ</td>
<td>450 ZDFZ</td>
<td><span class="badge bg-success">Active</span></td>
<td>
<button class="btn btn-sm btn-outline-success">Claim Rewards</button>

View File

@@ -41,11 +41,11 @@
<small class="text-muted">Balance: 10,000 TFT</small>
</div>
</a></li>
<li><a class="dropdown-item d-flex align-items-center" href="#" data-token="ZAZ" data-img="/static/img/tokens/zaz.png" data-balance="5000">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle me-2">
<li><a class="dropdown-item d-flex align-items-center" href="#" data-token="ZDFZ" data-img="/static/img/tokens/zdfz.png" data-balance="5000">
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle me-2">
<div>
<div>Zanzibar Token</div>
<small class="text-muted">Balance: 5,000 ZAZ</small>
<small class="text-muted">Balance: 5,000 ZDFZ</small>
</div>
</a></li>
<li><a class="dropdown-item d-flex align-items-center" href="#" data-token="USDT" data-img="/static/img/tokens/usdt.png" data-balance="2500">
@@ -82,17 +82,17 @@
<input type="number" class="form-control form-control-lg border-0" id="swapToAmount" name="to_amount" placeholder="0.0" readonly>
<div class="dropdown">
<button class="btn btn-outline-primary dropdown-toggle d-flex align-items-center" type="button" id="toTokenDropdown" data-bs-toggle="dropdown" aria-expanded="false">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle me-2" id="toTokenImg">
<span id="toTokenSymbol">ZAZ</span>
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle me-2" id="toTokenImg">
<span id="toTokenSymbol">ZDFZ</span>
</button>
<input type="hidden" name="to_token" id="toTokenInput" value="ZAZ">
<input type="hidden" name="to_token" id="toTokenInput" value="ZDFZ">
<ul class="dropdown-menu" aria-labelledby="toTokenDropdown">
<li><a class="dropdown-item d-flex align-items-center" href="#" data-token="TFT" data-img="/static/img/tokens/tft.png">
<img src="/static/img/tokens/tft.png" alt="TFT" width="24" height="24" class="rounded-circle me-2">
<div>ThreeFold Token</div>
</a></li>
<li><a class="dropdown-item d-flex align-items-center" href="#" data-token="ZAZ" data-img="/static/img/tokens/zaz.png">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="24" height="24" class="rounded-circle me-2">
<li><a class="dropdown-item d-flex align-items-center" href="#" data-token="ZDFZ" data-img="/static/img/tokens/zdfz.png">
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="24" height="24" class="rounded-circle me-2">
<div>Zanzibar Token</div>
</a></li>
<li><a class="dropdown-item d-flex align-items-center" href="#" data-token="USDT" data-img="/static/img/tokens/usdt.png">
@@ -103,7 +103,7 @@
</div>
</div>
<div class="d-flex justify-content-between align-items-center text-muted small">
<span>Balance: <span id="toTokenBalance">5,000 ZAZ</span></span>
<span>Balance: <span id="toTokenBalance">5,000 ZDFZ</span></span>
<span>≈ $<span id="toTokenUsdValue">2,500.00</span></span>
</div>
</div>
@@ -115,11 +115,11 @@
<div class="card-body p-3">
<div class="d-flex justify-content-between align-items-center small">
<span>Exchange Rate:</span>
<span id="exchangeRate">1 TFT = 0.5 ZAZ</span>
<span id="exchangeRate">1 TFT = 0.5 ZDFZ</span>
</div>
<div class="d-flex justify-content-between align-items-center small">
<span>Minimum Received:</span>
<span id="minimumReceived">0 ZAZ</span>
<span id="minimumReceived">0 ZDFZ</span>
</div>
<div class="d-flex justify-content-between align-items-center small">
<span>Price Impact:</span>
@@ -169,8 +169,8 @@
</td>
<td>
<div class="d-flex align-items-center">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="20" height="20" class="rounded-circle me-1">
250 ZAZ
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="20" height="20" class="rounded-circle me-1">
250 ZDFZ
</div>
</td>
<td>$250.00</td>
@@ -195,8 +195,8 @@
<td>2025-04-12 16:45</td>
<td>
<div class="d-flex align-items-center">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="20" height="20" class="rounded-circle me-1">
100 ZAZ
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="20" height="20" class="rounded-circle me-1">
100 ZDFZ
</div>
</td>
<td>
@@ -235,9 +235,9 @@
<div class="d-flex align-items-center">
<div class="position-relative me-2">
<img src="/static/img/tokens/tft.png" alt="TFT" width="20" height="20" class="rounded-circle">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="20" height="20" class="rounded-circle position-absolute" style="left: 10px; top: 0;">
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="20" height="20" class="rounded-circle position-absolute" style="left: 10px; top: 0;">
</div>
TFT/ZAZ
TFT/ZDFZ
</div>
</td>
<td>0.5</td>
@@ -262,10 +262,10 @@
<td>
<div class="d-flex align-items-center">
<div class="position-relative me-2">
<img src="/static/img/tokens/zaz.png" alt="ZAZ" width="20" height="20" class="rounded-circle">
<img src="/static/img/tokens/zdfz.png" alt="ZDFZ" width="20" height="20" class="rounded-circle">
<img src="/static/img/tokens/usdt.png" alt="USDT" width="20" height="20" class="rounded-circle position-absolute" style="left: 10px; top: 0;">
</div>
ZAZ/USDT
ZDFZ/USDT
</div>
</td>
<td>0.5</td>

View File

@@ -199,7 +199,7 @@
previewContainer.innerHTML = previewHtml;
// Suggest listing type based on asset type
if (assetType === 'NFT') {
if (assetType === 'Artwork') {
listingTypeSelect.value = 'Auction';
} else if (assetType === 'Token') {
listingTypeSelect.value = 'Fixed Price';

View File

@@ -180,7 +180,7 @@
<td>
{% if listing.asset_type == "Token" %}
<span class="badge bg-primary">{{ listing.asset_type }}</span>
{% elif listing.asset_type == "NFT" %}
{% elif listing.asset_type == "Artwork" %}
<span class="badge bg-info">{{ listing.asset_type }}</span>
{% elif listing.asset_type == "RealEstate" %}
<span class="badge bg-success">Real Estate</span>

View File

@@ -61,7 +61,7 @@
<p><strong>Asset Type:</strong>
{% if listing.asset_type == "Token" %}
<span class="badge bg-primary">{{ listing.asset_type }}</span>
{% elif listing.asset_type == "NFT" %}
{% elif listing.asset_type == "Artwork" %}
<span class="badge bg-info">{{ listing.asset_type }}</span>
{% elif listing.asset_type == "RealEstate" %}
<span class="badge bg-success">Real Estate</span>

View File

@@ -99,7 +99,7 @@
<span class="badge bg-primary">{{ listing.listing_type }}</span>
{% if listing.asset_type == "Token" %}
<span class="badge bg-primary">{{ listing.asset_type }}</span>
{% elif listing.asset_type == "NFT" %}
{% elif listing.asset_type == "Artwork" %}
<span class="badge bg-info">{{ listing.asset_type }}</span>
{% elif listing.asset_type == "RealEstate" %}
<span class="badge bg-success">Real Estate</span>
@@ -175,7 +175,7 @@
<td>
{% if listing.asset_type == "Token" %}
<span class="badge bg-primary">{{ listing.asset_type }}</span>
{% elif listing.asset_type == "NFT" %}
{% elif listing.asset_type == "Artwork" %}
<span class="badge bg-info">{{ listing.asset_type }}</span>
{% elif listing.asset_type == "RealEstate" %}
<span class="badge bg-success">Real Estate</span>