Zen Protocol Documentation
WebsiteTelegramBlogForum
  • Zen Protocol Docs
  • Apps
    • Headless Full Node
      • Full Node NPM Package
      • Build from Source
      • CLI
      • API
        • Wallet
        • Contracts
        • General
        • Blockchain
        • AddressDB
      • Deploy
        • Systemd
        • Shell script
        • Docker
      • Technical Model
      • AddressDB
    • Wallet
      • Desktop Wallet
        • Installers
      • Web Wallet
        • Run Locally
      • Wallet User Guide
        • Connect a Wallet
          • Create a Wallet
          • Import a Wallet
          • Watch Mode
        • My Wallet
          • Navigation Bar
          • Portfolio
          • Receive
          • Send / Execute
          • Transaction History
        • Contracts
          • Active Contracts
          • Execute a Contract
            • Message Body Field
          • Extend a Contract
          • Activate a Contract
        • Voting
          • Common Goods Pool
            • Generating a Ballot ID
          • Governance
        • Signer
        • Settings
          • Account Settings
          • Node Connectivity
      • Deprecated Desktop Wallet
        • Executable Installers
        • Wallet Structure
          • Video Tutorials
    • Explorer
    • Zen.js
      • Payment Processing
    • Oracle
      • Oracle GUI
      • Oracle Service
      • Oracle's API
      • Deploy
        • Systemd
        • Docker
      • How the Oracle contract works
      • How to create an Attestation token
    • Dex
      • Dex User Guide
        • Traded Pairs
        • Search Pairs
        • Order Book
        • Operations
        • My Wallet
        • Settings
      • How DEX contract works
    • Fixed Payout
      • Fixed Payout Generator User Guide
        • Issue
        • Redeem
        • Cancel
        • Verify
        • Settings
      • How the FP Contract works
      • How are the asset named?
  • Smart Contracts
  • Contract Structure
  • Contract Cost
  • Contract Activation
  • Contract Examples
  • Smart Contracts SDK
  • Contracts Language ZF*
  • Named Token Tutorial
  • Consensus
  • Common Goods Pool
  • Block Validation
  • Transaction Validation
  • Serialization
  • Use Cases
    • Create Unsigned Transaction
    • Secure Sign Transaction
    • Cold Storage using Full Node
  • Troubleshooting
    • Responsible Disclosure
    • Bug Bounty
    • Known Bugs
  • For Miners
    • Pools
    • GPU Mining
    • GPU Bounties
  • Check Crowdsale Contribution
  • Alpha call option
Powered by GitBook
On this page
  • Zen Protocol Alpha Documentation
  • Youtube Tutorials
  • Using the Alpha

Alpha call option

Below is the original Alpha version with open codebase in links below.

PreviousCheck Crowdsale Contribution

Last updated 7 years ago

Zen Protocol Alpha Documentation

Links:

Youtube Tutorials

Mac OSX

  1. Install .

  2. Download and install .

  3. NOTE: when opening the app for the first time, right click the icon of the app and then click open. You will then receive a notification along the lines of "Zen can't be opened because it is from an unidentified developer." - click the "Open" button.

To run the miner:

  • cd /Applications/Zen.app/Contents/Resources/

  • mono zen.exe -m

Linux (Debian/Ubuntu)

  1. Install libsodium-dev sudo apt install libsodium-dev

  2. Install GTK sudo apt install gtk2.0

  3. Run sudo apt-get update

  4. Open shell and navigate to your extracted zen folder

  5. Run mono zen.exe

If you would like to run the wallet with an active miner do the following:

  • mono zen.exe -m

  • When your miner finds a block you will receive 1,000 kalapas (the smallest unit of the ZEN token). Check your Balance tab to find them.

Windows

Using the Alpha

  • The desktop wallet: a full node, that connects to the Zen testnet and allows you to send, receive and sign transactions, and activate smart contracts.

In the following, we use (Product/tab) to refer to the product and tab in which to perform the next action.

For example: (Wallet/Portfolio) - refers to the desktop wallet app in the 'Portfolio' tab (Web/Faucet) - refers to the alpha.zenprotocol.com website in the 'Faucet' page

