Progressive Robot Coin

A community focused cryptocurrency based on the Ethereum blockchain — following the ERC20 smart contract standard.

Invest in PRGR Today
Progressive-Robot-Coin

Progressive Robot Coin or PGR is a community focused cryptocurrency based on the Ethereum blockchain. This Coin follows a smart contract standard ERC20.

What is a smart contract standard ERC20?

What is a smart contract standard ERC20?

The ERC20 standard is a technical standard used to create and manage tokens on the Ethereum blockchain. It stands for Ethereum Request for Comment 20 and outlines a set of rules and functionalities that Ethereum-based tokens must follow to ensure compatibility and interoperability within the Ethereum ecosystem.
Advanced Heading

Key Features of the ERC20 Standard

Uniformity

Uniformity

ERC20 defines a common set of rules that all tokens must follow, making them interoperable with wallets, exchanges, and decentralized applications (dApps).

Simplicity-for-Developers

Simplicity for Developers

Developers can build wallets and other tools more easily without having to create new protocols for basic token functionality.

Wide-Adoption

Wide Adoption

The ERC20 standard is the most commonly used token standard on Ethereum, making it a default choice for creating fungible tokens.

Advanced Heading
An ERC20 token must implement the following key functions in its smart contract

Core Functions and Rules of ERC20

Total Supply

Specifies the total number of tokens in circulation.

Balance Of

Provides the balance of tokens held by a particular wallet address.

Transfer

Allows a user to send tokens directly to another user.

Approve

Permits another address (like a smart contract) to spend a specific number of tokens on behalf of the token owner.

Transfer From

Enables the transfer of tokens from one address to another through an intermediary (e.g., for automated transactions).

Allowance

Checks the remaining number of tokens an address is allowed to spend on behalf of another address.

Why-is-ERC20-Important

Why is ERC20 Important?

1

Interoperability

The standard ensures tokens can interact seamlessly across the Ethereum ecosystem.

2

Ecosystem Growth

The widespread use of ERC20 has created a massive ecosystem of wallets, dApps, and tools.

3

Efficiency

By following a common set of rules, developers don’t need to reinvent the wheel, reducing development time and errors.

The ERC20 standard is the foundation of thousands of cryptocurrencies and has played a critical role in the growth of decentralized finance (DeFi) and the blockchain ecosystem.

Tokens-Powering-the-Heart-of-Blockchain-Technology

Tokens: Powering the Heart of Blockchain Technology

Tokens are the foundation of blockchain ecosystems, embodying a wide range of assets and utilities. From digital currencies and company shares to service access keys and rare digital collectibles, tokens play a crucial role. But what ensures their secure and decentralized creation and management?

ERC-20: The Foundation of Token Development

ERC-20 “Ethereum Request for Comment 20,” is a widely recognised technical standard for creating tokens on the Ethereum blockchain. Introduced by Fabian Vogelsteller and Vitalik Buterin in late 2015, it has become a foundational framework for numerous blockchain applications and initial coin offerings (ICOs). The ERC-20 standard specifies six mandatory and three optional methods that a smart contract must implement to achieve compliance.

To illustrate its impact, consider this: as of September 2021, Etherscan reported over 700,000 ERC-20 token contracts on the Ethereum network. This figure has likely risen substantially since then, highlighting the immense popularity and utility of the ERC-20 standard in the blockchain space.

Smart Contracts: The Backbone of ERC-20 Tokens

Smart-Contracts-The-Backbone-of-ERC-20-Tokens

At its essence, a smart contract is a self-executing program operating on the blockchain. It establishes the rules and logic for specific processes, removing the need for intermediaries while improving transparency and security.

ERC-20 tokens, on the other hand, follow a standardised set of guidelines for creating fungible tokens (where each unit is identical and interchangeable) on the Ethereum blockchain. The smart contract serves as the driving force behind these tokens, offering a uniform framework to guarantee compatibility and seamless integration across various platforms and applications.

A Closer Look at How ERC-20 Smart Contracts Work

A Closer Look at How ERC 20 Smart Contracts Work

The ERC-20 smart contract functions as a framework for creating and managing digital tokens on the Ethereum blockchain. By establishing clear rules and functionalities, these contracts enable standardised and efficient token interactions across the Ethereum ecosystem.

Deployment Process

Creating an ERC-20 token begins with a developer designing a smart contract that complies with the ERC-20 standard. This contract includes key functions to manage token creation, transfers, and overall administration. Once completed, the contract is compiled into bytecode and deployed on the Ethereum blockchain, making it operational within the network.

example-1

Token Creation:

Upon deploying the smart contract, a predefined supply of tokens is minted and allocated to the address that initiated the contract. This supply represents the total number of tokens in circulation.

Token Transfer:

Users can engage with the smart contract to send tokens between different addresses. Functions such as “transfer” and “transferFrom” are built into the contract to facilitate these transactions. Each transfer is verified by the Ethereum network through its consensus mechanism to ensure accuracy and security.

example-2

Balance Tracking

The smart contract continuously monitors the balance of each address that holds tokens. Whenever tokens are transferred, the contract updates the balance accordingly.

Example 3

Approval Mechanism:

ERC-20 tokens include an approval system that lets users authorize others to spend a specified number of tokens on their behalf. This feature is essential for enabling interactions with decentralized applications, such as exchanges.

example-4

Interoperability:

A key advantage of ERC-20 tokens is their seamless interoperability. By following a common standard, these tokens can be effortlessly integrated into multiple platforms, wallets, and exchanges without the need for custom setups.

Decentralization and Security:

The decentralized structure of the Ethereum blockchain, combined with the self-executing properties of smart contracts, ensures strong security for ERC-20 tokens. Once deployed, the smart contract’s code becomes immutable, significantly reducing the chances of tampering or unauthorized alterations.

How ERC-20 Smart Contracts Benefit and Empower Various Applications

How-ERC-20-Smart-Contracts-Benefit-and-Empower-Various-Applications

The adoption of the ERC20 smart contract has transformed crowdfunding via Initial Coin Offerings (ICOs), facilitated the creation of utility tokens for diverse use cases, and laid the foundation for decentralized finance (DeFi) platforms offering services like lending, borrowing, and trading.

Below are some key benefits and applications of the ERC-20 smart contract:

Interoperability:

The ERC-20 token smart contract seamlessly integrates with most Ethereum wallets and exchanges, allowing users to easily store, trade, and transfer tokens across platforms.

Standardisation:

The ERC-20 standard offers a well-defined set of rules that all tokens must adhere to. This consistency ensures that both developers and users understand how ERC-20 tokens function, simplifying their creation and interaction.

Efficiency:

ERC-20 tokens are optimised for gas efficiency, reducing transaction costs on the Ethereum blockchain. Since every transaction and smart contract execution on Ethereum consumes computational resources (gas), ERC-20 tokens are designed to minimise these costs, making them more economical for users.

Security:

Extensive audits and rigorous scrutiny have fortified ERC-20 smart contracts. With many well-tested and widely trusted implementations, these tokens offer enhanced security and reliability.

Fractional Ownership:

ERC-20 tokens enable the splitting of assets into smaller units, allowing for fractional ownership of valuable assets such as real estate or art. This makes high-value investments more accessible to a wider pool of investors.

Key Applications of the ERC20 Standard

Key-Applications-of-the-ERC20-Standard

Initial Coin Offerings (ICOs):

Startups and blockchain projects often utilise ERC-20 tokens to secure funding through ICOs. These tokens are purchased by investors as a stake in the project’s potential success.

Utility Tokens:

ERC-20 tokens serve various purposes within decentralized applications (dApps), such as granting access to premium features, covering transaction costs, or enabling participation in a network.

Stablecoins:

Popular stablecoins like USDC and DAI leverage the ERC-20 standard. Designed to maintain a consistent value, these tokens are widely used for trading and as a dependable store of value in the cryptocurrency ecosystem.

Asset Tokenization:

Through asset tokenization, physical assets such as real estate, artwork, or commodities can be digitized into ERC-20 tokens. This process simplifies buying, selling, and trading ownership stakes in these assets.

Reward and Loyalty Programs:

Companies can create ERC-20 tokens to power reward and loyalty systems. Customers earn tokens for specific actions or purchases, which they can exchange for discounts or other perks.

Governance Tokens:

Decentralized autonomous organisations (DAOs) frequently issue ERC-20 tokens to allocate voting rights. Holders of these tokens play a direct role in shaping decisions like protocol upgrades and fund management.

ERC-20 smart contracts form the backbone of numerous blockchain applications and financial solutions, offering a streamlined and inclusive means of representing and transferring value across the Ethereum ecosystem and beyond.

ERC20 Smart Contracts: What Lies Ahead

ERC20-Smart-Contracts-What-Lies-Ahead

ERC-20 smart contracts have revolutionized the way tokens are created and managed, opening up blockchain-based assets and applications to a wider audience. They simplify the process of digital token development while delivering exceptional security, transparency, and interoperability.

As blockchain technology progresses, these Ethereum smart contracts are poised to play an increasingly significant role in advancing decentralized applications and the broader token-driven economy.

So, the next time you dive into cryptocurrencies or explore a DeFi platform, remember that ERC-20 smart contracts are working tirelessly behind the scenes, ensuring smooth and standardised operations.

Blockchain for DeFi, NFT & Gaming

Blockchain-for-DeFi-NFT-and-Gaming

Best of all worlds

PGR chain integrates the best aspects of the most commonly used blockchains while maintaining full smart contract compatibility.

Introducing PGR

PGR is an EVM compatible blockchain for DeFi. It is fast, scalable, has low transaction costs and does no wasteful mining. It is built with Substrate Framework and comes with on-chain governance.

Solidity

Solidity

Port your existing applications from Ethereum to PGR without modifying your Solidity code.

Liquidity-bridges

Liquidity bridges

Deploy established ERC-20 assets and transfer liquidity between Ethereum and PGR.

Staking

Staking

Bond your REEF coins and participate in PGR validation and governance.

Community governed

Community governed

PGR is built with upgradability and long-term sustainable on-chain governance in mind.

The Blockchain for Next-Gen DeFi DApps

Introducing Progressive Robot Coin

PGR coins and NFTs

We will introduce NFT's in early 2025

Liquidity Bridges

Deploy established PGR assets on Progressive Robot and transfer liquidity between Ethereum and PGR.

DEXs and AMMs

Trade any PGR asset on decentralized exchanges.
Substrate Framework

Built with Substrate Framework

PGR features next-gen blockchain technology, utilising Nominated Proof of Stake consensus, EVM extensions, on-chain upgradability, libp2p networking and state of the art cryptography.

Governed by the PGR community

PRGR-Community

Liquidity Measure

Measure Crypto Liquidity

Liquidity is the lifeblood of all tradable assets including cryptocurrency.

It is important because it determines how quickly and efficiently market participants can buy or sell cryptocurrencies.

Highly liquid markets enable smooth and efficient trading, while highly illiquid markets can lead to difficulties entering or exiting a position at a desired price. Consequently, every investor needs to understand how to measure crypto liquidity to reduce risk and improve their trading outcomes.

Crypto Liquidity?

Crypto liquidity refers to the ease and speed with which a coin can be converted into cash or other coins, without substantially moving its price up or down. In other words, it is a measure of the number of buyers and sellers present and how easily transactions can be completed.

Cryptocurrencies that are difficult to exchange for cash or other digital assets are considered illiquid assets, while cryptocurrencies that can be traded right away are considered liquid assets, such as Bitcoin and Ethereum.

Liquid markets are characterised by high stability where participants can trade easily, efficiently, and fairly. In liquid markets, there is both high supply and demand for a given asset, making it easier to find and match buyers with sellers.

On the other hand, illiquid markets are represented by volatility, so investors might struggle to execute buy or sell orders at desired prices. This is because there are fewer market participants and thus fewer available trades at any given price.

Overall, compared to illiquid markets, liquid markets tend to have higher levels of trading activity and a smaller spread between the bid and ask orders. More risk averse traders will tend to avoid trading illiquid markets as the potential large spreads, which can negatively impact the price they trade the asset for, puts any possible profits at risk. In illiquid markets, experienced traders often place limit orders, rather than market orders, to prevent getting burnt by slippage.

What Is the Best Indicator of Market Liquidity?

Trading volume is often considered an important indicator of market liquidity, which is why you’ll hear people use the terms interchangeably.

