Install any skill in seconds. Free to start, no credit card required.
Get Started Free →wshobson/defi-protocol-templates
Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and flash loans.
Passed 19 of 23 test cases with the skill, and 16 of 23 without it.
and 2 more in the full report
4 fixed15 passed either way3 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
What validation requirement must be satisfied during AMM LP share redemption in removeLiquidity after computing amount0 and amount1?
| Checked | Without skill | With skill |
|---|---|---|
| The removeLiquidity function validates output amounts with error string 'Amount0 or amount1 = 0'. | Missed | Passed |
The instructions your model reads when the skill loads.
Production-ready templates for common DeFi protocols including staking, AMMs, governance, and flash loans.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract StakingRewards is ReentrancyGuard, Ownable {
IERC20 public stakingToken;
IERC20 public rewardsToken;
uint256 public rewardRate = 100; // Rewards per second
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
mapping(address => uint256) public balances;
uint256 private _totalSupply;
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _stakingToken, address _rewardsToken) {
test cases passed, vs 16 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.