
Vaultline is an onchain trading-accountability vault, live on Monad mainnet. You stake MON alongside a hashed commitment to your own trading rules, then self-report compliance every day. A clean day grows your streak; a violation or a missed report, which counts automatically slashes a fixed percentage of your remaining stake to a burn address or beneficiary. When the period ends, you withdraw whatever discipline earned back. It's deliberately self-reported. There's no oracle checking your trades — you can lie to it, exactly like you can lie to a trading journal. The difference: here, lying costs you real money. It's a commitment device that gives your own rules teeth. Onchain: the keccak256 hash of your rules (your strategy stays private, but you can always prove what you promised), the stake accounting, the ceil-division slash math, and a packed per-day status bitmap so the whole streak calendar reads from a single view call, no indexer, no backend. What I learned: - Monad's public RPC caps eth_getLogs at 100 blocks, which killed the event-replay dashboard I first designed. I redeployed with a uint192 bitmap storing 2 bits per day onchain — state beats logs when logs are rate-limited. - Ceil-division on slashing matters: floor division leaves dust unslashable and makes the "stake hits zero" path unreachable. - A hostile beneficiary (reverting / gas-griefing / reentrant) can brick settlement, every payout falls back to the burn address with a bounded gas stipend. Stack: AccountabilityVault.sol (Solidity 0.8.28, Foundry, 55 tests incl. fuzzing + reentrancy), verified on Monad mainnet. Frontend: Next.js + wagmi/viem.
讨论
还没有评论,快来分享你的看法吧。