Reduce the Minimum Price of Gas (MPOG) for the Archway Network from 900 Gway to 140 Gway

Reduce the Minimum Price of Gas (MPOG) for the Archway Network from 900 Gway to 140 Gway

Summary:
This proposal seeks to reduce Minimum Price of Gas (MPOG) for the Archway network from 900 Gway (0.0000009 ARCH/Gas) to 140 Gway (0.00000014 ARCH/Gas).

Background:
At the time this proposal was drafted:

  • Only a very small fraction of the available blockspace of the Archway network is used
  • The current price of the ARCH token in U.S. Dollars (USD) is approximately 0.17 USD
  • A non-complex transaction on Astrovault (swapping ARCH tokens for xARCH tokens) requires a transaction fee of 0.59 ARCH (about 0.1 USD)
  • A complex transaction on Astrovault (swapping ATOM tokens for ARCH tokens) requires a transaction fee of 3.26 ARCH (about 0.55 USD)
  • The corresponding transaction on Osmosis DEX requires a transaction fee of 0.002922 (less than 0.01 USD), causing use of the Archway network for token swaps to be non-competitive
  • Posting a 300-word post on Gelotto Threads requires a transaction fee of 2.56 ARCH (about 0.43 USD)
  • Executing a simple transaction on Gelotto Threads (upvoting an existing post) requires a transaction fee of 0.58 ARCH (about 0.09 USD)

When compared to transaction fees for other competing networks, the high price of gas on the Archway network may serve as a deterrent for users. This is especially the case when considering applications intended for large numbers of transactions and continuous use, such as games and communication platforms. As a result, the types of applications that are able to successfully attract users may be limited. For example, a transaction fee of 0.59 ARCH for an occasional token swap transaction may appear reasonable. However, this same fee would cause a gaming application intended for continuous use (such as a slot machine), where every play incurs a 0.59 ARCH fee, to be untenable. Similarly, communication platforms, and other applications intended for near-continuous rather than occasional use, would be unattractive to users due to the costs incurred for participation.

While fee grants and other tools may be used to offset this disadvantage to some extent, these are typically temporary measures intended to bootstrap new applications and attract an initial userbase, and are not sustainable long-term to address the fact that current transaction fees are non-competitive.

Proposal:
Given current market conditions, the current the volume of traffic on the Archway network, and the benefits of attracting more development, development of different kinds of applications, and more users for those applications, this proposal requests to lower the Minimum Price of Gas (MPOG) for the Archway network from 900 Gway (0.0000009 ARCH/Gas) to 140 Gway (0.00000014 ARCH/Gas).

This reduction would cause transaction fees to be more in-line with competing networks, but would retain a cost that is significant enough to avoid trivializing the value of blockspace or disincentivizing validators or developers.

For example, the fee for a non-complex transaction would be reduced from 0.59 ARCH (about 0.1 USD) to 0.09 ARCH (about 0.015 USD). More complex transactions would incur larger fees, but would be reduced by a similar percentage.

Of note, over the past 90 days, the USD price of the ARCH token has increased from 0.07 USD to 0.17 USD. It is appropriate for the MPOG associated with the network to scale downward as the price of the ARCH token increases.

Additionally, the price of gas (POG) for the network is currently fixed to the minimum price of gas, pending a future upgrade that will enable more dynamic adjustment of the POG at times when significant blockspace utilization occurs. This upgrade will allow blockspace utilization to be accounted for automatically, causing the lower MPOG set forth in this proposal to be appropriate even in times of higher use of the network.

Voting:

YES: You agree with the proposed reduction of the Minimum Price of Gas (MPOG) from 900 Gway (0.0000009 ARCH/Gas) to 140 Gway (0.00000014 ARCH/Gas).

NO: You disagree with the need for these proposed changes and believe the current MPOG of 900 Gway should be maintained

NO WITH VETO: You strongly disagree with these changes, believe they are harmful, malicious, or abusive, and that the depositors for this proposal should be penalized through the loss of their deposit

