You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some gas-free cosmos chains have been attacked by spam transactions that clutter blocks and crowd out legitimate users and app logic. Stride has no transactios fees today, so that the UX is seamless for liquid stakers, but this makes Stride potentially vulnerable to spam transactions.
We could achieve the same seamless UX by setting a small non-zero default tx price, but allowing exceptions: liquidStake and redeemStake txs are gas-free below some threshold value (e.g. less than 1000atom), and ibcTransfers of st assets are gas free. This is the only relevant user flow we need to keep gas-free for the sake of UX; we can charge gas for other types of transactions - that won't impact the UX since it's outside the typical user flow.
Credit to Osmosis for writing the x/txfees module and writing the first
Suggested Design
High level
Add the x/txfees module (and greenlight st assets)
Set default gas to small non-zero value
Add detection logic to AnteHandler for charging custom gas based on message type and value (pioneered by Osmosis)
Detailed Design (full credit to Osmosis for pioneering this)
Transaction Fees x/txfees is implemented in Osmosis' repo here
Background
Some gas-free cosmos chains have been attacked by spam transactions that clutter blocks and crowd out legitimate users and app logic. Stride has no transactios fees today, so that the UX is seamless for liquid stakers, but this makes Stride potentially vulnerable to spam transactions.
We could achieve the same seamless UX by setting a small non-zero default tx price, but allowing exceptions:
liquidStake
andredeemStake
txs are gas-free below some threshold value (e.g. less than 1000atom), andibcTransfer
s of st assets are gas free. This is the only relevant user flow we need to keep gas-free for the sake of UX; we can charge gas for other types of transactions - that won't impact the UX since it's outside the typical user flow.Credit to Osmosis for writing the
x/txfees
module and writing the firstSuggested Design
High level
x/txfees
module (and greenlight st assets)Detailed Design (full credit to Osmosis for pioneering this)
Transaction Fees
x/txfees
is implemented in Osmosis' repo hereAnteHandler work
As a reference, see Dev’s AnteHandler work for arb-tx detection + custom gas prices:
- Written in osmosis-labs/osmosis#741
- Refactored in https://github.com/osmosis-labs/osmosis/pull/777
Acceptance Criteria
The text was updated successfully, but these errors were encountered: