Summary
There is no fee collection contract. The backend charges a 1.5% fee on crypto trades and a 10% penalty on early savings withdrawal, but these fees are only tracked in the database — they are not collected into a verifiable on-chain treasury address.
Impact
- Platform revenue is unverifiable — no on-chain proof of fee collection.
- Fees stored only in the DB can be altered or hidden.
- No transparent fee distribution to stakeholders or protocol treasury.
Proposed contract
A Soroban fee treasury contract that:
- Receives fee payments from the swap and savings contracts.
- Tracks cumulative fees by type (trade fee, withdrawal penalty, etc.).
- Allows the multisig admin to withdraw accumulated fees to a designated treasury wallet.
- Emits events for every fee collection for full auditability.
pub trait FeeTreasury {
fn collect_fee(env: Env, fee_type: Symbol, amount: i128, from: Address);
fn withdraw(env: Env, admin: Address, amount: i128, to: Address);
fn get_balance(env: Env) -> i128;
fn get_fees_by_type(env: Env, fee_type: Symbol) -> i128;
}
Files affected:
- New:
src/fee_treasury/lib.rs
- New:
src/fee_treasury/Cargo.toml
Summary
There is no fee collection contract. The backend charges a 1.5% fee on crypto trades and a 10% penalty on early savings withdrawal, but these fees are only tracked in the database — they are not collected into a verifiable on-chain treasury address.
Impact
Proposed contract
A Soroban fee treasury contract that:
Files affected:
src/fee_treasury/lib.rssrc/fee_treasury/Cargo.toml