ABSTAIN: You do not agree or disagree with the content of this proposal but would like to be counted as part of the voting quorum

Discussion Links:
Gelotto Threads
Archway Governance Forum

8 Likes

I believe it’s crucial to grasp the implications of decreasing gas prices.

Initially, it seems like a strategic move to enhance our competitiveness in the short term, but it’s important to acknowledge the compromises involved.

Specifically, this strategy involves reducing gas prices by approximately 6.4 times.

One concern is the potential impact on transaction rebates. By reducing gas prices, could we inadvertently undermine the value of Archway rewards?

Furthermore, I’m curious about the rationale behind selecting a gas price of 140 GWAY.

2 Likes

The long term goal is lots and lots of people using the Archway network to do lots and lots of transactions because lots and lots of things they want to do are built on the network, every transaction incurring a very small network fee. That very small network fee, multiplied by lots and lots of transactions, would pay validators and developers good money. That’s the end-game goal.

When less than 1% of the blockspace is used, trying to extract maximum value from the very small number of people faithfully using the network is shooting ourselves in the foot.

Archway was designed with a MPOG of 200 Gway in mind, but started out at 900 mostly to try to incentivize developers. At current prices, 140 puts a basic token swap still considerably more expensive than Osmosis, but at least more in-line with what people expect from a dex. It also meshes well with future high-traffic apps. If it costs 10 cents per mouse click to play a game or reply to a message, that’s a huge disincentive. Even 1 cent per mouse click is pricy, but at least not completely ridiculous.

Anyway, developers will only make money if people are actually using their apps, which depends on developers building things people want to use, and the fees for using those things being reasonable enough that lots of people will do so.

2 Likes

I think these are fair points.

Although I am likely to support a decrease in MPoG / GWAY, I do think reducing by 6.4x seems a bit heavy handed for a first pass. Curious to hear rationale for the 140 GWAY as well.

Ultimately, I am in favor of a reduction to GWAY but would be open to alternative suggestions in terms of the level of which GWAY is reduced.

1 Like

Drew here from ArchID team!

I am not opposed to lowering MPoG, but there’s a lot to consider here. Just a few things that come to mind:

  1. Archway’s fee system is designed to be more expensive than other Cosmos chains, this makes direct comparisons with them difficult. It’s because in Archway rewards are shared with validators and developers, instead of just validators.
  2. Currently validators are struggling to cover cost of running infrastructure. I know at some level the validators are taking a risk on the network hoping that ARCH will gain stronger value in the long term, but I’d caution against lowering MPoG too much. If validators can’t cover operational costs the network security will be at risk.
  3. The suggested MPoG price of this proposal is nearly a 6.5x reduction. This would have a large impact on both validator and developer rewards. Speaking from my perspective as co-creator of ArchID, we would feel that impact acutely and likely we’d need to enable developer premiums to cover the difference in lost revenue, which would actually raise transaction costs for our users.
  4. I don’t totally agree with the summary of current tx costs in the “Background” section. A simple tx, like claiming staking rewards costs ~0.145 ARCH. Now let’s think about some “medium complex” transactions: i) creating a multisig on Nomos costs ~0.37 ARCH, ii) Registering a domain on ArchID (which mints tokens in another contract as well as stores data for the domain record) costs ~0.33 ARCH.
  5. To reach this proposal’s claimed cost of ~0.58 ARCH for a “simple transcation” on Gelatto Threads of “upvoting an existing post”, I needed to store well over 2000 characters of data in storage (see tx here). So it seems reasonable there could either be very pessimistic gas settings in the the Threads dapp, or else something non-trivial going on in the contract logic for the Threads contract.
  6. Someone from Astrovault will know better, but I’m aware Astrovault has a complex structure with many different contracts that call and route to each other. I haven’t seen Osmosis’ source code, but given the unique nature of Astrovault’s code it would be tough to make a direct comparison. IBC swaps will be more expensive, but I can say swapping native assets in ArchID’s marketplace has an average tx cost of ~0.68 ARCH.
  7. Someone correct me if I’m wrong, but I thought the og target of MPoG 200 GWAY was based on a prospective value of $0.50 USD for ARCH