The volume of trade refers to the total number of coins exchanged between buyers and sellers during trading hours on a given day. The volume of trade is a measure of the market’s activity and liquidity during a set period of time. You’ll often see the measure expressed in US Dollar terms, based on the number of units traded multiplied by the average price over the time period.

A higher trading volume indicates greater interest in a particular cryptocurrency. Cryptocurrencies with high trading volumes are traded (bought and sold) more frequently and rapidly than the ones with lower trading volumes. As a result, a high trading volume generally coincides with deep liquidity for a particular cryptocurrency in the market.

How Does Liquidity Help Traders?

Highly liquid markets enable frictionless entry and exit from positions at a fair price. This is because a busy market makes it easier to find buyers or sellers on the other side of a trade.

Highly liquid markets also see assets priced closer to the true market value. High levels of both supply and demand help to keep the buy and sell prices close together; the difference between the two is called the bid-ask spread.

This pricing concept represents the difference between the highest price a buyer is willing to pay for an asset and the lowest price that a seller is ready to sell at. The spread is collected as a fee by the market maker, which more often is an exchange facilitating the trade. The size of the bid-ask spread is determined by liquidity – a direct factor of the number of buyers and sellers in the market. The more buyers and sellers, the greater the liquidity and the tighter the spread. The ask (the price you can buy the asset for) will always be higher than the bid (the price you can sell the asset for).

All things considered, traders will generally seek liquid markets as they are associated with lower risk and higher stability; the bid-ask spread is less likely to increase as a result of their trade, which can leave them losing value as the trade fills.

Elsewhere, more liquid markets will generally see buy and sell prices closer together across different trading venues for the same assets.

How Much Liquidity Should a Crypto Asset Have?

Unfortunately, there is no perfect answer for how much liquidity a cryptocurrency should have. This is because it largely depends on the investor and their risk appetite, as well as a crypto asset and its supply and demand. As a rule of thumb, more established cryptocurrencies tend to have more liquidity, and newer and more speculative cryptocurrencies tend to have less liquidity.

A potential way to determine whether a cryptocurrency is too illiquid is by comparing its trading volume to Bitcoin’s (BTC) trading volume. This is because Bitcoin is the flagship of the crypto market, surpassing every other cryptocurrency in terms of market capitalization. There are also useful indicators online where you can check what size/value of trade will move the price of an asset and roughly by how much.

More risk-averse investors may only trade cryptocurrencies with larger volumes, like Bitcoin, Ethereum (ETH), or Solana (SOL). Alternatively, investors with larger risk appetites may be comfortable trading cryptocurrencies with significantly smaller trading volumes. This is because the risks associated with low liquidity can be offset by the increased upside of investing in a more speculative cryptocurrency.

Example of Crypto Liquidity

Depth charts are graphical representations of buy and sell orders for a specific asset at a variety of prices. They can provide insight into the liquidity of a cryptocurrency by displaying the amount of supply and demand.

Liquid assets will have depth charts where the green and red sides (buy and sell orders) nearly mirror each other, reflecting almost identical amounts of supply and demand on their respective sides. The following diagram is of a BTC Depth Chart:

Bitcoin Depth Chart. Source: livecoinwatch.com
Bitcoin Depth Chart.

The total order value for bids ($610 million) is approximately equal to the total order value for asks ($620 million). This highlights that the BTC market is extremely liquid given the symmetry between supply and demand.

Factors That Influence Crypto Liquidity

Multiple factors contribute to the overall liquidity of a given cryptocurrency. These factors include:

Popularity

Popular cryptocurrencies are generally highly liquid because of the vast volume that is traded every day. They are also in high demand and supply by both small and large investors, further contributing to their high levels of liquidity.

Number of Exchange Listings

Popular cryptocurrencies are typically driven by active development teams, passionate communities, and strong, real-world utilities — all of which are key determinants of the market demand for a cryptocurrency. Nonetheless, as a cryptocurrency becomes more popular, it will likely be listed on more exchanges.

A higher number of exchange listings increases the overall liquidity of a cryptocurrency. This is because it enables investors and traders to choose from several different markets when buying or selling a specific cryptocurrency, allowing them to access the best price.

