Using your own oracles

Making an oracle, resolver, or adding an underlying

As of now, SmartPiggies only allows certain resolvers and underlyings. The SmartPiggies oracles need to enforce the execution price after expiration. For example, most price oracles return the spot price at the time of the call. With SmartPiggies, a piggy needs to execute a payout calculation based on the price it receives from an oracle. If a piggy matures on a particular data, say January 1st, 2021, and either counterparty doesn't call the oracle for settlement until February 1st, 2021, the execution price cannot be from February 1st, it must be from January 1st. Because of this requirement, creating oracles is challenging. The current oracle providers will retrieve and return a "live" price, which works for American style options, or if the oracle returns the price at the time of maturity for both American and European. However, because the blockchain is a push oriented technology, any automatic execution needs to be handled off-chain.

There are plans to create an oracle marketplace, with reputation and governance mechanics. But this is not implemented at this time. For the time being, SmartPiggies will continue to add and maintain oracles and resolvers for the application, with plans for community participation in the future.


  1. Piggies that have resolvers or collateral not recognized by the platform will not show up in the market place, for example.

Last updated