September 18, 2024
Project Background
This Solidity code defines a smart contract named `OmniTensor`, which implements the ERC20 token standard with additional functionalities, including owner-based controls, token trading via Uniswap, and tax mechanisms. Here is an overview of its components:
Key Features:
- ERC20 Token Basics:
- The contract implements the standard ERC20 interface (`IERC20`), providing methods such as `balanceOf`, `transfer`, `approve`, and `transferFrom`.
- The token is named “OmniTensor” (`OMNIT`) with 18 decimals and a total supply of 1 billion tokens.
- Ownership Control: The `Ownable` contract provides functionality for managing ownership, including transferring ownership or renouncing it. The owner has exclusive rights to modify certain contract behavior.
- Uniswap Integration:
- The contract interacts with the Uniswap V2 protocol via `IUniswapV2Factory` and `IUniswapV2Router02` interfaces. It allows adding liquidity in ETH and enables token swaps through the DEX.
- The `startTrading` function activates trading by creating a Uniswap pair and adding liquidity.
- Taxation Mechanism:
- A buy/sell fee (initially set to 30%) is applied to transactions involving Uniswap. The tax amount is deducted from transfers, except for addresses that are marked as excluded.
- The contract collects the tax in tokens, which can later be swapped for ETH and distributed to various wallets (`OmegaWallet`, `GammaWallet`, `BetaWallet`, `AlphaWallet`).
- Limits and Controls:
- The contract enforces limits on transaction size (`maxTxValue`) and wallet holdings (`maxWalletHoldings`).
- Trading can be paused and started by the owner. Additionally, the contract provides the ability to remove transaction and wallet limits.
- Emergency Functions:
- The owner can withdraw accumulated ETH or recover any remaining tokens in the contract.
- Manual token swaps for ETH can also be triggered by the owner.
This contract is designed with a flexible fee structure, controlled trading features, and strong ownership functionality, making it well-suited for projects aiming to integrate liquidity and token swapping through Uniswap.
Website: omnitensor.io
Audit Report in PDF: