Shield Finance ($SHIELD) Deployment Guide

Overview

Complete deployment guide for Shield Finance fair launch on Flare Network mainnet.

Token Parameters:

  • Total Supply: 10,000,000 SHIELD (fixed, immutable)

  • Blockchain: Flare Network

  • Token Decimals: 18

  • LP Lock: 12 months (Team Finance or equivalent) (TBC)

Status: Launch details are TBC (To Be Confirmed). This guide covers planned deployment steps.


Table of Contents


Pre-Deployment Checklist

Environment Setup

Security Requirements

Pre-Deployment Test (Testnet)


Deployment Sequence

Step 1: Deploy ShieldToken

Contract: ShieldToken.sol Constructor: No parameters Initial State: 10M SHIELD minted to deployer

Expected Output:

Verification:

⚠️ CRITICAL: Save SHIELD_TOKEN_ADDRESS immediately. All subsequent steps depend on it.


Step 2: Deploy RevenueRouter

Contract: RevenueRouter.sol Constructor: (address _shieldToken, address _fxrpToken, address _router, uint256 _initialPrice) Parameters:

  • _shieldToken: Address from Step 1

  • _fxrpToken: FXRP address (mainnet: 0xAd552A648C74D49E10027AB8a618A3ad4901c5bE)

  • _router: 0x8a1E35F5c98C4E85B36B7B253222eE17773b2781 (SparkDEX V3 SwapRouter)

  • _initialPrice: Initial FXRP/SHIELD price (scaled by 1e18), e.g., 1e16 = $0.01

Expected Output:

Verification:


Step 3: Deploy StakingBoost

Contract: StakingBoost.sol Constructor: (address _shieldToken) Parameters:

  • _shieldToken: Address from Step 1

Expected Output:

Verification:

💡 Integration with ShXRPVault: NOTE: The ShXRPVault deployment is a separate step not included in this fair launch script.

When deploying ShXRPVault (typically after shield-finance.ts completes), pass the STAKING_BOOST_ADDRESS to the vault constructor:

Vault constructor signature:

This enables the APY boost mechanism:

  • Users stake SHIELD tokens (30-day lock)

  • +1% APY boost per 100 SHIELD staked

  • Boost applies during redemption via _withdraw() using owner's stake

  • ERC-4626 compliant: previewRedeem() remains pure, boost calculated separately via previewRedeemWithBoost(shares, user)

  • Economic flywheel: Higher APY → More deposits → More SHIELD demand → Buyback & burn

Frontend Integration: Set VITE_STAKING_BOOST_ADDRESS in .env for the /staking page to connect to the contract.


Step 4: Deploy MerkleDistributor

Contract: MerkleDistributor.sol Constructor: (address _token, bytes32 _merkleRoot) Parameters:

  • _token: Address from Step 1

  • _merkleRoot: Generated off-chain from airdrop allocation

Expected Output:

Verification:

⚠️ SECURITY WARNING: The merkle root is IMMUTABLE after deployment. Double-check that:

  1. Root matches your generated merkle tree

  2. Airdrop amounts total exactly 2,000,000 SHIELD

  3. No duplicate addresses in tree

  4. Test claims work with generated proofs


Step 5: Add Liquidity to SparkDEX V3 (TBC)

Target: 1,000,000 SHIELD + 535,451 wFLR = ~$10,000 (TBC) Pool Fee: 0.3% (3000) Price Range: ±100% (wide range for stability)

Expected Output:

Verification:

⚠️ CRITICAL: Proceed immediately to Step 6 to lock LP NFT.


Step 6: Lock LP NFT (12 Months) (TBC)