Market Making

Market makers refer to individuals or broker-dealers that profit by providing liquidity to the rest of the market. They “make the market” by ensuring that traders can always buy and sell. This is done by actively quoting both sides of the market and providing bids and offers. Market makers boost overall liquidity and market depth.

Market Capitalisation

Market capitalisation (also referred to as market cap) is a metric that measures the relative size of a cryptocurrency. It is calculated by multiplying the total number of coins in circulation with the current price of that specific coin.

Market capitalisation is one of the best ways to check for liquidity because large market cap cryptocurrencies tend to have a higher demand in the cryptocurrency market. Alternatively, low market cap cryptocurrencies have lower liquidity as the demand for the cryptocurrency is comparatively lower.

Liquidity Versus Volume

The difference between trading volume and liquidity is widely misunderstood in the cryptocurrency market. Trading volume represents the number of executed trading transactions, whereas liquidity represents the number of available trades at any given price. Both are often quoted in dollar or fiat value terms.

Liquidity: It Matters

Overall, traders and investors are naturally encouraged to trade markets with high levels of liquidity as they’re less likely to encounter obstacles and oddities when entering or exiting their trades.

The cryptocurrency market is notorious for its volatility and high level of risk, which makes liquidity an even more important consideration. More prudent traders will almost always assess the liquidity of a cryptocurrency market and avoid trading less liquid assets.

Calculating liquidity

Trading is not possible without liquidity, and to make our first swap we need to put some liquidity into the pool contract. Here’s what we need to know to add liquidity to the pool contract:

  1. A price range. As a liquidity provider, we want to provide liquidity at a specific price range, and it’ll only be used in this range.
  2. Amount of liquidity, which is the amounts of two tokens. We’ll need to transfer these amounts to the pool contract.

Here, we’re going to calculate these manually, but, in a later chapter, a contract will do this for us. Let’s begin with a price range.

Price Range Calculation

Recall that, in the entire price range is demarcated into ticks: each tick corresponds to a price and has an index. In our first pool implementation, we’re going to buy ETH for USDC at the price of $5000 per 1 ETH. Buying ETH will remove some amount of it from the pool and will push the price slightly above $5000. We want to provide liquidity at a range that includes this price. And we want to be sure that the final price will stay within this range (we’ll do multi-range swaps in a later milestone).

We’ll need to find three ticks:

  1. The current tick will correspond to the current price (5000 USDC for 1 ETH).
  2. The lower and upper bounds of the price range we’re providing liquidity into. Let the lower price be $4545 and the upper price be $5500.
\sqrt{P} = \sqrt{\frac{y}{x}}

Since we’ve agreed to use ETH as the x reserve and USDC as the y reserve, the prices at each of the ticks are:

 \sqrt{P_c} = \sqrt{\frac{5000}{1}} = \sqrt{5000} \approx 70.71
\sqrt{P_l} = \sqrt{\frac{4545}{1}} \approx 67.42
\sqrt{P_u} = \sqrt{\frac{5500}{1}} \approx 74.16
Where P_c is the current price, P_l is the lower bound of the range, and P_u is the upper bound of the range.

Now, we can find corresponding ticks. We know that prices and ticks are connected via this formula:

\sqrt{P(i)}=1.0001^{\frac{i}{2}}
Thus, we can find tick  i via:
i = log_{\sqrt{1.0001}} \sqrt{P(i)}

The square roots in this formula cancel out, but since we’re working with \sqrt{p} we need to preserve them.

Let’s find the ticks:
1. Current tick: i_c = log_{\sqrt{1.0001}} 70.71 = 85176
2. Lower tick: i_l = log_{\sqrt{1.0001}} 67.42 = 84222
3. Upper tick: i_u = log_{\sqrt{1.0001}} 74.16 = 86129

That’s it for price range calculation! Last thing to note here is that Uniswap uses Q64.96 number to store \sqrt{P}. This is a fixed-point number that has 64 bits for the integer part and 96 bits for the fractional part. In our above calculations, prices are floating point numbers: `70.71`, `67.42`, and `74.16`. We need to convert them to Q64.96. Luckily, this is simple: we need to multiply the numbers by 2^{96} (Q-number is a binary fixed-point number, so we need to multiply our decimals numbers by the base of Q64.96, which is 2^{96}). We’ll get:
\sqrt{P_c} = 5602277097478614198912276234240 \sqrt{P_l} = 5314786713428871004159001755648 \sqrt{P_u} = 5875717789736564987741329162240

