๐Ÿ“Survey Posting Standard

A logographic data tagging scheme for freely sharing cryptographic commitments on the web.

A multiple choice survey regarding the outcome of a future event may be encoded in an RFC3986 compatible URI and shared on any relevant web-based page or platform. The survey and its components are demarcated by URI query parameters. The query parameters MUST adhere to specific URL-encoded emojiโ€™s, defined below, that allow for both humans and machines to easily parse the important aspects from a URI. Applications using the PORPOISE survey posting standard should be sure to sanitize URL contents.

A survey is comprised of the following components:

Dolphin (%F0%9F%90%AC): ๐Ÿฌ

The dolphin emoji is used as the query parameter to set the body of the survey text, i.e. what is the survey asking. Spaces must be encoded as a dash (-) instead of the base64url encoding of %20 since it is more human-readable. For example, "Will Bitcoin moon soon?" should be encoded as "Will-Bitcoin-moon-soon?".

Ballot Box (%F0%9F%97%B3): ๐Ÿ—ณ๏ธ

The ballot box emoji is used in conjunction with an integer to denote the prediction options of the survey. The option integer must start at 1 and increase in increments of 1 (i.e. ๐Ÿ—ณ๏ธ1=soon&๐Ÿ—ณ๏ธ2=ngmi). We anticipate that most surveys will have only two options but URLs can accommodate at least 2000 characters, so many options may be supplied in a single survey URL string.

Alarm Clock (%E2%8F%B0): โฐ

The alarm clock emoji is the query parameter that states a UTC timestamp dictating when the survey will be closed and no longer accept valid predictions. The timestamp must be reported in milliseconds.

Crystal Ball (%F0%9F%94%AE):๐Ÿ”ฎ

The crystal ball emoji is used as the query parameter to denote the on-chain address which will post the final event outcome (the posted outcome MUST be one of the options denoted in the survey). If no oracle is desired, this field can be set to 0 (the integer string). However, the survey will not be amenable to bounties.

Closed Door (%F0%9F%9A%AA):๐Ÿšช

A cryptographic commitment binds a user to a chosen value without revealing what value the user has committed to. When used with a salt value, the commitment becomes effectively impossible to unveil without the values that where fed into the hashing algorithm. The closed door emoji can be used to share a commitment value as a URL parameter, and along with the salt and checkmark emojis, can allow a user to prove that they have previously committed to a given prediction.

Salt Shaker (%F0%9F%A7%82):๐Ÿง‚

Cryptographic salt is random data which is fed into an cryptographic algorithm in order to make the output harder to decode by an attacker. When a reponder wishes to reveal the value concealed by a previously posted prediction commitment, they must provide the salt value used to create the commitment. The salt shaker emoji is used to mark this value in a URL query parameter.

Check Mark (%E2%9C%85):โœ…

A user may send their plain text prediction denoted by the green checkmark emoji. With this value and their salt value, their prediction can be checked against a previously posted prediction commitment. The value denoted by the checkmark must be one of the options of the survey in order to be valid.

Fountain Pen (%F0%9F%96%8B):๐Ÿ–‹๏ธ

When a user wishes to register their prediction with a third-party, they may cryptographically sign their prediction commitment so that the third-party is sure the prediction is coming from that individual. The signature may be included in the URL query payload by using the fountain pen emoji. The PORPOISE network requires the use of secp256r1 as it is this curve which is supported by all major web APIs. The signature should be base64url encoded and adhere to the ASN.1 standard.

Disguised Face (%F0%9F%A5%B8):๐Ÿฅธ

A user must claim a unique username in the PORPOISE network to anchor their identity and prediction history. A user's signing keys are uniquely linked to this username on the blockchain. Since URLs have a maximum length of (approximately) 2000 characters for some popular browsers, in order to save space, a user sends their unique username (denoted by the disguised face) which allows a third-party to look up the appropriate public key for signature verification. This emoji is only needed when sharing a signature in the URL.

Plunger (%F0%9F%AA%A0):๐Ÿช 

If the prediction commitment is signed using the Web Authentication API, then extra data is required to for a third-party to verify the signature besides just the prediction commitment itself. The plunger emoji is used to denote the base64url encoded authenticator data returned by the navigator.credentials.get method.

Toilet (%F0%9F%9A%BD):๐Ÿšฝ

If you have a plunger, you've probably got a commode that needs it. When signing data with the Web Athentication API, part of the payload signed by the passkey is the clientDataJSON object. This data must be sent as a base64url encoded string along with the authenticator data produced by calling navigator.credentials.get. If these two emojis are included in the URL parameter set, it is assumed that the signature was produced by a passkey via the Web Authentication API standard.

Toilet Paper (%F0%9F%A7%BB):๐Ÿงป

Another optional argument when using passkeys for signing prediction commitments is the credential.id returned by the WebAuthn API. Since network usernames (which are human-readable) are unique within the PORPOISE network, third-parties do not actually need the credential.id generated when creating a passkey, but it can be helpful sometimes. To include a passkey credential.id, use the toilet paper emoji along with the plunger and toilet emoji.

Key (%F0%9F%94%91):๐Ÿ”‘

If a user wishes to register their public key with a third-party, they may send it as a base64url encoded string denoted by the key emoji. This can be useful when building applications where end users use passkeys as their signing resource. Keys MUST be generated for ECDSA P256 for use in the PORPOISE Network in order to be compatible with browser-native cryptographic APIs.

An example of a valid PORPOISE-compatible survey URL for predicting the price action of Bitcoin might look like the following:

http://porpoise.network/take-survey.html?%F0%9F%90%AC=What-will-the-price-of-Bitcoin-on-January-1-2025-will-be&%F0%9F%97%B31=more-than-100000-dollars&%F0%9F%97%B32=less-than-100000-dollars&%E2%8F%B0=1716336000000&%F0%9F%94%AE=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

Note: In order for the URL to be clickable, the emojiโ€™s must be URL-encoded. The URL-encoded representation are given above.

Additionally, even though blank space are technically allowed in URLs, PORPOISE-compatible surveys MUST use dashes (-) instead of blank spaces to preclude issues associated with posting links with blank spaces. We choose to replace spaces with dashes in stead of the url-encoded (%20) so that survey links are more human readable. Lastly, PORPOISE-compatible links should also avoid using any RFC3986 reserved characters in any part of the survey.

Marking the different components with emojis not only provides striking visual queues for participants to quickly identify PORPOISE surveys on the web but also allows for algorithmic detection, parsing, and hashing of PORPOISE compatible surveys from anywhere on the web. Since emoji codes are supported by all major browsers and mobile operating systems, rendering the emojis should work for nearly all consumer application form factors.

Last updated