Understanding Reflection Token

Reflecting on Reflection: A Comprehensive Overview

Vittorio Minacori
NONCEPT
8 min readMay 13, 2024

--

Introduction.

In the fast-paced world of cryptocurrencies, innovation is a constant. Among the myriad of tokens and coins emerging daily, some manage to stand out with unique features and promising potential. One such token that has garnered attention is Reflection Token.

In this article, we’ll delve into what Reflection Token is, how it works, its benefits, and potential risks.

And we will also check our tailor-made ReflectionERC20 contract and how it solves some of most common issues with reflection.

Try deploying your Reflection ERC20 using Token Generator.

Understanding Reflection Token.

Reflection Token operates on a simple yet ingenious principle: redistribution. Essentially, holders of Reflection Token earn passive income in the form of more tokens simply by holding them in their wallets. This is achieved through a mechanism known as static reflection.

How does it work?

When a transaction occurs involving Reflection Token, a small percentage of that transaction is redistributed to all existing holders. This process is automated and does not require any action from the holders. Consequently, the number of tokens held by each participant increases over time, proportional to their holdings.

  1. Redistribution on Transactions: When a transaction involving Reflection Token occurs, a percentage of that transaction is automatically redistributed to all existing holders of the token. This redistribution is proportionate to the amount of Reflection Token held by each holder. Importantly, this process is executed automatically and does not require any action from the holders.
  2. Continuous Accrual of Tokens: As transactions take place within the Reflection Token ecosystem, holders passively accrue additional tokens over time. This accrual occurs seamlessly, with holders seeing their token balances increase gradually as more transactions occur.
  3. Proportional Distribution: The redistribution of tokens is conducted proportionally, meaning that holders with larger token holdings receive a greater share of the redistributed tokens. This aspect ensures that those who have invested more in Reflection Token are appropriately rewarded for their commitment.
  4. Reflection on Every Transaction: It’s crucial to note that the redistribution of tokens occurs with every transaction involving Reflection Token. Whether it’s buying, selling, or transferring tokens, the mechanism remains active, continually rewarding holders for their participation in the ecosystem.

Benefits of Reflection Token.

  1. Passive Income: The primary allure of Reflection Token is the opportunity for passive income. By merely holding the tokens, investors can see their holdings grow over time without the need for active trading or staking.
  2. Community Engagement: The redistribution mechanism fosters a sense of community among token holders. As the community grows, so does the potential for increased redistribution rewards.
  3. Price Stability: The continuous redistribution of tokens can contribute to price stability by incentivizing long-term holding and discouraging excessive sell-offs.

Holders are users who earn passive income by holding native token. Router contracts, pair contracts, dev wallets are usually excluded from reflection in order to fully reward users.

Technical Overview.

We found a really complete technical overview here.

Before diving into the contract, a new concept must be introduced: T-Space and R-Space values. They are used to describe two distinct spaces within the token’s ecosystem, each serving a specific purpose.
Let’s delve into what T-Space and R-Space represent:

T-Space (Transaction Space): T-Space refers to the transactional aspect of the Reflection Token ecosystem. It encompasses all the transactions involving the token, including buying, selling, and transferring. Within T-Space, the static reflection mechanism is at work. This mechanism ensures that a percentage of each transaction fee is redistributed to all existing holders of Reflection Token. The redistribution occurs automatically and in real-time, providing holders with passive income for simply holding the tokens in their wallets.

Key features of T-Space:

  • Redistribution Mechanism: The primary feature of T-Space is the redistribution mechanism, which rewards holders with additional tokens for participating in transactions within the ecosystem.
  • Continuous Accrual: Transactions within T-Space lead to the continuous accrual of tokens for holders, contributing to passive income generation.

R-Space (Reflection Space): R-Space, on the other hand, represents the conceptual space where the reflection mechanism operates. It encompasses the collective holdings of all Reflection Token holders and the corresponding redistribution of tokens. R-Space is where the redistribution algorithm calculates and distributes the additional tokens to each holder based on their proportional share of the total token supply.

Key features of R-Space:

  • Redistribution Algorithm: R-Space houses the algorithm responsible for calculating and executing the redistribution of tokens to all existing holders.
  • Proportional Distribution: Within R-Space, the redistribution occurs proportionally, ensuring that holders with larger token holdings receive a greater share of the redistributed tokens.

In summary, T-Space and R-Space are conceptual frameworks used to describe different aspects of the Reflection Token ecosystem. T-Space represents the transactional space where transactions occur, and the redistribution mechanism operates in real-time. R-Space, on the other hand, represents the collective holdings of all token holders and the redistribution of tokens based on proportional ownership.

Any T-Space value (t) can be converted to R-Space value (r) as follows:

where rTotal and tTotal represent the total token supply within the transactional (T-Space) and reflection (R-Space) spaces, respectively.

In the image below, a 10% fee is redistributed to all existing holders of Reflection Token.

Transaction Mechanism

Create a Reflection Token.

Creating a Reflection Token can be complex, primarily due to the technical aspects involved in smart contract development and the importance of ensuring security and reliability. Developing the smart contract code requires proficiency in blockchain development, including knowledge of programming languages such as Solidity (for Ethereum) or similar languages for other blockchain platforms. Additionally, conducting thorough testing and audits to identify and address potential vulnerabilities adds another layer of complexity to the process. Overall, while creating a reflection token may be challenging, it’s achievable with the right expertise, resources, and attention to detail.

