Solidity dev | Web3 learner | Building Meaningful Tech
0 Followers
๐ก๏ธ Building a Mini DeFi Bank with a couple of security upgrades. Was using CEI, but I layered in: โ ReentrancyGuard (to block recursive withdraws) โ Pausable (for emergency stops) โ Ownable (so only admin controls pause/unpause) โ Custom modifiers + events for clean traceability Got stuck at first importing Ownable โ forgot that newer OZ versions require initialOwner in the constructor. Easy fix once I caught it. Security isnโt optional. Cooldown logic + interest counter drops tomorrow. #solidity #defi #openzeppelin #smartcontracts
Mini DeFi Bank Update Today I reviewed and upgraded my contract found flaws, patched โem, learned a lot. ๐ง Lessons + Fixes: โ Tracked direct ETH in receive() with an event log (didnโt even know I could tbh) โ Removed redundant require() in withdraw() (gas savings > over-checking) โ Added 24hr cooldown per withdrawal โ Built 10% annual interest logic primary school math finally paid off ๐ Next: ๐ฏ .reset() function for test mode ๐ฏ Testnet deploy this weekend ๐งช How would you test a Defi Bank contract? #Solidity #DeFi #SmartContracts #OpenZeppelin #BuilderJourney #MiniDeFiBank #Web3Dev
๐
recast:farcaster://casts/0xfc1c889c761b37158b0e3ef8bc83091168436844bfd2ef72a3ef9962191fe0d6