NOTE TO JUDGES: This submission is the zkEVM Edition of my Custom Derivatives submission. This submission is intended only for a Polygon zkEVM sponsor bounty. Chainlink services are not available on the Polygon zkEVM networks, so please ignore that this ticked the DeFi track for Chainlink because I was unable to submit without selecting one. Thanks.


Derivatives agreements have long been a popular investment vehicle and potential usecase for smart contracts. New innovations in decentralised tech enable us to build projects allowing users to take full control of their own derivatives by specifying all of the relevant parameters.

What it does

This project allows users to deploy custom derivatives contracts to the Polygon zkEVM network, speculating on their asset of choice, with any collateral asset. The deploying user will also specify the amount of the collateral asset, the settlement time, the strike price and their long or short position. Anyone can participate as a counterparty by depositing the same amount of collateral and taking the opposite position. When a new derivative contract reaches its settlement time, it can be settled, comparing the strike price to the actual price of the underlying asset and paying out the total collateral (minus 2% developer fee) to the party with the winning position. The contract can be cancelled if both parties agree and the settlement time has not been reached, allowing them to each withdraw their full collateral. If one party deposits but the other doesn't, the depositing party can withdraw their full collateral when the settlement time has been reached.

How we built it

The project was built using Foundry.

Challenges we ran into

Chainlink services unfortunately are not available on Polygon zkEVM, so I had to use an alternative for price feed data.

Accomplishments that we're proud of

I'm proud of having built a project that allows users to deploy their own custom agreements.

What we learned

I learned about the benefits of Polygon's fast, cheap zkEVM network.

What's next for Palmcivet's Custom Derivatives (zkEVM Edition)

Integrating Chainlink services when they become available on the zkEVM network.

Built With

Share this project: