This plan implements an automatic development fee mechanism to ensure long-term sustainability of Mostro development. On each successful order, a configurable percentage of the existing Mostro fee will be automatically sent to an official Mostro development Lightning Address. This creates a sustainable funding stream for bounties, ongoing development, and maintenance without relying solely on grants.
Key Design Decisions:
- Additional fee on top of current Mostro fee (paid by seller)
- Fee amount: Configurable percentage of existing Mostro fee (default 30%)
- Non-blocking: Failed dev payments don't prevent order completion
- Hardcoded constant with enforced minimum floor
- Comprehensive logging for transparency and manual recovery
Problem Statement
Mostro is currently funded by non-profit grants and donations. This funding model has risks:
- Grant availability is uncertain
- Dependency on individual donors (e.g., HRF BDF, Opensats initiatives)
- No guaranteed sustainable income for ongoing development and maintenance
Solution: Implement an automatic, transparent development fee that generates predictable revenue from platform usage while maintaining user trust through configurability and non-blocking error handling.
Technical Design
- Configuration Architecture
New Settings Fields (add to MostroSettings in /home/negrunch/dev/mostro/src/config/types.rs):
#[derive(Debug, Deserialize, Default, Clone)]
pub struct MostroSettings {
// ... existing fields ...
/// Development fee as percentage of Mostro fee (0.0 to 1.0)
/// Example: 0.30 = 30% of Mostro fee goes to development
pub dev_fee_percentage: f64,
/// Minimum enforced development fee percentage
/// Operators cannot set dev_fee_percentage below this value
pub min_dev_fee_percentage: f64,
/// Official Mostro development Lightning Address
pub dev_fee_lightning_address: String,
}
Default Values:
- dev_fee_percentage: 0.30 (30% of Mostro fee)
- min_dev_fee_percentage: 0.10 (10% minimum floor)
- dev_fee_lightning_address: "dev@mostro.network" (or official address)
Configuration File (/home/negrunch/dev/mostro/settings.tpl.toml after line 53):
Development sustainability fee
# This fee funds ongoing Mostro development, maintenance, and bounties
# It is calculated as a percentage of the existing Mostro fee
dev_fee_percentage = 0.30 # 30% of Mostro fee goes to development
min_dev_fee_percentage = 0.10 # Minimum 10% enforced
dev_fee_lightning_address = "dev@mostro.network"
Validation Logic (startup check):
- Verify dev_fee_percentage >= min_dev_fee_percentage
- Verify dev_fee_percentage <= 1.0 (cannot exceed 100%)
- Verify Lightning Address format is valid
- Daemon refuses to start if validation fails
- Fee Calculation Logic
New Function (add to /home/negrunch/dev/mostro/src/util.rs after get_fee() around line 154):
/// Calculate development fee from the existing Mostro fee
/// Returns the amount in satoshis to send to dev fund
pub fn get_dev_fee(mostro_fee: i64) -> i64 {
let mostro_settings = Settings::get_mostro();
let dev_fee = (mostro_fee as f64) * mostro_settings.dev_fee_percentage;
dev_fee.round() as i64
}
Example Calculation:
- Order: 100,000 sats
- Mostro fee (1%): 1,000 sats (split 500 buyer / 500 seller)
- Dev fee (30% of Mostro fee): 300 sats
- Total seller pays: 100,000 + 500 + 300 = 100,800 sats
- Buyer receives: 100,000 - 500 = 99,500 sats (unchanged)
Who Pays: The development fee is added to the seller's hold invoice, making the seller responsible for the additional fee. This is fair because:
- Sellers are already paying a hold invoice
- Sellers typically mark up prices to account for fees
- Buyers' experience remains unchanged
This plan implements an automatic development fee mechanism to ensure long-term sustainability of Mostro development. On each successful order, a configurable percentage of the existing Mostro fee will be automatically sent to an official Mostro development Lightning Address. This creates a sustainable funding stream for bounties, ongoing development, and maintenance without relying solely on grants.
Key Design Decisions:
Problem Statement
Mostro is currently funded by non-profit grants and donations. This funding model has risks:
Solution: Implement an automatic, transparent development fee that generates predictable revenue from platform usage while maintaining user trust through configurability and non-blocking error handling.
Technical Design
New Settings Fields (add to MostroSettings in /home/negrunch/dev/mostro/src/config/types.rs):
#[derive(Debug, Deserialize, Default, Clone)]
pub struct MostroSettings {
// ... existing fields ...
}
Default Values:
Configuration File (/home/negrunch/dev/mostro/settings.tpl.toml after line 53):
Development sustainability fee
Validation Logic (startup check):
New Function (add to /home/negrunch/dev/mostro/src/util.rs after get_fee() around line 154):
/// Calculate development fee from the existing Mostro fee
/// Returns the amount in satoshis to send to dev fund
pub fn get_dev_fee(mostro_fee: i64) -> i64 {
let mostro_settings = Settings::get_mostro();
let dev_fee = (mostro_fee as f64) * mostro_settings.dev_fee_percentage;
dev_fee.round() as i64
}
Example Calculation:
Who Pays: The development fee is added to the seller's hold invoice, making the seller responsible for the additional fee. This is fair because: