3Commas · DeCommas
Delta-neutral perpetuals vault
A market-neutral yield vault on Optimism — a spot long hedged 1:1 by a short perpetual, earning the funding rate. Deposit USDC, hold an LP token, withdraw USDC.
Stack & integrations
- Solidity ^0.8
- Optimism
- Perpetual Protocol v2
- Uniswap v3
- ERC-1967 / UUPS proxy
- OpenZeppelin Upgradeable
Context
3Commas — a crypto trading-tools company — launched DeCommas, a decentralized toolset for on-chain traders. This is one of its strategy vaults: a delta-neutral (market-neutral) yield vault on Optimism. A user deposits USDC and receives an LP token; the vault earns the perpetual funding rate while holding almost no directional price exposure.
What it does — the product
Earning funding-rate yield by hand means running a spot position on one venue, an opposite perp on another, and constantly rebalancing as prices move. The vault holds both legs at equal size: a spot long (the wrapped asset, bought on Uniswap v3) and a short perpetual (Perpetual Protocol v2). Price moves cancel between the two, so the portfolio value barely changes with the market — what it keeps is the funding rate, plus a USDC buffer for liquidity.
Architecture
A single UUPS-upgradeable vault contract (behind an ERC1967 proxy) composes two external protocols and mints an LP token. Users deposit and withdraw; an off-chain trigger server opens, closes, and rebalances the two legs; the owner controls upgrades and configuration.
Money flow — deposit
A deposit is priced against the vault’s current net asset value, so later depositors don’t dilute earlier ones. The USDC lands in the reserve and is only put to work when the operator next opens or rebalances the position.
Money flow — rebalance (operator)
To open the hedge, the operator posts USDC collateral and opens a short on Perpetual Protocol, then buys the exactly matching amount of spot on Uniswap — so the two legs are the same size and net out. Rebalancing keeps them matched as prices drift; a full close unwinds everything back to USDC.
Money flow — withdraw
A redemption is valued from current NAV. If the USDC buffer covers it, the user is paid straight away; otherwise the vault unwinds part of both legs (sell spot, close perp, pull collateral) to raise the cash, then pays out and burns the shares.
On-chain deployment
Verified on Optimism as an ERC1967 proxy pointing at the DeltaNeutralPerp implementation (UUPS-upgradeable):
- Proxy — 0x3E81…06F7 ↗
- Implementation — 0x6C3F…7fa9 ↗
My contribution
Delivered the delta-neutral vault strategy on Optimism (ERC1967 proxy + UUPS implementation): the deposit / withdraw flow with LP-share accounting priced off live NAV, the market-neutral position management (a spot long on Uniswap v3 hedged 1:1 by a short on Perpetual Protocol v2), the funding-rate and TWAP valuation, and the operator (trigger-server) control surface for opening, rebalancing, and closing the position.