Claims and endgame testing done, then the breathing engine. 139 to 198 tests.
Then went back over all of them instead of writing more, and found about seventeen assertions worth almost nothing.
The pattern: assertGt(refund, 0) where the exact figure was computable. That covers one wei to the whole stake. A contract paying a rounding error instead of $450 would have passed.
Nothing was broken. It all passed the whole time.
A test passing doesn't mean much until it's checked it can fail.
https://t.co/wNbZXdUNAW
One of the dormancy tests asserts that something can't happen.
BullsEthCRE winds down in four tiers if the game stops early. Investor seed first, then committed players' principal, then current-draw refunds, then a remainder. A tier that can't be covered in full pays out pro-rata, and that branch is the one deciding who absorbs the loss.
But a per-draw floor reserves the investor's unreleased seed on every single draw. So by the time a wind-down fires, that branch should be unreachable for the senior tiers.
The test asserts it never runs. If it ever fails, the floor has stopped working.
139 tests, green on every push. Claims and endgame next.
https://t.co/wNbZXdUNAW
If you looked at BullsEthCRE before and bounced off the 5,000 line wall, there's an interface to read now.
IBullsEthCRE.sol: every external signature, the custom errors, the events, all documented. The contract implements it, so the compiler won't let the two drift apart.
Writing it down exposed three claims that weren't true. One function documented as callable by keeper or owner had no access control at all.
Foundry suite at 96 and green on every push. Pregame covered properly, dormancy next.
https://t.co/wNbZXdUNAW
Been building on-chain games with Chainlink (VRF, Feeds, Functions, now CRE).
But the games themselves aren't the main point anymore.
They're the proving ground for 5 reusable economic mechanisms I've been building. Here's the stack: 🧵
The Chainlink Build program is moving from token rewards to $LINK fees. As a builder my takeaway is simple.
Make something the network actually needs, price it honestly, and let the work speak. Right, back to the contracts.
Fuzz test results on Crypto42's swap-and-pop pattern.
Random subscriber counts with random expirations
All subscribers expired (empty list edge case)
Zero expirations (clean traversal)
Consecutive expirations triggering chain-reaction removals
Single subscriber (minimum viable case)
250 subscribers forcing 3+ batch boundary crossings
Expire at position 0 (immediate swap-and-pop at cursor)
70,000 randomized scenarios. 0 failures. 101 seconds.. testing continues
What if the most based thesis isn't a coin at all @jessepollak ?
Building on Base where capital locks permanently and compounds. No token. Just a mechanism where the floor only rises.
The Eternal Seed 🌱 Sometimes the best investment thesis is infrastructure, not another ticker ;)
Ongoing tests on Lettery v1.6.6 (@base Sepolia).
Testing guess validation. Both rejected 👍
"ABC" rejected. Too short, need exactly 6 characters.
"DYBBLL" rejected. Each character must be unique
As Web2 and Web3 merge, the primitives/infrastructure underneath need to be bulletproof.
Building one now. The Eternal Seed. Cyfrin is exactly where security standards need to be.
Ongoing tests on Lettery v1.6.6 (@base Sepolia).
Testing guess validation. Both rejected 👍
"ABC" rejected. Too short, need exactly 6 characters.
"DYBBLL" rejected. Each character must be unique
Full Draw Cycle Complete on @base Sepolia
The first full end-to-end draw cycle on Lettery v1.6.6, our 42-character lottery with @chainlink VRF V2.5 and @aave V3 yield generation.
Full cycle tested and passing: buy ticket.. 65% to prize pool, 35% to treasury, then - trigger draw (VRF) - calculate matches - populate tiers - distribute prizes - clean-up week.
Winning combo from round 1: H4T6WR.. my guess was DYBL69 (didn't win the lotto but felt like winning ;) https://t.co/aeNdHfh59x