Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and lending systems. Use when building decentralized finance applications or smart contract protocols.
Install with Tessl CLI
npx tessl i github:wshobson/agents --skill defi-protocol-templatesOverall
score
71%
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillEvaluation — 100%
↑ 1.25xAgent success when using this skill
Validation for skill structure
Staking 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%
Without context: $0.3835 · 2m 2s · 13 turns · 62 in / 6,876 out tokens
With context: $0.5462 · 1m 53s · 25 turns · 526 in / 5,044 out tokens
AMM fee calculation and liquidity share math
Solidity version
75%
100%
SPDX license
100%
100%
OpenZeppelin IERC20
100%
100%
0.3% fee formula
87%
100%
Constant-product swap
100%
100%
sqrt initial shares
100%
100%
min subsequent shares
100%
100%
Reserve tracking
100%
100%
Mint event
100%
100%
Burn event
100%
100%
Swap event
100%
100%
Without context: $0.3363 · 1m 42s · 12 turns · 12 in / 5,914 out tokens
With context: $0.4143 · 1m 35s · 16 turns · 313 in / 4,848 out tokens
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
0%
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%
Without context: $0.3496 · 1m 57s · 14 turns · 13 in / 5,907 out tokens
With context: $0.4462 · 1m 27s · 18 turns · 922 in / 4,578 out tokens
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.