3 - Rewards don’t get “sent over time”, they’re accounted.
Reward-per-share exists to distribute rewards fairly over time without iteration.
Time + ownership + lazy accounting = scalable DeFi.
2 - Staking shares > Staking assets.
When you stake vault shares, the staking contract doesn’t need to know about deposit amounts or vault value.
It only rewards ownership, and ownership already adapts as the vault grows.
Instead of building “one more project”, I’ve been focusing on mastering some DeFi primitives:
vaults, shares, staking, and reward accounting.
Here are the top 3 things that actually clicked for me 👇🏽
Subjects that should be mandatory in schools:
- Taxes
- Networking
- Psychology
- Public speaking
- Personal finance
- Self-defense
- Nutrition and metabolism
What's missing?
My coverage priority when testing with Foundry:
1. Branches & Statements (logic works)
2. Lines (useful but less precise)
3. Functions (nice to see green)
Test coverage % matters less than what you’re actually covering.
If branches are weak, your test suite is lying. You can hit all functions and still miss the check that breaks you after deploy.
My go-to test syntax:
test_<functionUnderTest>_<condition>_<expectedOutcome>
test_deposit_onSuccess_emitsCollateralDeposited()
test_withdraw_reverts_ifNotEnoughBalance()