Professional Documents
Culture Documents
AUDIT
BASEBALLFARM
Website:
https://baseballfarm6x1.finance/
Contract:
0xfa7D2296Be5749A9A4a83e01B505dA35b17493B5
TRUSTCRYPTO.APP
20-05-2022
2
INDEX
3.Result …………………………………………………
Issues Details ……………………………………..
4.Description of the Smart-Contract …………
Deposit fee ………………………………………….
Withdraw fee……….……………………………….
5.Investment Plans …………………………………
Deposit (buyBalls)…..…………………………….
Price Formula……………………………………….
WITHDRAW (sellBalls)…..……………………….
Withdraw Formula:…..…………………………….
6.Market Eggs………………...……………………….
User Eggs…………………....……………………….
Compound (addImprovement)………..……….
7.Referral System .………………………………….
8.DISCLAIMER ……………………………………….
9.Source Code ………………………………….
TRUSTCRYPTO.APP
20-05-2022
3
RESULT
There were no vulnerabilities, backdoors, or scam scripts
discovered in the BASEBALLFARM Smart-Contract.
The code was simulated and manually reviewed for all commonly
known and specific vulnerabilities using compatible compilers.
As a result, the BASEBALLFARM Smart-Contract can be used in the
Fantom Smart Chain main network without risk.
CRITICAL ISSUES
(critical, high severity):
HIGH ISSUES (high,
medium severity):
ERRORS, WARNINGS
(medium, low severity):
OPTIMIZATION (low
severity):
RECOMMENDATIONS
(very low severity):
HIGH ISSUE
The ROI system is used, and it is HIGH-RISK.
Users cannot withdraw their initial deposits, but they can receive
dividends and referral commissions. Dividends are paid out of other
user’s deposits.
TRUSTCRYPTO.APP
20-05-2022
4
DEPOSIT FEE
• devFeeBuy: 10%
NOTE:
o Fee amount is taken from contract balance not from users
deposit, users deposit remains intact.
WITHDRAW FEE
• devFeeSell: 5%
NOTE:
o Sell Fee amount is taken from users withdraw amount.
TRUSTCRYPTO.APP
20-05-2022
5
INVESTMENT PLAN
The basic interest rate based on the audit date is 7.14% daily.
• The daily rate will fluctuate dependent on other users' deposits
and withdrawals.
• A minimum deposit of 10 FTM is required.
DEPOSIT (buyBalls)
FTM tokens are used to purchase miners.
The price of a miner will be determined at the moment of deposit.
WITHDRAW (sellBalls)
Eggs created by miners can be sold by users.
TRUSTCRYPTO.APP
20-05-2022
6
Market Eggs
It is a quantity that is determined at the start of the contract and will
alter as a result of deposits, withdrawals, and compounding.
• The initial amount is: 108,000,000,000
• Each deposit or compound will have 20% of its value added to
"Market Eggs."
• Increasing the number of "Market Eggs" will lower the daily
rate.
User eggs: each miner will produce one egg each second
• Miners can only generate eggs for one day, after which users
should try to withdraw or compound their eggs.
• Users can compound many times without any limit.
• Users can sell eggs once a week.
Compound (addImprovement)
Users can compound their available eggs to buy more miners.
• The price of a miner will be determined at the moment of
deposit.
TRUSTCRYPTO.APP
20-05-2022
7
REFERRAL SYSTEM
The contract provides a 8,33% referral commission.
NOTES:
o Referral should be an active user; it means the referral
address has at least one deposit.
o The referrer is specified just once, at the time of the first
deposit, and is permanently allocated to the user.
o The referrer will receive a portion of each future deposit.
o If a user does not use a valid address, the onwer will be
set as referrer.
o The commission will be paid in the form of eggs, which
users may either withdraw or compound.
TRUSTCRYPTO.APP
20-05-2022
8
DISCLAIMER:
This audit solely pertains to the Smart-Contract code at the given
address.
BASEBALLFARM:
0xfa7D2296Be5749A9A4a83e01B505dA35b17493B5
TRUSTCRYPTO.APP
20-05-2022
9
SOURCE CODE
/**
*Submitted for verification at FtmScan.com on 2022-05-21
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow
flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b)
internal
pure
TRUSTCRYPTO.APP
20-05-2022
10
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow
flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being
zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-
contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by
zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a
division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b)
TRUSTCRYPTO.APP
20-05-2022
11
internal
pure
returns (bool, uint256)
{
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
TRUSTCRYPTO.APP
20-05-2022
12
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned
integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with
custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory
for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with
custom message on
TRUSTCRYPTO.APP
20-05-2022
13
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned
integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory
for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
pragma solidity 0.8.11;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
TRUSTCRYPTO.APP
20-05-2022
14
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_owner = _msgSender();
emit OwnershipTransferred(address(0), _msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
TRUSTCRYPTO.APP
20-05-2022
15
// Project initialized
bool private initialized = false;
uint256 private ballsForMiner = 1080000;
// Tool
uint256 private PSN = 10000;
uint256 private PSNH = 5000;
uint256 private DAYS_FOR_FIXED = 1 days;
uint256 private DAYS_FOR_SELLING = 7 days;
uint256 private MIN_BUY = 10 ether;
uint256 public players = 0;
// Commissions
uint256 private referralCommision = 12;
uint256 private devFeeBuy = 10;
uint256 private devFeeSell = 5;
// Address commissions
address private depositAddress = 0x6C728b3F6e0fCc786Cd302d98db36875302Dd531;
address private sellingAddress = 0x0356D43C22a19630433438d28B91d01b35eDde00;
// Mapping
mapping(address => uint256) private games;
mapping(address => uint256) private claimedBall;
mapping(address => uint256) private lastSelling;
mapping(address => uint256) private lastFixed;
mapping(address => address) private referrals;
// Project
uint256 private marketBalls;
constructor() Ownable() {}
if (ref == _msgSender()) {
ref = address(0);
}
if (
referrals[_msgSender()] == address(0) &&
referrals[_msgSender()] != _msgSender()
) {
TRUSTCRYPTO.APP
20-05-2022
16
referrals[_msgSender()] = ref;
if (games[_msgSender()] == 0) {
players = players.add(1);
lastSelling[_msgSender()] = block.timestamp;
}
}
uint256 ballsUsed = getMyBalls(_msgSender());
uint256 improvement = SafeMath.div(ballsUsed, ballsForMiner);
games[_msgSender()] = SafeMath.add(games[_msgSender()], improvement);
lastFixed[_msgSender()] = block.timestamp;
claimedBall[_msgSender()] = 0;
//send referral balls
claimedBall[referrals[_msgSender()]] = SafeMath.add(
claimedBall[referrals[_msgSender()]],
SafeMath.div(ballsUsed, referralCommision)
);
//boost market to nerf miners hoarding
marketBalls = SafeMath.add(marketBalls, SafeMath.div(ballsUsed, 5));
}
TRUSTCRYPTO.APP
20-05-2022
17
function calculateTrade(
uint256 amount,
TRUSTCRYPTO.APP
20-05-2022
18
uint256 market,
uint256 balance
) private view returns (uint256) {
return
SafeMath.div(
SafeMath.mul(PSN, balance),
SafeMath.add(
PSNH,
SafeMath.div(
SafeMath.add(
SafeMath.mul(PSN, market),
SafeMath.mul(PSNH, amount)
),
amount
)
)
);
}
TRUSTCRYPTO.APP
20-05-2022