Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and lending systems. Use when building decentralized finance applications or smart contract protocols.
82
57%
Does it follow best practices?
Impact
100%
1.25xAverage score across 6 eval scenarios
Advisory
Suggest reviewing before use
Optimize this skill with Tessl
npx tessl skill review --optimize ./plugins/blockchain-web3/skills/defi-protocol-templates/SKILL.mdStaking contract reentrancy and reward tracking
Solidity version
60%
100%
SPDX license
100%
100%
OpenZeppelin IERC20
0%
100%
ReentrancyGuard import
0%
100%
nonReentrant on stake
100%
100%
nonReentrant on withdraw
100%
100%
nonReentrant on getReward
100%
100%
updateReward modifier
100%
100%
1e18 reward precision
100%
100%
Default reward rate 100
0%
100%
Staked event
100%
100%
Withdrawn event
100%
100%
RewardPaid event
100%
100%
AMM fee calculation and liquidity share math
Solidity version
75%
100%
SPDX license
100%
100%
OpenZeppelin IERC20
100%
100%
0.3% fee formula
80%
100%
Constant-product swap
90%
100%
sqrt initial shares
100%
100%
min subsequent shares
100%
100%
Reserve tracking
62%
100%
Mint event
100%
100%
Burn event
100%
100%
Swap event
100%
100%
Governance token voting power and proposal parameters
Solidity version
100%
100%
SPDX license
100%
100%
ERC20Votes inheritance
100%
100%
ERC20Permit in constructor
100%
100%
Initial supply 1M tokens
30%
100%
votingPeriod = 17280
0%
100%
proposalThreshold
0%
100%
getPastVotes for eligibility
100%
100%
getPastVotes for vote weight
100%
100%
ProposalCreated event
100%
100%
VoteCast event
100%
100%
ProposalExecuted event
100%
100%
Flash loan provider and receiver pattern
feePercentage = 9
0%
100%
Fee formula
100%
100%
IFlashLoanReceiver interface
100%
100%
executeOperation signature
50%
100%
Balance before check
75%
100%
Repayment verification
100%
100%
FlashLoan event
100%
100%
Receiver implements interface
100%
100%
Receiver approves amount+fee
0%
100%
executeOperation returns true
0%
100%
SPDX license
100%
100%
Solidity version
100%
100%
ERC20Votes governance token overrides
_afterTokenTransfer override
100%
100%
_mint override
100%
100%
_burn override
100%
100%
ERC20Votes import path
100%
100%
ERC20Votes inheritance
100%
100%
ERC20Permit constructor call
100%
100%
Initial supply 1M tokens
0%
100%
SPDX + Solidity version
100%
100%
Staking exit function and Ownable access
exit() function exists
100%
100%
exit() calls withdraw with full balance
81%
100%
exit() calls getReward
90%
100%
Ownable inheritance
100%
100%
Ownable import path
100%
100%
Constructor token params
100%
100%
ReentrancyGuard inheritance
100%
100%
SPDX license
100%
100%
Solidity version
100%
100%
IERC20 OpenZeppelin import
100%
100%
70444e5
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.