TLDR; I am not against lowering MPoG, but I am against lowering it ~6.5x. First, we’d need to decide what is a sustainable minimum price value for gas that won’t hurt the network, then we can change it to that :sunglasses:

1 Like

The end goal is lots and lots of people using things developers have built, each transaction incurring a small, competitive fee, but when you multiply that small fee times lots and lots of transactions, the developers make money, the validators make money, the users are charged a fair price for something they want to use, and everybody wins.

When a tiny fraction of the network’s blockspace is current being used, by a small number of loyal users, trying to extract maximum value from those users is a bad look, and a huge deterrent to new users.

Everyone’s familiar with Dexes so I’ll use those as the main example:

Osmosis - Swapping ATOM to ARCH, the fee is 0.002086 OSMO (0.0033 USD)

Kujira - Swapping USK to ARCH, the fee is 0.00424 KUJI (0.014 USD)

Shade - Swapping SILK to SHADE, the fee is 0.0375 SCRT (0.013 USD)
For a more complex multi-pool swap similar to archway (SILK to ATOM), the fee is 0.13875 SCRT (0.05 USD)

Astrovault at 900 Gway - Swapping ARCH to xARCH, the fee is 0.685535 ARCH (0.11 USD)
For a more complex multi-pool swap (ATOM to ARCH), the fee is 3.771874 ARCH (0.63 USD)

Astrovault at 140 Gway - Swapping ARCH to xARCH, the fee would be 0.1066 ARCH (0.017 USD)
For a more complex swap (ATOM to ARCH), the fee would be 0.5867 ARCH (0.097 USD)

At 140 Gway, the gas price for basic Dex use would still be higher than the competition, but given the poor UX having to move tokens between networks just to save a penny on a trade and the need for developer premiums, a gas fee that is high but not ridiculous is fine.

A halfway-measure like lowering the MPoG just a little bit wouldn’t make the gas fee even a little bit competitive. It would still be ridiculously high compared to competing networks.

And this just considers dexes. If I wanted to design a slot machine game, for example, Archway would not be a suitable home for me. If every single click of the mouse to take a turn costs 10 cents, my game is unplayable. Any app intended for continuous use, not occasional use like a once-a-week token swap, is not suitalbe for Archway without a very significant decrease in the MPoG.

2 Likes

If I wanted to design a slot machine game, for example, Archway would not be a suitable home for me. If every single click of the mouse to take a turn costs 10 cents, my game is unplayable. Any app intended for continuous use, not occasional use like a once-a-week token swap, is not suitalbe for Archway without a very significant decrease in the MPoG.

Are you sure? Can you show an example of a simple tx that costs that much? See the tx links in my post—even txs with medium complexity are nearly half of that cost. To reach that cost I needed to store well over 2000 chars of JSON text.

I guess if a game does: “Receive mouse click. Display pictures” and that’s all, it would be cheaper (though still kind of high for what you’re getting).

If the game does: “Take X amount of tokens from your wallet and store in smart contract. Verify this happened or the transaction fails. Get NOIS network (or maybe Archway will have an on-chain source of randomness one day - is there one now?) to generate some randomness. Use that randomness to determine outcome. Display pictures. Send tokens to player’s wallet or to somewhere else based on outcome.” - that’s a non-trvial transaction.

I would like to raise a number of points from a protocol engineering perspective that need to be considered before making any adjustments to the minimum price of gas.

As stated in this thread already, Archway fees are by design higher than that of other networks in the Cosmos ecosystem as Archway is designed with developer rewards in mind. Reducing the mpog will most certainly have an impact on rewards and may also have a further knock-on effect regarding other economic parameters. Transaction fees are also burned and lowering the price of gas will also lower the burn rate which in turn will have to be compensated for by adjusting inflation, which once again will have a profound impact on specifically validators, but also dapp developers.

