Oppanda is an experimental project to add support for creating off chain proposals with defined validators that can be funded. Proposals are defined off-chain and proposal=> external validator url
is recorded onchain. Funds are transfered when external oracle validates that proposal is approved by validators. Currently proposals can be validated through tweets from validators and Off-chain signatures stored in IPFS.
Proposals and approval records are optionally stored in IPFS using Web3.Storage api.
A solidity contract that records proposalId => (Oracle Url, AvailableFund)
.
- Proposers creates the proposal.
- Anyone can fund the proposal.
- Proposers* requests funds. Contract requests external oracle url if the fund is approved, and if approved it transfers available fund.
- A Json document describing who the validators along with IPFS CID that provides human readable details.
- Defines oracle type. Currently Twitter and signature proofs are added.
- Twitter - Validators is a set of twitter handles. To approve a proposal, all validators should tweet with both
#<proposalId>
and#approve
hashtags in the tweet. - Signature Proof - Proposer should record a IPFS CID that contains signature from all validators. File format is in
SignatureBasedApproval.cs
.
- Twitter - Validators is a set of twitter handles. To approve a proposal, all validators should tweet with both
- External service that is able to confirm if a proposal has been validated by the validators. Both twitter and signature proof can be validated by anyone. Function of oracle is to provide this service and it introduces a point of centralization.
- Has APIs for registering
Proposals
and checking if a proposal has been approved. Proposals and validation records are stored in IPFS in addition to oracle's own storage. On chain contract
has aproposalId => Oracle Url
map. The assumption is that the ones that fund trust theOracle Url
. On-Chain contract can be extended with multiple such urls to minimize trust on one url.- Only requirement for this
Oracle Url
is to return{"Approved": true/false}
forhttps://oracleurl?proposalId=<proposalId
>` requests.
- It is an implementation of
Off-Chain Oracle
.
Example Use case: Fund Raising for social impact
Proposer can define a proposal with reputed twitter handles as validators and launch a campaign on twitter. Validators can show their support through tweets. Anyone can view the list of validators, oracle url and fund the proposal. When all the validators have approved, proposer can request fund and use it. Amount of fund disbursed by a oracle url signals its reputation to some extent. Gas costs for each of the validator is avoided.
- This can be done purely on-chain, with each validator recording approval on-chain. It would have additional gas costs.
- Snapshot is an off-chain voting mechanism. It focus on DAOs. Reality.eth can be used to record the decisions on-chain, it has bond based incentives for recorders.
- EthContracts/: Solidity contracts. There is only one now.
- CoreLib/: Definition for contracts, twitter validation and IPFS interaction.
- AzureTableStore/: Storage for proposal entries and validation records.
- AzureFunctionsLauncher/: Helper methods for hosting it in azure function.
- OppandaCli/: Launches it locally. Used for testing.
RpcExecutor.ExecuteAsync(queryParameters, bodyString)
is the entry point. Call this with http query parameters and request body.- When
type=jsonrpc
is added to queryParameters, it executes the json rpc request. Format of requests is described later. - Without
type=jsonrpc
parameter, it executesIsApprovedAsync
takingproposalId
query parameter. It would return a json response of the form below.
{
"Approved": <true/false>
}
OppandaFunctionsRunner.Initialize
has the initialization code that reads config and createsRpcExecutor
.
Above pieces should support hosting in a variety of environments.
- Better documentation for creating and approving proposals.
- Share hosted url for
Oppanda Oracle
- Solidity Contract updates
- Implement withdrawal.
- Require LINK tokens for request funds api calls.
- Emit events.
- Mainnet deployment.
- UX for querying proposals, statuses.