소스 정보
- 저장소
- mikailustuner/OmniRule
- 최근 소스 활동
- 2026년 5월 8일 23:36
- 감지된 SKILL.md 언어
- 영어
- 스타
- 5
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/mikailustuner/OmniRule --skill defi-patterns명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | defi-patterns |
| description | DeFi Patterns: AMM, lending, staking, tokenomics, yield farming, DAOs. |
| triggers | {"extensions":[".sol"],"directories":["defi/","protocols/","token/"],"keywords":["defi","amm","uniswap","lending","aave","compound","yield","staking","dao","governance","swap"]} |
| auto_load_when | Building DeFi protocols or integrating DeFi |
| agent | blockchain-developer |
| tools | ["Read","Write","Bash"] |
Focus: AMMs, lending, staking, governance, tokenomics
AMM Patterns:
├── Constant Product (x * y = k)
│ ├── Uniswap V2 style
│ └── Arbitrage keeps price aligned
│
├── Stable Swap (Curve)
│ ├── Stable asset swaps (USDC/USDT)
│ └── Concentrated liquidity (Uniswap V3)
│
├── Hybrid (Balancer)
│ ├── Multiple tokens, weighted
│ └── Smart order routing
│
└── Reading price from AMM
├── getAmountOut(tokenIn, amountIn)
└── Price impact = slippage
Key formulas:
Output amount = (amountIn * reservesOut * 997) / (reservesIn * 1000 + amountIn * 997)
k = tokenA * tokenB (constant)
Lending Patterns (Aave/Compound):
├── Lending Pool
│ ├── Deposit collateral (approve → deposit)
│ ├── Borrow against collateral (overcollateralized)
│ └── Interest earned by suppliers
│
├── Liquidation
│ ├── When health factor < 1
│ ├── Liquidators pay debt + get collateral
│ └── Bot arbitrage on liquidations
│
├── Interest Rates
│ ├── Supply APY = utilization * borrow APY
│ └── Variable (flexible) vs stable (fixed)
│
└── Flash Loans
├── Borrow without collateral (same block)
└── Must return + fee by end of tx
└── No state change if not repaid
Staking Patterns:
├── Direct Staking
│ ├── Lock tokens for rewards
│ └── Linear/unlocking vesting
│
├── Liquid Staking (LSD)
│ ├── Stake → get receipt token (stETH, rETH)
│ └── Receipt token = fungible, tradeable
│ └── Underlying stake accrues value
│
├── Governance Staking
│ ├── Stake → voting power
│ └── Delegate to others
│ └── Quadratic voting
│
├── Reward Distribution
│ ├── Merkle tree (airdrop claims)
│ └── Linear vesting contracts
│ └── Batch distribution
Token Design Patterns:
├── Utility Tokens
│ ├── Fee discount (like BNB)
│ ├── Governance voting
│ └── Staking rewards
│
├── Governance Tokens
│ ├── Voting power = token balance
│ └── Timelock on proposals
│ └── Quorum requirements
│
├── Revenue Share
│ ├── Protocol revenue → token buyback
│ └── Or distribution to stakers
│
└── Vesting
├── Team/investor unlock schedule
├── Linear or cliff
└── TGE (token generation event) % first
DAO Patterns:
├── Governance Structure
│ ├── Token holder voting
│ ├── Executive (execute passed proposals)
│ └── Timelock (delay before execution)
│
├── Proposal Lifecycle
│ ├── Submit → Discussion → Vote → Queue → Execute
│ └── Minimum quorum required
│
├── Voting Mechanisms
│ ├── Direct (one token = one vote)
│ ├── Quadratic (sqrt reduces whale power)
│ └── Conviction voting (time-based)
│
└── Execution
└── Gnosis Safe + Zodiac modules
└── Teller (automatic execution)
❌ No slippage protection — MEV extracts value
✅ Set max slippage, use TWAP for large trades
❌ No access control on critical functions
✅ OnlyOwner or role-based, timelock
❌ Reentrancy in lending — can drain pool
✅ Follow CEI pattern, ReentrancyGuard
❌ No oracle for price — easy to manipulate
✅ Use Chainlink, TWAP, multiple sources
❌ No upgrade path — contract immutable forever
✅ Proxy pattern for upgradability, or plan for immutability
| Pattern | Protocol | Key Feature |
|---|---|---|
| AMM | Uniswap V2/V3 | Constant product |
| Stable Swap | Curve | Low slippage |
| Lending | Aave/Compound | Overcollateralized |
| Flash Loan | Aave | No collateral |
| Staking | Lido, Rocket Pool | Liquid staking |
| Governance | Compound, Uniswap | Token voting |
| Oracle | Chainlink | Decentralized |
| Aggregator | 1inch | Best price |