I would also like to see some actual examples of transactions so that we can accurately run the numbers. Otherwise we have no choice but to consider the numbers given as anecdotal.

Also, the adjustment seems to be motivated by a very specific use case or class of use cases and may not be in the best interest of the overall network… for example, if the network is tailored to specifically cater for high volume, high frequency transactions it will consequently yield poor results for applications and use cases that prominently function on low volume and/or low frequency transactions. Real-Time Gross Settlements come to mind, NFTs (as most people purchase and hold for a prolonged period), identity services (such as ArchID, as most users will not be registering new IDs every day), KYC type applications where underlying data only changes on rate occasions, along with myriad other use cases…

A final point of consideration I would like to raise is that of security. Gas fees are designed to prevent misuse and abuse of a network and reducing it also lowers this barrier.

In conclusion, adjusting the minimum price of gas is a complicated matter, as its impact will reverberate across multiple domains, parties and systems that coexist in a delicate balance. For these reasons I once again implore you to provide specific examples of on-chain transactions so that our investigation, discussions and eventual conclusions will be fact based instead of anecdotal.

1 Like

Look at the fees for Dex token swaps I posted above. Dexes are a great example because everybody is familiar with them, and they’re real-world data we can go collect right now just by trying token swaps on various platforms. The data is a little bit dated since token prices have increased since yesterday, but everything has increased in price fairly proportionally so let’s just assume those numbers are reasonably accurate-ish for today.

140 Gway puts Archway transaction fees for a token swap in the “still higher than other competing networks but at least not completely ridiculous” category. It’s also high enough that spam/security is unlikely to be an issue – a ridiculously low fee that trivializes the value of blockspace would definitely be a bad idea, but 140 Gway is still pretty hefty, especially compared to other networks.

We can all put our heads together and research a bunch of other transactions to get more numbers, but a Dex swap is pretty simple and well understood by everybody, and from that number alone, it’s clear that 900 Gway is so ridiculous that it stands to deter users and is completely out of line with what any crypto user would expect to pay on any existing network (except Ethereum which stupefies everybody).

Big picture, the goal is for millions of users to be doing things on the Archway network every day, each paying a small transaction fee, but that fee multiplied by lots and lots of transactions means validators make money, developers make money, and users paid a fair price for something they wanted to use – everybody wins.

Currently, a tiny, tiny fraction of Archway’s blockspace is used, by a handful of loyal users. Trying to extract maximum value from those loyal users is shortsighted. The goal should be to build a network millions of people will want to use every day.

1 Like

The numbers above are anecdotal: “not necessarily true or reliable, because it is based on personal accounts rather than facts or research”; Please provide actual txs so that we can investigate the claims and/or other potential reasons for tx fees being as high…

Not sure why you need a specfic tx, @Tritador posted plenty of numbers of dexes to other dapps like Gelotto Threads showing the cost of tx. If you haven’t used any dapps in Archway, go give it a shot.

1 Like

This is great in theory, make gas high so that devs can build and make money from it. This theory would work in a matured environment but not when your trying to bootstrap the ecosystem. If there are no real demand for ARCH now and it’s too expensive to experiment and figure out what kind of Dapps people want to use, we are setting ourselves up for failure.

1 Like

Just wanted to provide a bit more context to this discussion as I don’t believe the high gas costs @Tritador is getting for Gelatto threads is being caused by the MPoG per say.

A few thoughts come to mind:

  1. The are multiple issues that can lead to high gas. These are: i) pessimistic gas estimation / adjustment; from the dapp frontend; ii) code or storage complexity in the smart contract; or, iii) MPoG
  2. Given the above, to assess what’s causing high gas costs we need a complete picture of what’s happening. That’s why tx links are helpful (shout out @notRizbe)
  3. The contracts I developed (ArchID, Archies, and the Ambur and ArchID marketplaces) show that transactions, even somewhat complex ones, are actually way less expensive than what @Tritador is suggesting. In fact, to get a similar fee to what @Tritador is getting for Threads, I had to store well over 2000 chars of JSON in storage.
  4. It seems like we all mostly agree that MPoG should be lowered, the problem is deciding how much it should be reduced. To decide that we need to agree on what is a simple transaction and to what extent contract developers vs protocol developers are responsible when high gas fees occur (again tx links are helpful for determining this, but os smart contract code is even better :sunglasses:)

