Architecture Deep Dive
Last updated
// Core types with clear relationships
type BoostRequest = {
id: Nat;
owner: Principal;
amount: Nat; // Amount in satoshis
maxFeePercentage: Float; // Maximum fee user will pay
receivedBTC: Nat; // Actually received Bitcoin
btcAddress: ?Text; // Generated Bitcoin address
subaccount: Blob; // Isolated subaccount
status: BoostStatus; // Current state
matchedBooster: ?Principal; // Which booster accepted
createdAt: Int; // Timestamp
updatedAt: Int; // Last modification
};
type BoosterAccount = {
owner: Principal;
feePercentage: Float; // Fee this booster charges
subaccount: Blob; // Booster's isolated subaccount
availableBalance: Nat; // Available for new boosts
totalDeposited: Nat; // Lifetime deposits
totalWithdrawn: Nat; // Lifetime withdrawals
totalBoosted: Nat; // Volume provided
totalFeesEarned: Nat; // Fees earned
createdAt: Int;
updatedAt: Int;
};