Skip to main content

FRT Smart Contract Documentation

Version: 1.1
Last Updated: January 2026

Overview

This document provides comprehensive technical documentation for the FortisArena smart contract ecosystem, consisting of three core contracts:
  • FortisToken.sol: The main FRT token contract (BEP-20)
  • TokenVesting.sol: Vesting contract for token locks
  • FRTStaking.sol: Staking contract for rewards
All contracts are written in Solidity ^0.8.20 and use OpenZeppelin v5 libraries.

Architecture Overview

Contract Summary

ContractPurposeStandard
FortisTokenMain utility tokenBEP-20
TokenVestingLock tokens with cliff and linear vestingCustom
FRTStakingStake tokens to earn rewardsCustom

1. FortisToken Contract

Basic Information

PropertyValue
Token NameFRT
SymbolFRT
Decimals18
Total Supply200,000,000 FRT (Fixed)
BlockchainBNB Smart Chain (BSC)
Solidity Version^0.8.20
OpenZeppelinv5

Security Features

FeatureDescription
No Mint FunctionSupply is fixed at 200M and cannot be increased
BurnableTokens can be permanently burned to reduce supply
Ownable2StepTwo-step ownership transfer prevents accidental loss
Anti-SniperReverts buys in first 3-5 blocks after trading enabled
Max Transaction1% of supply (2,000,000 FRT) per transaction
Max Wallet2% of supply (4,000,000 FRT) maximum holding
Launch HelpersetLaunchAddresses() configures router and pair safely
Trading SwitchTrading disabled until owner enables (requires launch config)
BlacklistBlock malicious addresses from transferring
WhitelistAllow specific addresses to transfer before trading
PausableEmergency pause all transfers
Reentrancy GuardPrevent reentrancy attacks
0% TaxNo buy/sell/transfer tax

Key Functions

Launch Configuration (MUST call before trading)

function setLaunchAddresses(address router, address pair) external onlyOwner
Configures the DEX router and pair addresses. Automatically:
  • Excludes router from limits and maxWallet
  • Sets pair as AMM pair
  • Excludes pair from limits and maxWallet
  • Sets launchConfigured = true

Trading Control

function enableTrading() external onlyOwner
Enables public trading. Requirements:
  • Can only be called once
  • launchConfigured must be true
  • Cannot be disabled once enabled

Anti-Sniper Configuration

function setAntiSniperBlocks(uint256 blocks) external onlyOwner
Sets anti-sniper duration (3-5 blocks). Can only be called before trading is enabled.

Limit Controls (One-Way)

function disableAntiSniper() external onlyOwner
function disableMaxTx() external onlyOwner
function disableMaxWallet() external onlyOwner
Permanently disable protection features. Cannot be re-enabled.

Address Management

function setExcludedFromLimits(address account, bool excluded) external onlyOwner
function setExcludedFromMaxWallet(address account, bool excluded) external onlyOwner
function setWhitelisted(address account, bool whitelisted) external onlyOwner
function setBlacklisted(address account, bool blacklisted) external onlyOwner
function setAMMPair(address pair, bool status) external onlyOwner

Emergency Functions

function pause() external onlyOwner
function unpause() external onlyOwner
function recoverTokens(address token, uint256 amount) external onlyOwner
function recoverETH() external onlyOwner

Owner Capabilities

ActionPossibleNotes
Configure launch addressesYesOnce only
Enable tradingYesOnce only, requires launch config
Set anti-sniper blocks (3-5)YesBefore trading only
Disable limitsYesCannot re-enable
Blacklist addressesYesFor bots only
Whitelist addressesYesFor presale/team
Pause transfersYesEmergency only
Transfer ownershipYesTwo-step process

Owner Restrictions (What Owner CANNOT Do)

ActionPossibleReason
Mint new tokensNoNo mint function exists
Increase supplyNoFixed supply constant
Set taxNoNo tax function exists
Blacklist ownerNoHardcoded protection
Blacklist contractNoHardcoded protection
Re-enable disabled featuresNoOne-way disable only
Enable trading without launch configNoSafety check enforced

Custom Errors