Token Amounts Calculation

The next step is to decide how many tokens we want to deposit into the pool. The answer is as many as we want. The amounts are not strictly defined, we can deposit as much as it is enough to buy a small amount of ETH without making the current price leave the price range we put liquidity into. During development and testing we’ll be able to mint any amount of tokens, so getting the amounts we want is not a problem.

For our first swap, let’s deposit 1 ETH and 5000 USDC.

Recall that the proportion of current pool reserves tells the current spot price. So if we want to put more tokens into the pool and keep the same price, the amounts must be proportional, e.g.: 2 ETH and 10,000 USDC; 10 ETH and 50,000 USDC, etc.

Liquidity Amount Calculation

Next, we need to calculate L based on the amounts we'll deposit. This is a tricky part, so hold tight!
From the theoretical introduction, you remember that: L = \sqrt{xy} However, this formula is for the infinite curve 🙂 But we want to put liquidity into a limited price range, which is just a segment of that infinite curve. We need to calculate L specifically for the price range we’re going to deposit liquidity into. We need some more advanced calculations. To calculate L for a price range, let’s look at one interesting fact we have discussed earlier: price ranges can be depleted. It’s possible to buy the entire amount of one token from a price range and leave the pool with only the other token.
Progressive Robot diagram of USDC vs ETH showing trade path and notes: after trade, all ETH or all USDC is bought from range.

At the points a and b, there’s only one token in the range: ETH at the point a and USDC at the point b.

That being said, we want to find an L that will allow the price to move to either of the points. We want enough liquidity for the price to reach either of the boundaries of a price range. Thus, we want L to be calculated based on the maximum amounts of \Delta x and \Delta y.

Now, let’s see what the prices are at the edges. When ETH is bought from a pool, the price is growing; when USDC is bought, the price is falling. Recall that the price is \frac{y}{x}. So, at point a, the price is the lowest of the range; at point b, the price is the highest.

In fact, prices are not defined at these points because there’s only one reserve in the pool, but what we need to understand here is that the price around the point b is higher than the start price, and the price at the point a is lower than the start price.

Now, break the curve from the image above into two segments: one to the left of the start point and one to the right of the start point. We’re going to calculate two L’s, one for each of the segments. Why? Because each of the two tokens of a pool contributes to either of the segments: the left segment is made entirely of token x, and the right segment is made entirely of token y. This comes from the fact that, during swapping, the price moves in either direction: it’s either growing or falling. For the price to move, only either of the tokens is needed:

  1. when the price is growing, only token x is needed for the swap (we’re buying token x, so we want to take only token x from the pool);
  2. when the price is falling, only token y is needed for the swap.

Thus, the liquidity in the segment of the curve to the left of the current price consists only of token x and is calculated only from the amount of token x provided. Similarly, the liquidity in the segment of the curve to the right of the current price consists only of token y and is calculated only from the amount of token y provided.

Progressive Robot diagram of x-y reserves curve showing current price as reserve ratio and how adding liquidity increases liquidity along segments
This is why, when providing liquidity, we calculate two L’s and pick one of them. Which one? The smaller one. Why? Because the bigger one already includes the smaller one! We want the new liquidity to be distributed evenly along the curve, thus we want to add the same L to the left and to the right of the current price. If we pick the bigger one, the user would need to provide more liquidity to compensate for the shortage in the smaller one. This is doable, of course, but this would make the smart contract more complex. What happens with the remainder of the bigger L? Well, nothing. After picking the smaller L we can simply convert it to a smaller amount of the token that resulted in the bigger L–this will adjust it down. After that, we’ll have token amounts that will result in the same L. The final detail I need to focus your attention on here is: new liquidity must not change the current price. That is, it must be proportional to the current proportion of the reserves. And this is why the two L’s can be different–when the proportion is not preserved. And we pick the small L to reestablish the proportion. I hope this will make more sense after we implement this in code! Now, let’s look at the formulas. Let’s recall how \Delta x and \Delta y are calculated:

