This documentation is subject to update for newer updates please refer to Plausible FAQ
Plausible is W3C Compliant DIDs, Verifiable Credentials, OpenBadges, and smart utility NFTs protocol built on Algorand.
Plausible dApp is consisted of a frontend calling an Algorand ASC system in which ASCs use each other via inner transactions and C2C calls.
Plausible complies to ARC3 and ARC4 living standards on Algorand.
@emg110 and @sheghzo are grateful to Algorand Inc, Algorand Foundation, Algorand Ecosystem, AXL Ventures and AlgoFam!
Plausible features :
-
Geo constraint option (Geofencing using connecting ISP country and allow and ban lists ).
-
Authorization Signature constraint option (Author must sign the release before Plausible issuance for claimed claimers).
-
Shared Secret constraint option (Claimer must scan a QRCode during calling the Plausible Item ASC with it in order to claim successfully).
-
Dynamic NFTs per Plausible item (Plausible is 100% token-less and NFTs are generated and owned by Plausible item contract and that belongs to Plausible item's author).
Plausible is consisted of a frontend and smart contracts on Algorand chain:
- Frontend
- Smart Contracts
Plausible frontend has 3 major functions (all in a single view for simplicity):
- Wallet Session
- Author UI
- Claim UI
Note: Frontend will be available through both cloudflare (heavily distributed on edge) and IPFS to ensure decentralization (with transparent routing for best UX).
flowchart LR
subgraph Plausible
direction TB
subgraph Frontend
direction RL
Author_UI
Claim_UI
end
subgraph ASC
direction TB
Parent_ASC
Item_ASC
end
end
Author --> Plausible
Claimer --> Plausible
Frontend --> ASC
1- Author easily gets onboard by opting into Plausible's parent ASC.
2- Then can create a new Plausible venue.
3- Then activate the venue to let claims begin (This differs than start time option of Plausible).
Note : If SIG is not enabled for Plausible Venue, Claim approval will send Plausible NFT or TXN to Claimer's wallet but if SIG is enabled then after signing of Author, Plausible NFT or TXN will be sent automatically to Claimer's wallet, after author signs and sends a release method call transaction to release all successfully claimed Plausible Claimer.
Options available for Plausible creation:
- Time (default enabled): Start time check (compared to LatestTimestamp)
- Geo: Country allow and ban lists.
- Signature: Author's signature is needed to make Plausible claimable for every Claimer, individually. Each and every Claimer can receive their single claimed Plausible (in NFT or TXN depending on Plausible config) only after Author's authorization via a successful method call (which obviously should happen after both venue activation and venue start time).
- QRCode: Upon activation a secret key will be generated and included in a transaction as a method input parameter and this TXN is then communicated by a QRCode in venue location and Claimer scans this QRCode during physical presence and claims (other arguments will be added to this raw transaction object after scan and when claiming).
Note: QRCode feature is still under heavy re-ideation, re-design and re-everything! So please, kindly consider it WIP and FUTURE release functionality!
sequenceDiagram
actor Author
participant Plausible
participant Plausible_ASC
participant Plausible_Item_ASC
Author ->> Plausible: Connect wallet
Author ->> Plausible: Sign Optin Call
Plausible ->> Plausible_ASC: Optin Call
Plausible_ASC -->> Plausible: Return
Note left of Plausible: Onboarding
Author ->> Plausible: Sign `create_plaus` Method TXN
Plausible ->> Plausible_ASC: `create_plaus` Method Call
Plausible_ASC -->> Plausible: Return
Note left of Plausible_ASC: Create Plausible Venue
Author ->> Plausible: Sign `activate_plaus` Method TXN
Plausible ->> Plausible_Item_ASC: `activate_plaus` Method Call (creates NFT as well)
Plausible_Item_ASC -->> Plausible: Return
Note right of Plausible_ASC: Activate Plausible Venue
Author ->> Plausible: Sign `sig_plaus` Method TXN
Plausible ->> Plausible_ASC: `sig_plaus` Method Call
Plausible_ASC -->> Plausible: Return
Note right of Plausible_ASC: Release SIG Plausible
Note right of Plausible_ASC: Only when SIG option is enabled on Plausible
1- Claimer simply gets onboard by opting into parent ASC.
2- Then get a searchable list of Plausible venues and applys to one by opting into it.
3- Then after general venue activation (by author) and by satisfying what Plausible venue options require, claim the Plausible and get Plausible NFT if approved.
Note : If SIG is not enabled for Plausible Venue, Claim approval will send Plausible NFT to Claimer's wallet but if SIG is enabled then after signing of Author, it'l be sent automatically to Claimer's wallet.
sequenceDiagram
actor Claimer
participant Plausible
participant Plausible_ASC
participant Plausible_Item_ASC
Claimer ->> Plausible: Connect wallet
Claimer ->> Plausible: Sign Optin Call
Plausible ->> Plausible_ASC: Optin Call
Plausible_ASC -->> Plausible: Return
Note left of Plausible: Onboarding
Claimer ->> Plausible: Sign `apply_plaus` Method TXN
Plausible ->> Plausible_Item_ASC: `apply_plaus` Method Call
Plausible_Item_ASC -->> Plausible: Return
Note right of Plausible_ASC: Apply for Plausible Venue
Claimer ->> Plausible: Sign `claim_plaus` Method TXN
Plausible ->> Plausible_Item_ASC: `claim_plaus` Method Call ( plus optin TXN to Plausible NFT, if required)
Note right of Plausible_ASC: Claim Plausible
Note right of Plausible_ASC: Needs providing required options if configured (Geo, Time, QR)
Plausible_Item_ASC -->> Claimer: Send NFT
Note right of Plausible_ASC: Requires existence of signed release by author in global state
Plausible_Item_ASC -->> Plausible: Return
Plausible ASC System is designed on basis of newest TEAL features came with TEAL v 8.0 on AVM8. Plausible Parent contract is created and thereafter every Plausible item is created by this parent contract based on configurations needed.
All methods expenses and fee details are in following table (those not in this table have just normal 1 MinFee):
Note: This section (Fees) is subject to further updates and changes and is work in progress!
Method | Fee | Amount |
---|---|---|
New Plausible | 1 MinFee | 2 MinFee |
Setup Plausible | 1 MinFee | 1 MinFee |
Activate Plausible(Author pays) | 3 MinFee | Claimer_Qty * 4 * MinFee |
Activate Plausible(Claimer pays) | 3 MinFee | 1 MinFee |
Release Plausible | 1 MinFee | 1 MinFee |
Claim Plausible(Author pays) | 1 MinFee | 0 |
Claim Plausible(Claimer pays) | 4 MinFee | 0 |
graph TD;
Plausible_Service== manages ==>Parent_Plausible_ASC;
Parent_Plausible_ASC== manages ==>Plausible_item_ASC;
Plausible_Claimer== interacts ==>Plausible_item_ASC;
Plausible_Author== interacts ==>Parent_Plausible_ASC;
Plausible_Author== interacts ==>Plausible_item_ASC;
stateDiagram-v2
[*] --> Plausible_Service
Plausible_Service --> Parent_Plausible_ASC
Parent_Plausible_ASC --> Plausible_item_ASC
Plausible_item_ASC --> close
Parent_Plausible_ASC --> eol
close --> archive
eol --> archive
archive --> [*]
Note: The NoOp calls without args will be rejected with error. This is being examined as a security practice
flowchart TB
id1([Author]) --uses--> parentMethodCalls
id1([Author]) --uses--> parentAppCalls
id1([Author]) --uses--> itemMethodCalls
id2([Claimer]) --uses--> parentAppCalls
id2([Claimer]) --uses--> itemMethodCalls
subgraph Plausible
subgraph parentASC
subgraph parentAppCalls
id3([create])
id4([update])
id5([delete])
id6([optin])
id7([closeout])
end
subgraph parentMethodCalls
id61([setup])
id8([item_create])
id9([item_update])
id10([item_delete])
end
end
subgraph itemASC
subgraph itemAppCalls
id12([optin])
id13([create])
id14([update])
id15([delete])
id17([closeout])
end
subgraph itemMethodCalls
id18([setup])
id18([activate])
id19([claim])
id20([release])
end
end
end
Note 1: Data fields are global states of Plausible parent smart contract.
Note 2: Fee collection is not included anywhere at this phase of Plausible MVP development but certainly is a priority prior to public TESTNET deployment. It happens on parent smart contract.
classDiagram
class Plausible_ASC
Plausible_ASC : +Uint64 plaus_onboard_count
Plausible_ASC : +Uint64 plaus_count
Plausible_ASC : +Byte plaus_last_appid
Plausible_ASC : +Byte plaus_last_author
Plausible_ASC : +setup(string)string
Plausible_ASC : +item_create(pay,byte[],byte[])string
Plausible_ASC : +item_update(application,byte[],byte[])string
Plausible_ASC : +item_delete(application)void
Note 3: Author user has all metrics in localState of Plausible Item smart contract and all Authored Plausibles (upt to 16 item) in localState of Plausible smart contract (parent)
{
"name":"plausible-contract",
"desc": "Plausible Parent smart contract",
"networks":{
"MainNet":{
"appID": 0
},
"TestNet":{
"appID": 0
}
},
"methods":[
{
"name": "setup",
"args": [
{
"type": "string",
"name": "version"
}
],
"returns": {
"type": "string"
},
"desc": "Sets up the Plausible main contract, sets and logs the version and returns"
},
{
"name": "item_create",
"args": [
{
"type": "pay",
"name": "pay"
},
{
"type": "byte[]",
"name": "asc_approval_bytes"
},
{
"type": "byte[]",
"name": "asc_clear_bytes"
}
],
"returns": {
"type": "string"
},
"desc": "Creates a new Plausible item smart contract and returns the app id"
},
{
"name": "item_update",
"args": [
{
"type": "application",
"name": "application"
},
{
"type": "byte[]",
"name": "asc_approval_bytes"
},
{
"type": "byte[]",
"name": "asc_clear_bytes"
}
],
"returns": {
"type": "string"
},
"desc": "Updates an Plausible item smart contract and returns item application ID"
},
{
"name": "item_delete",
"args": [
{
"type": "application",
"name": "application"
}
],
"returns": {
"type": "void"
},
"desc": "Deletes an Plausible item smart contract and returns void (approve only)"
}
]
}
Note 1: Data fields are global states of Plausible item smart contract.
classDiagram
class Plausible_ASC_ITEM
Plausible_ASC_ITEM : +Uint64 plaus_item_onboard_count
Plausible_ASC_ITEM : +Uint64 plaus_item_txn_count
Plausible_ASC_ITEM : +Uint64 plaus_item_claim_count
Plausible_ASC_ITEM : +Uint64 plaus_start_timestamp
Plausible_ASC_ITEM : +Uint64 plaus_end_timestamp
Plausible_ASC_ITEM : +Byte plaus_name
Plausible_ASC_ITEM : +Byte plaus_logo
Plausible_ASC_ITEM : +Byte plaus_timezone
Plausible_ASC_ITEM : +Byte plaus_desc
Plausible_ASC_ITEM : +Byte plaus_address
Plausible_ASC_ITEM : +Byte plaus_url
Plausible_ASC_ITEM : +Byte plaus_web2
Plausible_ASC_ITEM : +Byte plaus_nft_media
Plausible_ASC_ITEM : +Byte plaus_has_geo
Plausible_ASC_ITEM : +Byte plaus_has_release
Plausible_ASC_ITEM : +Byte plaus_has_shared_secret
Plausible_ASC_ITEM : +Byte plaus_claimer_qty
Plausible_ASC_ITEM : +Byte author_pays_fee
Plausible_ASC_ITEM : +Byte plaus_qr_secret
Plausible_ASC_ITEM : +Byte plaus_hash
Plausible_ASC_ITEM : +Uint64 plaus_parent_id
Plausible_ASC_ITEM : +Byte plaus_parent_address
Plausible_ASC_ITEM : +Byte plaus_author_address
Plausible_ASC_ITEM : +Uint64 plaus_asa_id
Plausible_ASC_ITEM : +Uint64 plaus_setup_time
Plausible_ASC_ITEM : +Uint64 plaus_activate_time
Plausible_ASC_ITEM : +Uint64 plaus_release_time
Plausible_ASC_ITEM : +Byte plaus_is_activated
Plausible_ASC_ITEM : +Byte plaus_is_setup
Plausible_ASC_ITEM : +Byte plaus_is_released
Plausible_ASC_ITEM : +setup(pay,account,application,string,string,string,string,string,string,string,string,(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64))string
Plausible_ASC_ITEM : +re_setup(pay,account,application,asset,string,string,string,string,string,string,string,(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64))string
Plausible_ASC_ITEM : +activate(pay,axfer,application,asset)string
Plausible_ASC_ITEM : +claim(asset,application,pay,axfer,string,(uint64,uint64,uint64,uint64,uint64))string
Plausible_ASC_ITEM : +release(application)string
Plausible_ASC_ITEM : +get_metric(string)string
Plausible_ASC_ITEM : +get_metrics()string
{
"name": "plausible-item-contract",
"desc": "Plausible Item smart contract",
"networks": {
"MainNet": {
"appID": 0
},
"TestNet": {
"appID": 109691598
}
},
"methods": [
{
"name": "setup",
"args": [
{
"type": "pay",
"name": "pay_min_fee"
},
{
"type": "account",
"name": "author_account"
},
{
"type": "application",
"name": "parent_application"
},
{
"type": "string",
"name": "reserved"
},
{
"type": "string",
"name": "plaus_name"
},
{
"type": "string",
"name": "plaus_logo"
},
{
"type": "string",
"name": "plaus_desc"
},
{
"type": "string",
"name": "plaus_timezone"
},
{
"type": "string",
"name": "plaus_address"
},
{
"type": "string",
"name": "plaus_url"
},
{
"type": "string",
"name": "plaus_web2"
},
{
"type": "(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)",
"name": "plaus_uint64_tuple"
}
],
"returns": {
"type": "string"
},
"desc": "Sets up an Plausible smart contract item for the first time"
},
{
"name": "activate",
"args": [
{
"type": "pay",
"name": "pay_min_fees"
},
{
"type": "axfer",
"name": "optin_plaus_nft"
},
{
"type": "application",
"name": "parent_application"
},
{
"type": "asset",
"name": "nft_asa"
}
],
"returns": {
"type": "string"
},
"desc": "Activates an Plausible item smart contract and returns string"
},
{
"name": "claim",
"args": [
{
"type": "pay",
"name": "pay_min_fee"
},
{
"type": "asset",
"name": "nft_asset"
},
{
"type": "application",
"name": "parent_application"
},
{
"type": "account",
"name": "claimer_account"
},
{
"type": "string",
"name": "qr_secret"
},
{
"type": "(uint64,uint64,uint64,uint64,uint64)",
"name": "claim_uint64_tuple"
}
],
"returns": {
"type": "string"
},
"desc": "Claims an Plausible for a claimer and returns NFT sending inner-transaction hash"
},
{
"name": "release",
"args": [
{
"type": "application",
"name": "parent_contract"
}
],
"returns": {
"type": "string"
},
"desc": "Releases Plausible and allows all Plausible claimer's to start claiming"
}
]
}
Since Plausible is totally decentralized, trustless and permission-less: Every Plausible item author has full authority of the created PLAUS items (Plausible-DAO is coming with dao, voting and governance features in near future, after startup formation. Preferably I will use integration to an already working service with ABI)!
The plaus_contract.json contains the ABI Schema for parent Plausible contract and plaus_item_contract.json is the full ABI Schema of Plausible item contract which will be created via an inner transaction.
Note: These are available under Plausible's Smart Contracts Repository and more unit test scenarios are to be added for audit process.
> plausible-smartcontracts@0.0.4 start
[PLAUSIBLE: ] [2022-08-30T16:26:36.462Z] [info]: ------------------------------
[PLAUSIBLE: ] [2022-08-30T16:26:36.463Z] [info]: Plausible Item Contract ABI Exec method = ABIMethod {
name: 'item_update',
description: 'Updates an Plausible item smart contract and returns item application ID',
args: [Array],
returns: [Object]
}
[PLAUSIBLE: ] [2022-08-30T16:26:42.933Z] [info]: Plausible Main Contract ABI Exec method result = 107325601
[PLAUSIBLE: ] [2022-08-30T16:26:43.294Z] [info]: ------------------------------
[PLAUSIBLE: ] [2022-08-30T16:26:43.295Z] [info]: Plausible Item Contract ABI Exec method = ABIMethod {
name: 're_setup',
description: 'Sets up an Plausible smart contract item after first setup',
args: [Array],
returns: [Object]
}
[PLAUSIBLE: ] [2022-08-30T16:26:51.351Z] [info]: Plausible Main Contract ABI Exec method result = 107325874
[PLAUSIBLE: ] [2022-08-30T16:26:51.786Z] [info]: ------------------------------
[PLAUSIBLE: ] [2022-08-30T16:26:51.786Z] [info]: Plausible Item Contract ABI Exec method = ABIMethod {
name: 'activate',
description: 'Activates an Plausible item smart contract and returns string',
args: [Array],
returns: [Object]
}
[PLAUSIBLE: ] [2022-08-30T16:26:59.712Z] [info]: Plausible Main Contract ABI Exec method result = plaus_item_activate
[PLAUSIBLE: ] [2022-08-30T16:27:00.134Z] [info]: ------------------------------
[PLAUSIBLE: ] [2022-08-30T16:27:00.134Z] [info]: Plausible Item Contract ABI Exec method = ABIMethod {
name: 'release',
description: "Releases Plausible and allows all Plausible claimers to start claiming",
args: [Array],
returns: [Object]
}
[PLAUSIBLE: ] [2022-08-30T16:27:07.941Z] [info]: Plausible Main Contract ABI Exec method result = plaus_item_released
[PLAUSIBLE: ] [2022-08-30T16:27:08.290Z] [info]: ------------------------------
[PLAUSIBLE: ] [2022-08-30T16:27:08.291Z] [info]: Plausible Item Contract ABI Exec method = ABIMethod {
name: 'claim',
description: 'Claims an Plausible for a claimer and returns NFT sending inner-transaction hash',
args: [Array],
returns: [Object]
}
[PLAUSIBLE: ] [2022-08-30T16:27:16.355Z] [info]: Plausible Main Contract ABI Exec method result = plaus_item_claimed