ErrorDescription
ZeroAddress()Address cannot be zero
InvalidAmount()Amount cannot be zero
TradingNotEnabled()Trading is not yet enabled
AlreadyEnabled()Feature is already enabled
AlreadyDisabled()Feature is already disabled
AlreadyConfigured()Launch already configured
LaunchNotConfigured()Must call setLaunchAddresses first
InvalidAntiSniperBlocks()Blocks must be 3-5
AddressIsBlacklisted()Address is blacklisted
SniperDetected()Sniper bot detected
ExceedsMaxTransaction()Amount exceeds max TX
ExceedsMaxWallet()Balance would exceed max wallet
BatchTooLarge()Batch size exceeds 100
CannotBlacklistOwner()Cannot blacklist owner
CannotBlacklistContract()Cannot blacklist contract
ETHTransferFailed()ETH transfer failed

2. TokenVesting Contract

Purpose

Locks tokens with configurable cliff periods and linear vesting. Used for team, advisor, and presale token locks.

Features

FeatureDescription
Multiple SchedulesMultiple vesting schedules per beneficiary
Configurable CliffSet cliff period before any tokens unlock
Linear VestingTokens unlock linearly after cliff
RevocableOptional ability to revoke unvested tokens
Batch CreationCreate multiple schedules in one transaction
TransparentAll schedules viewable on-chain

Vesting Categories

Category IDType
0Team
1Advisor
2Presale
3Other

Key Functions

Create Vesting Schedule

function createVestingSchedule(
    address _beneficiary,
    uint256 _totalAmount,
    uint256 _startTime,
    uint256 _cliffDuration,
    uint256 _vestingDuration,
    bool _revocable,
    uint8 _category
) external onlyOwner returns (bytes32 scheduleId)

Release Tokens

function release(bytes32 _scheduleId) external
function releaseAll(address _beneficiary) external

View Functions

function getReleasableAmount(bytes32 _scheduleId) external view returns (uint256)
function getVestedAmount(bytes32 _scheduleId) external view returns (uint256)
function getBeneficiarySchedules(address _beneficiary) external view returns (bytes32[] memory)

3. FRTStaking Contract

Purpose

Allows FRT holders to stake their tokens and earn rewards. Supports multiple pools with different lock periods and APY rates.

Default Pools

Pool IDLock DurationAPYMinimum Stake
0Flexible (0)10%1,000 FRT
130 Days15%1,000 FRT
290 Days20%1,000 FRT
3180 Days25%1,000 FRT
4365 Days30%1,000 FRT

Features

FeatureDescription
Multiple PoolsDifferent lock periods with different APY
Flexible StakingNo-lock option available
Compound RewardsAdd rewards to stake automatically
Emergency WithdrawWithdraw early with 20% penalty
Transparent RewardsReal-time reward calculation

Key Functions

Staking

function stake(uint256 _poolId, uint256 _amount) external
function unstake(uint256 _stakeIndex) external
function claimRewards(uint256 _stakeIndex) external
function compoundRewards(uint256 _stakeIndex) external
function emergencyWithdraw(uint256 _stakeIndex) external

View Functions

function pendingRewards(address _user, uint256 _stakeIndex) external view returns (uint256)
function getUserStakes(address _user) external view returns (Stake[] memory)
function getPoolInfo(uint256 _poolId) external view returns (Pool memory)

Admin Functions

function createPool(uint256 _lockDuration, uint256 _apy, uint256 _minStake) external onlyOwner
function updatePool(uint256 _poolId, uint256 _apy, bool _active) external onlyOwner
function depositRewards(uint256 _amount) external onlyOwner
function withdrawRewards(uint256 _amount) external onlyOwner

4. Deployment Guide

Prerequisites

npm install @openzeppelin/contracts@^5.0.0

Deployment Order

  1. Deploy FortisToken: FortisToken.deploy(ownerAddress)
  2. Deploy TokenVesting: TokenVesting.deploy(frt.address, ownerAddress)
  3. Deploy FRTStaking: FRTStaking.deploy(frt.address, ownerAddress)

Launch Sequence

5. Security Recommendations

  • Audit: Get professional audit before mainnet deployment
  • Multi-Sig: Transfer ownership to Gnosis Safe multi-sig
  • Timelock: Consider adding timelock for major operations
  • Testnet: Thoroughly test on BSC Testnet first
  • Verification: Verify all contracts on BscScan

6. License

All contracts are released under the MIT License.
FortisArena - Building the Future of Competitive Gaming