Skip to content

DA0-DA0/polytone

Repository files navigation

Polytone

Polytone is a protocol that gives every smart contract an account on every IBC-connected blockchain. Polytone has a CosmWasm implementation so CosmWasm chains can deploy Polytone Interchain Accounts and Queries today!

More detail information on Polytone can be found in the wiki:

Overview

Polytone is made of three modules: note, voice, and proxy.

image

The note says what to say, and the voice (via the sender’s proxy) says it.

image

Connecting Note & Voice

Different blockchains have different encodings and message types, in Polytone we call these “extensions”. For a note to connect to a voice, the voice must support all extensions the note does; The voice must be able to say everything the note can speak.

image

Once a note has connected to a voice, it is “paired”. Once paired, the note will only ever connect with that voice, even if the first channel to connect them closes. Pairing simplifies Polytone’s API, as message senders don’t need to specify the channel to send on.

image

More information on connections and using Polytone as a developer is available in the wiki.

Executing Messages

To execute messages, the messages are sent to the note, which relays them to its voice, which relays them to the sender’s proxy. If the sender has no proxy, a new one is created before relaying the messages.

image

If one of the executed messages fails, all of the messages are rolled back.

image

Executing queries has the same semantics as executing messages. If a single query fails, all queries are canceled.

Audit

Polytone has been audited by Oak Security.

Acknowledgements

Thanks to Shane, humanalgorithm, and the Stargaze team for encouraging this work and helping ideate on the idea of an outpost specific interchain accounts. Thanks to Belsy, Ethan Frey, and larry0x for the design feedback and great technical discussion in our CW-ICA Telegram chat. Thank you to Jake and Noah who helped in the design, ideation, and relaying for Polytone. Thank you to art3mix and benskey who worked on the implementation. And finally, thank you to the Juno Community DAO and Stargaze for funding this work!