CtrlK
BlogDocsLog inGet started
Tessl Logo

defi-protocol-templates

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

1.25x
Quality

57%

Does it follow best practices?

Impact

100%

1.25x

Average score across 6 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Optimize this skill with Tessl

npx tessl skill review --optimize ./plugins/blockchain-web3/skills/defi-protocol-templates/SKILL.md
SKILL.md
Quality
Evals
Security

Evaluation results

100%

26%

Yield Staking Platform Contract

Staking contract reentrancy and reward tracking

Criteria
Without context
With context

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%

100%

8%

Decentralized Token Swap Pool

AMM fee calculation and liquidity share math

Criteria
Without context
With context

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%

100%

27%

DAO On-Chain Governance System

Governance token voting power and proposal parameters

Criteria
Without context
With context

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%

100%

37%

Arbitrage Flash Loan Infrastructure

Flash loan provider and receiver pattern

Criteria
Without context
With context

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%

100%

12%

DAO Governance Token Implementation

ERC20Votes governance token overrides

Criteria
Without context
With context

_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%

100%

6%

Yield Farming Staking Pool with Emergency Exit

Staking exit function and Ownable access

Criteria
Without context
With context

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%

Repository
wshobson/agents
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

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.