\Delta x = \Delta \frac{1}{\sqrt{P}} L

\Delta y = \Delta \sqrt{P} L

We can expand these formulas by replacing the delta P’s with actual prices (we know them from the above):

\Delta x = (\frac{1}{\sqrt{P_c}} - \frac{1}{\sqrt{P_b}}) L

\Delta y = (\sqrt{P_c} - \sqrt{P_a}) L

P_a is the price at the point a, P_b is the price at the point b, and P_c is the current price (see the above chart). Notice that, since the price is calculated as \frac{y}{x} (i.e. it’s the price of x in terms of y), the price at point b is higher than the current price and the price at a. The price at a is the lowest of the three.
Let's find the L from the first formula: \Delta x = (\frac{1}{\sqrt{P_c}} - \frac{1}{\sqrt{P_b}}) L \Delta x = \frac{L}{\sqrt{P_c}} - \frac{L}{\sqrt{P_b}} \Delta x = \frac{L(\sqrt{P_b} - \sqrt{P_c})}{\sqrt{P_b} \sqrt{P_c}} L = \Delta x \frac{\sqrt{P_b} \sqrt{P_c}}{\sqrt{P_b} - \sqrt{P_c}} And from the second formula: \Delta y = (\sqrt{P_c} - \sqrt{P_a}) L L = \frac{\Delta y}{\sqrt{P_c} - \sqrt{P_a}} So, these are our two L's, one for each of the segments: L = \Delta x \frac{\sqrt{P_b} \sqrt{P_c}}{\sqrt{P_b} - \sqrt{P_c}} L = \frac{\Delta y}{\sqrt{P_c} - \sqrt{P_a}} Now, let's plug the prices we calculated earlier into them: L = \Delta x \frac{\sqrt{P_b}\sqrt{P_c}}{\sqrt{P_b}-\sqrt{P_c}} = 1 ETH * \frac{5875... * 5602...}{5875... - 5602...} After converting to Q64.96, we get: L = 1519437308014769733632 And for the other L: L = \frac{\Delta y}{\sqrt{P_c}-\sqrt{P_a}} = \frac{5000USDC}{5602... - 5314...} L = 1517882343751509868544 Of these two, we'll pick the smaller one.

Token Amounts Calculation, Again

Since we choose the amounts we're going to deposit, the amounts can be wrong. We cannot deposit any amounts at any price range; the liquidity amount needs to be distributed evenly along the curve of the price range we're depositing into. Thus, even though users choose amounts, the contract needs to re-calculate them, and actual amounts will be slightly different (at least because of rounding).

Luckily, we already know the formulas: \Delta x = \frac{L(\sqrt{P_b} - \sqrt{P_c})}{\sqrt{P_b} \sqrt{P_c}} \Delta y = L(\sqrt{P_c} - \sqrt{P_a})
Nominated-Proof-of-Stake

Nominated Proof of Stake

Validators are elected by Nominators via NPoS. At the end of every block production era, Phragmén Validator elections are held.

Upgradability

Upgradability

PGR is self-upgradable through the community elected Technical Council.

Fee-burn

Fee burn

PGR incentivizes technological progress in regards to scalability by removing fee market politics.

Governance-rewards

Governance rewards

Stake PGR coin and earn rewards for participating in Reef governance.

Frequently Asked Questions

  1. Are ERC20 Smart Contracts Unchangeable?
    Yes, once deployed on the Ethereum blockchain, the code of an ERC20 smart contract becomes immutable. This ensures that the contract’s rules and functions remain fixed, and any modifications would require deploying a completely new contract.

  2. Can ERC20 Tokens Be Traded for Other Cryptocurrencies?
    Absolutely! ERC20 tokens are tradable on numerous cryptocurrency exchanges, just like other digital assets. Their standardised framework guarantees compatibility across a wide range of trading platforms.

  3. What Is an ERC20 Smart Contract?
    An ERC20 smart contract is a protocol on the Ethereum blockchain that establishes a standardised set of rules for creating fungible tokens. These tokens can represent various assets, including cryptocurrencies, reward points, or even tokenized real-world properties.

CHAT