Let me provide an example to illustrate what I mean. Recently, I worked with an NFT team to determine why minting costs were ~5 ARCH (example tx). Here’s how that went:

  • We noticed the first few mints cost ~0.15 ARCH
  • Very soon fee costs grew exponentially and settled around ~5 ARCH per mint
  • After seeing some of their code, I recognized what was causing the high gas cost and how the original fee cost of ~0.15 ARCH could easily be restored

Imagine you have a storage state setup like this:

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use cosmwasm_std::{Addr, Uint128};
use cw_storage_plus::{Item};

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct State {
    pub owner: Addr,
    pub cw721: Addr,
    pub whitelist: Vec<Addr>,
    pub whitelist_allowance: u64,
    pub mint_price: Uint128,
}
pub const STATE: Item<State> = Item::new("state");

Now imagine your whitelist has thousands of members stored in it; every time you load your STATE in a tx, the validator node loads that entire whitelist vector into wasm vm’s memory. This exact issue is what caused the mint price to increase to ~5 ARCH.

Okay, that’s cool but how do we reduce the fee cost back to ~0.15 ARCH? To reduce the cost we need to remove the whitelist attribute from the main STATE structure and move it to a key value pair storage keyed by user address. After making that change a validatator will never need to load the entire whitelist into memory because users can be verified by checking if their address exists as a key in the new whitelist storage type.

The change could look something like this:

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use cosmwasm_std::{Addr, Uint128};
use cw_storage_plus::{Item, Map};

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct State {
    pub owner: Addr,
    pub cw721: Addr,
    pub whitelist_allowance: u64,
    pub mint_price: Uint128,
}
pub const STATE: Item<State> = Item::new("state");

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct WhitelistMember {
    pub whitelisted: bool,
}
pub const WHITELIST: Map<&Addr, WhitelistMember> = Map::new("whitelist");

This very simple code change will reduce their tx fees from ~5 ARCH to ~0.15 ARCH, and I believe a similar optimization could be required for Gelatto threads because there’s no reason for a simple upvote to cost ~0.58 ARCH.

As always, I am happy to help anyone review or optimize their code. You can hmu on TG at Telegram: Contact @richgirlonlsd or find me hanging out in the Archway discord :sunglasses:

2 Likes

Here is a TX for tip + reply:

1 Like

@notRizbe looking at the storage of that contract makes me wonder how data storage is being handled and read in the contract logic.

I can see more than 2200 chars of base64 were being used to store both the post and its html tags. This is interesting because I needed to store a similar amount of chars to reproduce a tx cost comparable to Threads.

I’d try uploading a nearly empty post on testnet to see if tx fees are much lower. If they are, you’ll know the post length is the culprit for the high fees. Additionally, you’ll know how to fix it, because there is no reason I can see why the tip and reply entry point functions would need to read the entire post content into memory. Since we know the post content could be long, it is important that it’s only loaded into memory for creating, updating or removing the post.

Ran some test:

1 character : gas: 1.6 ARCH
800: 1.8 ARCH
2300: 2.3 ARCH

Besides Gelotto Threads, as @Tritador pointed out

A complex transaction on Astrovault (swapping ATOM tokens for ARCH tokens) requires a transaction fee of 3.26 ARCH (about 0.55 USD)

That is nuts!

Okay, so the problem must be elsewhere. I’m sure there’s a way to restore relatively normal fees but I’d need to go over the code in detail.

They use a complicated routing system involving many contracts and packages (I think more than 30), I don’t think it’s indicative of a normal “complex” tx since there’s so many different contracts involved.