Onit
Cover photo

Onit Contracts - Version 0.0.2

Onit

Onit

We recently launched our API and SDK, allowing a select group of partners to create Onit markets and integrate them into their own apps. This launch made it important to build things like creator rewards into the protocol at the contract level, so we have upgraded our contracts to V0.0.2. We also bundled in some other improvements that will make deploying more versatile market types easier in future.

Market Creators

  • Creator Address and Creator Commission: These allow the market creator to set a percentage of the market pot to keep as a commission. Can be configured from 0 -> 4%

  • Seed Funds: The market creator can seed the market with a balance to increase the pot.

Resolvers

  • Multiple Resolvers: We now store this as an array so you can set a number of addresses who are permitted to resolve the market.

  • Configurable Withdrawal Delay Period: After the market is resolved there can be a delay until winnings can be claimed. This acts as time to settle disputes and update the resolved value if needed.

Market Contract

  • Market Constant Calculations On Initialisation: Doing this in the initialiser is better as we have all the parameters needed to setup the infinite outcome mechanism there, it also reduces failed deploys due to rounding errors between typescript and solidity.

  • Flexible Betting Cutoff: For markets where there will be a set time when the resolution criteria will be known, but it is not known yet.

  • Separating Functions: We have broken the market contract into separate Market, Mechanism, and Resolver contracts. This helps us more towards a more configurable protocol.

post image
Outline of the separated contract functions

Collect this post as an NFT.

Onit

Subscribe to Onit to receive new posts directly to your inbox.

James McComishFarcaster
James McComish
Commented 2 weeks ago

We updated our contracts to build things like market creator splits into the protocol, so if you deploy an @onit market you can earn! Actively onboarding more protocol apps, so DM if you'd like access https://paragraph.xyz/@onit/onit-contracts-version-002

Onit Contracts - Version 0.0.2