1RG
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ## Ethereum assumes one single chain Ethereum = Layer 1 (L1) Ethereum has a virtual machine (EVM) which allows to run programms that run on the blockchain -> all nodes are running these programms and finding consensum and settling on the state for a contract -> this allows to run code permissionally ## Cosmos Eth scales vertically, Cosmos scales horizontally Cosmos is multiple chains at the same level examples of app chain: - osmosis: dex (decentralize exchange) - allows people to swop one toke for another - regen: build an eco credit marketlpace - tokenise proof of ecological benefit - althea: building a mesh network all blockchains in the Cosmos ecosystem are built using the same SDK which means they can talk to each other more easily e.g. you can take your regen tokens and take them yo osmosis and swop them for someone else (interoperability!) -- also increases liquidity for the tokens IBC is the protocol built by Cosmos for interoperability ### Cosmos Hub first blockchain in the ecosystem beneficiary of the initial ICO (2016-7) Atom tokens => $$ to [ICF](https://interchain.io/)(interchain foundation) ICF owns the trademark for Cosmos but the SDK is open source Core devs -> make core technical decisions 175 Validators -> machine that run code, presumably there's 1 or more humans behind each validator the number of validators can be changed using governance changing the code of the SDK isn't enough for the code to be run. The validators make the decision on which code is run -> this has to do with proof of stake ### Proof of Stake to add a new block: each validator gets to propose a new block and then they vote for which one is picked as the new block (67% of the voting power) 6 seconds per block voting power is your stake (your share of bonded tokens => Cosmo has total sypply of tokens, some % is liquid and the rest are bonded = they are accounted toward voting power) how do tokens get bonded: - when you buy atoms they are liquid. You can go and stake them with a validator **Incentives to be a validator**: - new atoms are minted from scratch for every block created - these atoms are divided between the validators based on the stakes - if human stakes tokens with one of the top 175 validators then they get proportional reward - fees are also distributed the anount of tokens produced when a new block is minted is inversely proportional to the % of staked tokens How does one become a top validator? ### Governance there's a repository of code. How does the code get to the validators? Decisions on the code are made by token holder vote: - proposal goes up on chain: next software release - qualitative - block height for the release - validators vote on accepting the release proposed - the majority of validators has to agree on the release i.e. what does a valid block look like proposal quorum: 40% simple majority (50%) voting power equivalent to your stake - text / signalling e.g. temperature check on changes to be proposed later for example in the code - param change e.g. change the size of the pool of validators that votes on minting a new block - software upgrade - community spend ### Voting - for a proposal to get voted on in needs to have a deposit of 64 atoms - deposit period is the 14 days yopu have to accumulate 64 atoms to move to vote period - voting period is also 14 days - quorum = 40% stake - simple majority of participating voting power for the prposal to pass (50%) - options for voting: yes, no, no with veto, abstain - if 1/3 of participating voting power votes no with VETO the proposal is rejected - validators' voting power includes the vote of all people that staked with them - you can ovverride your validator ### Udit's research question - What is the voting behaviour or whale accounts? How is it different from smaller accounts? - How many wallets have authorized another wallet to vote on their behalf using the Authz module? - Will need to query cosmos.authz.v1beta1.Query.Grants - Has Authz led to an increase in voting? - Udit suspects that validators were less likely to vote because they had to pull out their keys to sign and this is dangerous. Have voting behavior changed and is Authz being used - Udit: "hypothesis was people didnt particupate in governance because of security risk involved" did more people participate in governance after - This may have been part of v7 theta. - authz allows all sorts of authorizations, we are curious if it's being used for governance - does mintscan actually show authz votes - Are validator votes correlated? - Udit is curious about "validator profiles" - self delegated vs other delegated - Can we correlate voting behaviour among validators? Do smaller validators follow the votes of larger validators? - Can we detect whitelabeled validators through correlations in missed blocks and slashing? - What has been the effect of airdrops on voting? “number of votes cast” / “participating voting power” for all historical proposals could be an interesting statistic Are people autovoting? are votes coming in immediately after the proposal is made? Average time to vote # Data analysis notes Serena's count query ```sql= SELECT COUNT(DISTINCT block_height) AS count_distinct_block_h, -- 7459656 COUNT(block_height) AS count_block_h, -- 8105324 COUNT(1) AS count_rows -- 8105324 FROM `immaculate-355716.cosmohub_4.blocks`; -- rows == non null block heights > distinct block heights WITH n_rows AS ( SELECT block_height, COUNT(1) AS count_rows FROM `immaculate-355716.cosmohub_4.blocks` GROUP BY 1 HAVING COUNT(1) > 1 ORDER BY 2 DESC ) SELECT COUNT(DISTINCT block_height) AS count_duplicated_block_heights, MIN(count_rows) AS min_count_rows, APPROX_QUANTILES(count_rows, 100)[OFFSET(25)] AS p25_count_rows, APPROX_QUANTILES(count_rows, 100)[OFFSET(50)] AS p50_count_rows, AVG(count_rows) AS avg_count_rows, APPROX_QUANTILES(count_rows, 100)[OFFSET(75)] AS p75_count_rows, MAX(count_rows) AS max_count_rows FROM n_rows ORDER BY 1; WITH duplicated_blocks AS ( SELECT CAST(block_height AS INT64) AS block_height, COUNT(1) AS count_rows FROM `immaculate-355716.cosmohub_4.blocks` GROUP BY 1 HAVING COUNT(1) > 1 ) , duplicated_attributes AS ( SELECT ea.block_height, ea.event_index, ea.event_type, ea.attribute_key, ea.attribute_value, ea.attribute_index, COUNT(1) count_rows FROM `immaculate-355716.cosmohub_4.event_attributes` ea JOIN duplicated_blocks dp ON ea.block_height = dp.block_height GROUP BY 1, 2, 3, 4, 5, 6 ) SELECT block_height, MIN(count_rows) AS min_count_rows, MAX(count_rows) AS max_count_rows FROM duplicated_attributes GROUP BY 1; ``` We end up with a bunch of duplicated blocks / rows. As an example here's a specific tx id / block that has multiple event attributes ```sql SELECT block_height, chain_id, tx_id, event_index, event_type, attribute_key, attribute_value, attribute_index, count(1) as dupe_count from `immaculate-355716.cosmohub_4.event_attributes` WHERE block_height = 7622578 AND tx_id = '94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8 ``` | block_height| chain_id | tx_id | event_index | event_type | attribute_key | attribute_value | attribute_index | dupe_count | - | - | - | - | - | - | - | - | - | 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 6 | message | sender | cosmos1kklexkut8ezlvjqndn2z636s5aumj49535c7uy | 0 | 3 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 5 | transfer | sender | cosmos1kklexkut8ezlvjqndn2z636s5aumj49535c7uy | 1 | 2 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | offer_coin_amount | 1529037755 | 5 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | msg_index | 2061 | 2 | 3 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | swap_type_id | 1 | 3 | 2 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | demand_coin_denom | uatom | 7 | 2 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | offer_coin_fee_amount | 2293556 | 6 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 2 | transfer | amount | 12500uatom | 2 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 4 | message | action | swap_within_batch | 0 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 7 | message | module | liquidity | 0 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 5 | transfer | amount | 1531331311ibc/12DA42304EE1CE96071F712AA4D58186AD11C3165C0DCDA71E017A54F3935E66 | 2 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 0 | tx | acc_seq | cosmos1kklexkut8ezlvjqndn2z636s5aumj49535c7uy/5 | 0 | 2 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 1 | tx | signature | of3bVdArQyizaXAom6sS3xaJ7yCc8HRMHfcvnwVOaxgrf/634pZT8vo7t19pxcqj0N3TcK+BDtHgqpascpsl+g== | 0 | 2 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 2 | transfer | recipient | cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta | 0 | 2 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | batch_index | 2731 | 1 | 2 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | offer_coin_denom | ibc/12DA42304EE1CE96071F712AA4D58186AD11C3165C0DCDA71E017A54F3935E66 | 4 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 5 | transfer | recipient | cosmos1tx68a8k9yz54z06qfve9l2zxvgsz4ka3hr8962 | 0 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | order_price | 196.852401578737499221 | 8 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 3 | message | sender | cosmos1kklexkut8ezlvjqndn2z636s5aumj49535c7uy | 0 | 1 7622578| | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 2 | transfer | sender | cosmos1kklexkut8ezlvjqndn2z636s5aumj49535c7uy | 1 | 1 7622578 | | 94A6AA104B85E0D66459C8A3F8F51CDD00E102C32F665C60D3861C85698FE2F5 | 8 | swap_within_batch | pool_id | 8 | 0 | 1

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully