Pool‑adapter first
Your bot reads liquidity, fee rate, edge, and max payout fraction from a pool adapter.
Today it can be mock data; later you swap in on‑chain or backend adapters.
getPoolInfo() → liquidity, fees, edge, caps
safe max bet auto‑calculated from pool liquidity
quotes always computed the same way
User‑facing transparency
Before any flip, users see: fee, bet-after-fee, win return, win profit, loss on lose, and safety locks.
The UI never hides the math.
bet = user wager (1 / 5 / 10)
fee = bet × feeRate
betAfterFee = bet − fee
winProfit = betAfterFee × m
winReturn = betAfterFee + winProfit
loseLoss = bet
Pool safety caps
Let L be pool liquidity and α be max payout fraction. Then max payout is:
maxPayout = L × α
maxBet = maxPayout / ((1−feeRate) × (1+m))
The “safe ladder” can also require liquidity for N consecutive wins (optional strict mode).