This bounty is no longer available
Web3 DAO | yieldhand Logo

Create Simple buyOptionByID Function in Core Contract




in over 262 years



43.99 USD


We just began work on this simple DeFi options market and are adding one simple function whereby most of the code has been written in another function (buyOptionByExactPremiumAndExpiry in

This is probably the simplest option market smart contract project in existence but ticks most of the boxes for what users need. Currently, a seller can create a limit order for an option of any token in the OptionsMarket. And a buyer(s) can purchase these options for set premium prices and strike prices. Further, the options can be exercised after their expiry. Super basic! We're all about simplicity and you can see more of what we're trying to do here:

With this project, the best part is that anyone can seamlessly create an option for any ERC20 token without it being whitelisted. There is so much possibility for what we can do from here (and contributors/community members will benefit in the long term from all of that), but first:

For this issue: We are adding buyOptionByID, which takes a orderId (produced by the seller of an option) and allows the user to buy based simply on that. Later, we will add a loop and another function so a user can fill several limit orders by ID. You can find a similar function that uses an ID by looking at excersizeOption in

Have questions? We welcome you to the new Discord: