Crates.io | sg1 |
lib.rs | sg1 |
version | 3.15.0 |
source | src |
created_at | 2022-04-21 04:36:45.176999 |
updated_at | 2024-10-01 18:42:33.454863 |
description | Definition and types for the SG1 interface |
homepage | https://stargaze.zone |
repository | https://github.com/public-awesome/launchpad |
max_upload_size | |
id | 571351 |
size | 13,086 |
Fair Burn is a specification for processing fees in Stargaze, influenced by EIP-1559.
With Fair Burn, a portion of fees are burned, and the remaining portion is distributed to stakers. Currently, 50% is burned, and 50% go to stakers.
Fair Burn also includes a way to incentivize custom smart contract development by distributing some of the fee to a developer address. This developer fee is substracted from the amount burned.
For example, if a developer address is provided, 40% fees will be burned, 10% will go to the developer address, and 50% will go to the Community Pool.
const FEE_BURN_PERCENT: u64 = 50; // 50%
const DEV_INCENTIVE_PERCENT: u64 = 10; // 10%
Contracts can use Fair Burn via one of the following functions.
/// Burn and distribute fees and return an error if the fee is not enough
checked_fair_burn(info: &MessageInfo, fee: u128, developer: Option<Addr>) -> Result<Vec<SubMsg>, FeeError>
/// Burn and distribute fees, assuming the right fee is passed in
fair_burn(fee: u128, developer: Option<Addr>) -> Vec<SubMsg>
Custom contract developers can pass in a a developer
address that will receive 10% of all fees.