Usage Instructions

  1. Get Some ZEN tokens

    • (Wallet/Wallet) Copy your address (you can click the copy button on the right hand side)

    • (Wallet) In the footer of the wallet check that your client has finished syncing and downloaded the tip of the block chain. It should say "Blockchain synced. Last block ##"

    • (Wallet/Portfolio) You should now have 50,000,000 kalapas (which is 0.5 ZEN) (If you don't see it yet - check in the footer if your client finished syncing blocks)

  2. Create a call option

    • (Web/Vanilla Call Option) Fill in the fields and click 'Create'

      • Name - give it any name you like

      • Numeraire - is currently hard coded to the ZEN token address

      • Oracle - Is hard coded to a the Zen oracle created for the alpha

      • Underlying - choose the stock ticker you want to issue call options for

      • Premium - is the amount of Kalapas (the smallest unit of ZEN) required to purchase one call option

      • Strike - is the price at which the buyer of a call option can exercise the option later (make the strike lower than the current price of the ticker in order to realize a profit)

      • Click 'Create'

    • (Web/Contract Details) Copy the contract code

    • (Wallet/Contract) Activate the contract

      • Paste the contract code in the in the "Code" field (You can use the "Paste" button) on the right

      • You can compare the Hash in the "Hash" field to the one in the browser to check you copied the code correctly

      • In the "Blocks" field - Choose for how many blocks you would like to activate your contract (50 blocks should be good)

      • Click the 'Active' button

    • Collateralize the call option - In order to allow people to purchased collateralized call options we must first collaterlize the contract.

      • (Web) Click on your newly created contract

      • (Web) Click on the 'Collateralize' button

      • (Web/Transaction Details) Copy the 'Address' field

      • (Wallet/Wallet) Click on the 'Send' button

      • (Wallet/Send) Paste your address in the address field

      • (Web/Transaction Details) Copy the 'Data' field

      • (Wallet/Send) Paste your data in the 'Data' field

      • (Wallet/Send) Amount to send: enter 100,000 - if your premium was 50 - then the contract will be able to issue 20,000 options

      • (Wallet/Send) Click the 'Sign & Review' button

      • (Web/Call Option Page) If you refresh the page of your contract you should now see "Buy" and "Exercise" buttons

    • Buy some call options

      • (Web/Call Option Page) Go to your call option page

      • (Web/Call Option Page) Click on the 'Buy' button

      • (Wallet/Wallet) Copy your address

      • (Web) Paste your address in the 'Send to wallet address' field and click 'Submit'

      • (Web/Transaction Details) Copy the 'Address' field

      • (Wallet/Wallet) Click on the 'Send' button

        • (Wallet/Send) Paste your address in the address field

        • (Web/Transaction Details) Copy the 'Data' field

        • (Wallet/Send) Paste your data in the data field

        • (Wallet/Send) Select asset - choose 'Zen'

        • (Wallet/Send) Amount to send - if the premium is 50 - then enter an amount devisable by 50 - the contract then will issue you option tokens representing your claim for the collateral in the contract in the case that the price of the ticker is above the strike price

        • (Wallet/Send) Click the 'Sign & Review' button

      • (Wallet/Portfolio) You should now see that you have the call option tokens in your portfolio

    • Exercise the option

      • (Web) Go to the call option page

      • (Web) Click the 'Exercise' button

      • (Wallet/Wallet) Copy your wallet address

      • (Web) Paste your address in the 'Return address' field and click 'Submit'

      • (Web/Transaction Details) Copy the 'Address' field

      • (Wallet/Wallet) Click on the 'Send' button

      • (Wallet/Send) Paste your address in the address field

      • (Web/Transaction Details) Copy the 'Data' field

      • (Wallet/Send) Paste your data in the data field

      • (Wallet/Send) Select asset - choose the call option token - since you are now sending it back to the contract in order to exercise it

      • (Wallet/Send) Amount to send - choose how many options you want to exercise

      • (Wallet/Send) Click the 'Sign & Review' button

      • (Wallet/Portfolio) You should now see you have less call option tokens

      • (Wallet/Balance) You should see a transaction for sending your call option tokens

      • (Wallet/Balance) Choose the 'Zen' token in the 'Asset' dropdown - you should see a new incoming transaction of your profit from exercising the option.

Install

Install

Download and extract

Download and install

The Alpha is a combination of using and the desktop wallet.

includes the following:

- for browsing existing contracts

for deploying your own contracts

- to get your hands on some Zen

- We have prepared for the use of the demo

() - paste your address and click submit

() - Click 'Create' on the Template

Choose from the tickers our is creating commitments to

() wait until you see that your new contract is active under the "Active Until" row - if it displays a number you are good. If it says "Inactive" try refreshing until it displays a number

Gihub Repo
Website
Blog
Telegram
Windows installation walkthrough
Using the Alpha tutorial
Chinese tutorial
TUI walkthrough
Mono for Mac
Zen.dmg
Mono for Linux
fsharp
zen.tar.gz
ZenInstaller.exe
alpha.zenprotocol.com
alpha.zenprotocol.com
Contract explorer
Contract templates
Faucet
An oracle
Web/Faucet
Web/Templates
Vanilla Call Option
oracle
Web/Explorer