Platform: Team Finance (https://www.team.finance/) Duration: 365 days (31,536,000 seconds) (TBC) LP NFT: From Step 5

Process:

  1. Navigate to Team Finance Flare Locker

  2. Select "Lock Liquidity (V3)"

  3. Input LP NFT Token ID from Step 5

  4. Set lock duration: 365 days

  5. Confirm lock transaction

  6. SAVE LOCK RECEIPT - needed for unlock after 12 months

Verification:

⚠️ WARNING: Once locked, LP cannot be accessed until expiry. Verify:

  • Correct NFT ID

  • Correct lock duration (365 days)

  • Lock receipt saved securely


Step 7: Fund MerkleDistributor

Amount: 2,000,000 SHIELD (20% of total supply) From: Deployer wallet To: MerkleDistributor address

Expected Output:

Note: After funding the airdrop (20%), the remaining 8M tokens will be distributed according to the Treasury Allocations table below.

Verification:


Post-Deployment Token Distribution

After all steps complete, verify final token distribution:

Category
Percentage
Tokens
Purpose

Team

9.00%

900,000

Core team allocation

Advisors

5.00%

500,000

Strategic advisors

Ecosystem Development

15.00%

1,500,000

Protocol development & growth

Airdrops

20.00%

2,000,000

Community distribution

Marketing

3.50%

350,000

Marketing & awareness

Ambassadors

2.50%

250,000

Community ambassadors

Ecosystem Rewards

0.00%

0

Reserved for future use

Staking Rewards

0.00%

0

Reserved for future use

Treasury

10.00%

1,000,000

Protocol treasury

Liquidity / MM / Exchanges

10.00%

1,000,000

Initial DEX liquidity

Future Liquidity Adds

25.00%

2,500,000

Future liquidity expansion

Total

100%

10,000,000

Fixed supply

Verification Script:

Expected Output:


Contract Configuration

RevenueRouter Configuration

Purpose: Routes vault FXRP revenue (50% buyback & burn, 40% staker boost, 10% reserves)

Configurable Parameters:

  • burnAllocationBps: % of revenue for SHIELD buyback & burn (default: 5000 = 50%)

  • boostAllocationBps: % of revenue for staker boost (default: 4000 = 40%)

  • maxSlippageBps: Max slippage on FXRP→SHIELD swaps (default: 500 = 5%, max: 2000 = 20%)

  • minDistributionThreshold: Minimum FXRP balance before distribution (default: 1e6 = 1 FXRP)

Revenue Flow:

  1. ShXRPVault sends FXRP fees to RevenueRouter

  2. Anyone calls distribute() when balance > threshold

  3. 50% swapped FXRP → SHIELD via SparkDEX V3 and burned

  4. 40% sent as FXRP directly to StakingBoost for staker rewards

  5. 10% kept as protocol reserves (owner withdrawable)

Security Features:

  • forceApprove() used for all token approvals (SafeERC20)

  • Allowances cleared after each operation (prevents residual approval attacks)

  • Configurable slippage protection with price tracking

  • rescueTokens() blocks FXRP extraction (operational token)

Weekly Burn Automation:

MerkleDistributor Configuration

Purpose: Airdrop 2M SHIELD to eligible addresses

No configuration needed - merkle root is immutable.

Claim Process:

  1. Users generate proof off-chain (from merkle tree)

  2. Call claim(amount, proof) on MerkleDistributor

  3. Tokens transferred immediately if proof valid

  4. hasClaimed[user] set to true (prevents double-claim)

Owner Functions:

  • withdraw(recipient, amount) - Withdraw unclaimed tokens (after 3-6 months recommended)

StakingBoost Configuration

Purpose: Stake SHIELD for vault APY boost

Parameters:

  • Lock Period: 30 days (LOCK_PERIOD constant)

  • Boost Formula: 1% boost per 100 SHIELD staked

No configuration needed - parameters are immutable.


Post-Deployment Verification

Automated Verification

Checks:

  • ✅ All contracts deployed and verified on block explorer

  • ✅ Total supply = 10M SHIELD

  • ✅ Token distribution correct (see Treasury Allocations table)

  • ✅ LP NFT locked for 12 months (TBC)

  • ✅ MerkleDistributor funded with 2M SHIELD

  • ✅ RevenueRouter configured correctly

  • ✅ StakingBoost lock period = 30 days

  • ✅ Ownership transferred (if applicable)

Manual Verification Checklist

Before mainnet launch, consider:


Emergency Procedures

Critical Issues During Deployment

Issue: Wrong merkle root deployed

  • Impact: Airdrop claims will fail

  • Solution: Deploy new MerkleDistributor with correct root, fund it, announce address change

  • Prevention: Triple-check root before deployment, test claims on testnet

Issue: LP NFT not locked

  • Impact: Liquidity not secured, fair launch compromised

  • Solution: Lock immediately via Team Finance

  • Prevention: Lock LP NFT immediately after creation (Step 6)

Issue: Incorrect RevenueRouter parameters

  • Impact: Revenue routing fails, burns don't work

  • Solution: Deploy new RevenueRouter with correct parameters

  • Prevention: Verify constructor args before deployment

Post-Deployment Issues

Issue: distribute() fails on RevenueRouter

  • Cause: Insufficient wFLR balance or DEX liquidity too low

  • Check: cast call <WFLR_ADDRESS> "balanceOf(address)" <REVENUE_ROUTER_ADDRESS>

  • Solution: Wait for more revenue accumulation or check DEX pool

Issue: Airdrop claims failing

  • Cause: Invalid proofs or merkle tree mismatch

  • Check: Verify merkle root matches, test proof generation

  • Solution: Re-generate proofs, verify tree construction

Issue: StakingBoost withdrawals failing

  • Cause: Lock period not expired

  • Check: cast call <STAKING_BOOST_ADDRESS> "stakes(address)" <USER_ADDRESS>

  • Solution: Wait until unlockTime < block.timestamp

Contract Ownership

Current Owner: Deployer address Owner Functions:

  • RevenueRouter: withdrawReserves(address, uint256)

  • MerkleDistributor: withdraw(address, uint256)

Ownership Transfer (Optional):

⚠️ WARNING: Once ownership transferred, deployer loses control. Ensure:

  • Multisig threshold configured correctly (e.g., 3-of-5)

  • All signers have access and understand responsibilities

  • Emergency procedures documented for multisig


Deployment Costs (Estimated)

Action
Estimated Gas
Cost @ 25 Gwei
Notes

Deploy ShieldToken

~1,500,000

~0.0375 FLR

ERC20 + burnable

Deploy RevenueRouter

~800,000

~0.02 FLR

Immutable config

Deploy StakingBoost

~1,200,000

~0.03 FLR

Staking logic

Deploy MerkleDistributor

~600,000

~0.015 FLR

Merkle verification

Add SparkDEX V3 LP

~500,000

~0.0125 FLR

Create position

Lock LP NFT

~150,000

~0.00375 FLR

Team Finance

Fund Airdrop (2M SHIELD)

~50,000

~0.00125 FLR

ERC20 transfer

Total

~4,800,000

~0.12 FLR

+ 20% buffer

Recommended: Fund deployer with 5 FLR for deployment + buffer.


Support & Resources

  • GitHub: https://github.com/shyield-finance/contracts

  • Documentation: https://shield-finance.gitbook.io/shield-finance-docs/

  • X (Twitter): https://x.com/ShieldFinanceX

  • Telegram Official: https://t.me/ShieldFinanceOfficial

  • Telegram Community: https://t.me/ShieldFinanceCommunity

  • Discord: https://discord.gg/D8g8sumY

  • Block Explorer: https://flare-explorer.flare.network

  • SparkDEX Docs: https://docs.sparkdex.ai

  • Team Finance: https://www.team.finance


Appendix: Quick Reference

Contract Addresses (Fill after deployment)

Key Addresses (Flare Mainnet)

Important Constants


Deployment Version: 1.1.0 Last Updated: December 6, 2025 Status: Production Ready (150/150 tests passing)

Last updated