Final Project Intro

A hands-on introduction to Building the Funding Fee Farming Vault - Learn the core strategy for the final project: shorting ETH with ETH collateral for delta neutrality. Discover how this vault isolates and captures funding fees as the primary profit source.

Get SSCD+ certified, for free!

Cyfrin Updraft has partnered with GMX to provide SSCD+ certifications vouchers to the first 25 students who demonstrate the completion of this course and are building on top of GMX. Join the GMX Discord server to redeem your coupon, or navigate to the docs to learn more!

1. Final Project Intro
A hands-on introduction to Building the Funding Fee Farming Vault - Learn the core strategy for the final project: shorting ETH with ETH collateral for delta neutrality. Discover how this vault isolates and captures funding fees as the primary profit source. Duration: 1min
2. Application Architecture
An architectural breakdown to Funding Fee Vault Architecture - Explore a system using WETH deposits in a Vault/Strategy pattern to capture GMX funding fees via an admin-managed short position. Understand how user deposits/withdrawals and GMX interactions (including callbacks) are handled. Duration: 3min
3. Callback
A technical explanation to GMX Callback Contracts - Understand how GMX uses callback contracts via `CallbackUtils.sol` to react to order execution, cancellation, or freezing events. Learn to implement required functions like `refundExecutionFee` in your own contract to handle these events and reclaim unused gas fees. Duration: 2min
4. Quiz 4 Quiz
Questions: 12
5. GMX Helper Exercises
A practical exercise to `GmxHelper` Exercises - Implement Solidity functions within `GmxHelper` to manage GMX V2 short positions. Learn to calculate size deltas, create/cancel orders, and claim funding fees. Reading Time: 0min
6. Strategy Exercises
A practical exercise to `Strategy` Exercises - Implement Solidity functions within a `Strategy` contract to handle GMX interactions via `GmxHelper`. Learn to calculate total value, increase/decrease positions, cancel orders, and claim funding fees. Reading Time: 0min
7. Withdraw Callback Exercises
A practical exercise to `WithdrawCallback` Exercises - Implement Solidity callback functions (`afterOrderExecution`, `afterOrderCancellation`, `afterOrderFrozen`, `refundExecutionFee`) for handling GMX withdrawal orders. Manage execution fee refunds, token transfers, and user shares based on order outcomes. Reading Time: 0min
8. Vault Exercises
A practical exercise to Vault Exercises - Implement Solidity functions for WETH deposit, withdrawal, and value calculation in a Vault contract. Learn to manage user shares, interact with a strategy contract, and handle withdrawal order logic. Reading Time: 0min

Course Overview

About the course

What you'll learn

Mechanics and contract architecture of the GMX protocol

Token pricing and fees

Liquidity: GM pools and GLV vaults

Math, funding rates, liquidation pricing, P&L calculations

Limit orders, take profit orders, stop loss, and stop market orders

Auto-cancel and auto-deleveraging

GLP, esGMX, GMX staking and delegation

Course Description

Who is this course for?

  • Software engineers
  • Web3 developers
  • Finance developers
  • Smart contract security researchers

Potential Careers

DeFi Developer

$75,000 - $200,000 (avg. salary)

Smart Contract Engineer

$100,000 - $150,000 (avg. salary)

Web3 developer

$60,000 - $150,000 (avg. salary)

Web3 Developer Relations

$85,000 - $125,000 (avg. salary)

Smart Contract Auditor

$100,000 - $200,000 (avg. salary)

Security researcher

$49,999 - $120,000 (avg. salary)

Meet your instructors

Tasuku Nakamura

Tasuku Nakamura

Founder at smartcontract.engineer

Smart contract engineer and educator.

Last updated on June 26, 2025