At NONCEPT, we’re thrilled to announce the development of our ready-to-deploy Reflection Token solution, designed with a strong emphasis on security and efficiency. Our Reflection Token offering streamlines the process of creating and launching a reflection token, empowering entrepreneurs and organizations to tap into the potential of passive income generation and community engagement.

Here’s why our Reflection Token solution stands out:

Security-First Approach:

  • Our smart contract code is meticulously crafted with security as the top priority. We adhere to industry best practices and employ rigorous testing methodologies to ensure that our solution is robust and resistant to vulnerabilities.
  • By leveraging secure coding standards and conducting thorough audits, we mitigate risks and instill confidence in the integrity of the Reflection Token ecosystem.

Seamless Deployment:

  • With our ready-to-deploy solution, launching a Reflection Token has never been easier. We provide a turnkey package that includes the smart contract code, deployment process, and documentation, allowing for swift and hassle-free deployment on blockchain platforms such as Ethereum, Polygon or BNB Smart Chain.
  • Our user-friendly deployment process is designed to cater to both seasoned developers and newcomers to the blockchain space, enabling quick setup and configuration.

Customization Options:

  • While our Reflection Token solution comes pre-configured with default settings for tokenomics and redistribution mechanics, we also offer customization options to tailor the tokenomics parameters to specific project requirements.
  • Whether it’s adjusting the redistribution percentage, excluding accounts from reflection, or excluding accounts from the fee, our solution provides flexibility to accommodate diverse use cases and business models.

Try deploying your Reflection ERC20 using Token Generator.

Reflection ERC20 Features.

We built a secure and reliable Reflection Token that extends the ERC20 Standard with more powerful methods:

  • During deployment the owner can set the total supply and the reflection fee percentage.
  • The owner will automatically be excluded from the reflection fee. It means that the owner can transfer without applying the transaction fee (useful when starting the project).
  • The owner can exclude/include accounts from reflection fee.
  • The owner can exclude/include accounts from reflection mechanism (useful to exclude team addresses or router/liquidity contracts from earning rewards).
  • The owner can update the reflection fee or set it to zero.
  • For each transaction the defined reflection fee will be distributed proportionally to all non-excluded token holders.

Check out our documentation page to know more about ABIs and analysis files.

Smart Contracts known issues (and how we limited them).

By analyzing the previously distributed Reflection Tokens, some issues were exploited.

No safeguards for fees: a potential vulnerability in the design of a reflection token smart contract, where there are inadequate measures in place to prevent the owner or administrator from arbitrarily adjusting the reflection fee. In this scenario, the owner has unrestricted authority to modify the reflection fee parameter at their discretion, which can have significant implications for token holders and the overall health of the ecosystem. This issue can manifest potential consequences: lack of transparency, disincentivizing users, potential for abuse.

We limited this issue by implementing restriction within the smart contract code to limit the range of adjustments to the reflection fee. Owner cannot set a fee up to 10%.

function _setReflectionRate(uint256 reflectionFeePercent_) internal virtual {
if (!(reflectionFeePercent_ <= 10)) {
revert ERC20ReflectionInvalidReflectionFee(reflectionFeePercent_);
}

//...
}

GAS block limits exceeded: the mechanism of removing addresses from reflection implies a loop over excluded addresses for every transfer operation or balance inquiry. This may lead to extreme gas costs up to the block gas limit. In an extreme situation with a large number of excluded addresses transaction gas may exceed maximum block gas size and all transfers will be effectively blocked.

We limited this issue by restricting the number of possible excluded addresses to 10. This will ensure to not exceed the block’s GAS limit in loops.

function _excludeFromReflection(address account) internal virtual onlyIncludedInReflection(account) {
if (_excludedFromReflection.length == 10) {
revert ERC20ReflectionMaxExcludedReached();
}

//...
}

Abuse of exclude/include from reflection: the owner of the token contract can redistribute part of the tokens from users to a specific account. Owner can exclude an account from the reflection mechanism and include it back later. This will redistribute part of the tokens from holders in profit of the included account. Using this feature, it can be used to rug-pull rewards from holders by including a whale.

We limited this issue by restricting the ability to re-include in the reflection mechanism, only accounts with a balance less than 5% of the total supply.

uint256 private constant BALANCE_LIMIT_RATE = 5;

//..

function _includeInReflection(address account) internal virtual onlyExcludedFromReflection(account) {
uint256 accountBalance = _balanceOf(account);
uint256 maxAllowedBalance = (_tTotal * BALANCE_LIMIT_RATE) / 100;

if (accountBalance > maxAllowedBalance) {
revert ERC20ReflectionMaxBalanceForInclusionExceeded(account, accountBalance, maxAllowedBalance);
}

//...
}

Conclusion.

Reflection Token offers a unique proposition in the cryptocurrency space, providing holders with the opportunity for passive income through automated redistribution. The static reflection mechanism rewards holders with additional tokens for their participation in the ecosystem, offering passive income generation and fostering community engagement. While the mechanism presents promising benefits, investors should also consider potential risks and market dynamics before making investment decisions. Overall, Reflection Token represents a unique experiment in decentralized finance, showcasing the creative possibilities within the cryptocurrency landscape.

Try deploying your Reflection ERC20 using Token Generator.

--

--

Vittorio Minacori
NONCEPT

Software Engineer. Blockchain & Web3. Author of ERC-1363.