DIVA Protocol
  • ๐Ÿ‘‹Welcome
  • ๐Ÿ”…Introduction
    • Derivative contracts
    • What is DIVA Protocol
      • What problem does it solve
      • How it works
        • Reference assets
        • Payoff curves
        • Collateral
        • Oracles
        • Settlement
          • Timelines
          • Challenge
          • Status
          • Fast settlement
          • Fallback data provider
        • Fees
        • Compliance feature
      • Vision
      • Terminology
    • What is DIVA Token
      • Owner election mechanism
      • Token distribution
    • DIVA Development Fund
    • FAQ
  • ๐ŸŒˆDIVA App
    • What is DIVA App
    • Overview
    • Create position tokens
    • Trade position tokens
    • Add liquidity
    • Remove liquidity
  • โš™๏ธGuides
    • DIVA App Training
      • Prepare
      • Testnet
      • Create
      • Trade
      • Add
      • Remove
      • Settle
      • Redeem
      • Fees
    • Quiz
  • ๐Ÿช„Use cases
    • Overview
    • Insurance
      • Credit default protection
      • Agrarian insurance
      • DeFi Hack insurance
      • Peg insurance
    • Yield optimization
      • Bullish accumulation
      • Bearish accumulation
    • Risk management
      • Downside protection
      • Increasing cost protection
    • Directional bets
      • Downside bet
      • "Bottom-Is-In" bet
      • Upside bet
      • "Top-Is-In" bet
    • Leverage
  • ๐Ÿ‘จโ€๐ŸŽ“Pricing derivatives
    • Introduction
    • Underlying value
    • Volatility
    • Time
  • โš“Oracle integrations
    • Overview
    • Tellor
  • โš’๏ธFor developers
    • Overview
    • Technical resources
    • Smart contracts
      • Functions
        • Core protocol functions
        • Getter functions
        • Setter functions
        • ABI
      • Contract addresses
      • Example scripts
    • TheGraph
      • DIVA subgraphs
      • Whitelist subgraph
    • Project ideas
  • ๐Ÿ“ฑContact & Media Links
    • Social media
  • ๐Ÿ‘จโ€๐ŸŽ“Technical Blog
    • Flash loans in DIVA Protocol
    • NDVI outcome reporting guide for Tellor Reporters
    • Enabling capital efficiency in DeFi
Powered by GitBook
On this page
  • Pool configuration
  • โ€‹๐ŸคSell short position tokens
  • ๐Ÿ’ต Payoff scenarios
  1. Use cases
  2. Risk management

Increasing cost protection

Protecting against increasing costs

PreviousDownside protectionNextDirectional bets

Last updated 2 years ago

Bob is developing a smart contract and plans to deploy it in a month. He is concerned that the ETH gas price may go up by then increasing deployment costs. He would like to lock in a gas fee at a maximum of 150 Gwei.

Bob would like to create a position that increases in value as the ETH gas price exceeds 150 Gwei thereby neutralizing the increase in deployment costs. The strategy is illustrated below:

Alice is willing to take the other side as she believes that the ETH gas price will remain below 150 Gwei due to reduced activity in the prevailing bearish market environment.

Bob uses the DIVA App to configure a contingent pool that gives him the desired long position.

โ€‹๐ŸคSell short position tokens

After creating the pool, Bob sells all 5 short position tokens minted for a total of WETH 4.8 and keeps the long position tokens.

๐Ÿ’ต Payoff scenarios

1) ETH Gas Price <= 150 Gwei:

  • Bob paid a protection premium of WETH 0.2 (5 initially deposited and 4.8 received back due to the sale of the short side) and didn't receive any payout from his long position as the gas price ended up below 150 Gwei. -> net loss for Bob: WETH 0.2 -> net gain for Alice: WETH 0.2

2) ETH/USD = 350 Gwei:

  • Bob paid a protection premium of WETH 0.2 and can redeem all his initially deposited collateral of WETH 5 as the gas price ended up above the cap: -> net gain for Bob: WETH 4.8 (which he uses to neutralize the increased deployment costs) -> net loss for Alice: WETH 4.8

Pool configuration

๐Ÿช„
โš™๏ธ
An example strategy to protect against increasing gas costs using long position tokens on ETH gas price
Example configuration for a product that protects against increasing gas prices