cap.finance

Cap v1

August 2021

Today we're excited to unveil a major upgrade to the Cap protocol. Check it out here on Rinkeby testnet.

You'll need some testnet ETH to try it out which you can get here.

Cap is built to be timeless and censorship-resistant. With this upgrade, the protocol can run forever without intervention.

What's Cap?

Cap is a protocol that lets you trade markets directly from your wallet.

Traders make long or short bets on the future market price. A vault backs trader profits while receiving losses, fees, and interest.

Trading

When you open a position, you send margin from your wallet to the vault. When you close a position, the vault sends back your margin plus profits or losses.

Example: you believe ETH/USD, currently at $3000, will rise in price. You open a 10,000 USDC long position at 10x leverage. 1,000 USDC margin is sent from your wallet to the vault.

A few hours later, ETH/USD is at $3300, up 10%. Your profit is 10,000 × 10% = 1,000 USDC. You close your position, receiving 2,000 USDC from the vault, a +100% return on your margin.

If instead ETH/USD drops 4% to $2,880, you lose 10,000 × 4% = 400 USDC. You get back 600 USDC from the vault, a 40% loss on your margin.

Cap uses an isolated margin system. To make a trade, you only need to send the margin for that trade. In a cross margin system, you'd need to lock more funds to achieve higher leverage — funds that could be earning yield elsewhere.

You can add margin to your position at any time. This deleverages it and pushes away its liquidation price.

Prices are sourced from Chainlink, although this can be replaced with any on-chain price oracle. To mitigate front-running, new position prices are settled at the next oracle price change or after a settlement time has passed, whichever is earlier.

Vault

A vault is a liquidity pool that takes the opposite side of a trader's long or short bet. A trader's gain is the vault's loss and vice-versa.

Cap supports vaults with any ERC-20 token as collateral. Your stake in the vault backs trader profits; in exchange, you receive their losses, fees, and interest. You can stake anytime up to a vault's maximum capacity.

The staking period is currently set to 30 days. You can choose whether or not to redeem your stake, plus profits or losses, at the end of each staking period. Unredeemed stakes will be automatically rolled over to the next period.

Example: you have 10,000 USDC staked in the vault representing a 10% share. A trader loses 1,000 USDC on a trade. Your vault balance is now 10,000 + 10% × 1000 = 10,100 USDC. If instead the trader wins 1,000 USDC, your vault balance decreases to 9,900 USDC.

Hedging

Vault LPs face several risks:

At the protocol level, Cap mitigates these risks with:

For more complete risk protection, vault LPs can choose to hedge their stake. An LP with a stake in a vault that's currently net short on ETH/USD can choose to offset their risk exposure e.g. by buying ETH on Uniswap.

Since trades are internalized, a 50K long followed by a 40K short on the same market results in a net risk exposure of only 10K. Hedging 10K is easier and cheaper than hedging 50K followed by 40K.

LPs can also choose to hedge specific trades e.g. outsized ones, or specific traders e.g. ones that make consistent gains while leaving losing traders unhedged, netting their losses.

In aggregate, retail traders tend to lose money in the long run when factoring in spreads, fees, and trader psychology. Offering a diverse set of products and attracting a diverse range of traders will lead to less risky vaults as positions from different traders offset each other, making hedging less necessary.

The UI

Cap's open source frontend is hosted on IPFS and served through cap.finance (DNS) and cap.eth (ENS).

CAP Utility

CAP is the protocol's native token. In a sea of endless supply tokens, CAP stands out by having a fixed supply of 100,000.

CAP can be staked to receive trading fee rebates and other rewards.

CAP can also be used to govern the protocol, setting parameters such as risk limits and products available to trade. Tokenholders can choose to turn on a protocol fee to receive a share of the trading volume.

Development

In the interest of complete decentralization, future development will be led by open source contributors, starting with 0xmu. Abe and Tony will remain onboard as advisors.

Cap's code is on Github.

What's next

Cap is deployed on the Rinkeby testnet where it will undergo testing prior to being deployed on the Ethereum mainnet and layer 2s.

Incentive programs such as bonuses and fee rebates are planned to help support the community's organic growth efforts to attract traders.

Cap is community driven! Join us on Telegram.