Skip to content

AnshuJalan/sizzler-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sizzler Network

Sizzler Network enables the automation of recurring smart contracts tasks on Tezos by delegating them to bonded entities called 'Sizzlers'. It aims to function as a self-sustaining system through effective incentivisation and reward mechanics using its utility token called Sizzle.

Motivation

  • Complex smart contract systems often require actions to be taken automatically when the storage reaches a certain state. For instance, a smart contract system representing decentralised derivatives would ideally need automated margin calls and closing of positions. However, this cannot be implicitly done on-chain due to the way smart contracts work on Tezos.
  • As a resolution, developers have to set up extensive dev-ops infrastructure to handle such tasks through external smart contract calls.
  • Sizzler Network aims to solve this problem by providing a system to which dev-ops tasks can be off-loaded and left to be handled by entities called ‘Sizzlers’. These Sizzlers are rewarded and optionally incentivised through tips, using the network's utility token ‘Sizzle’ (SZL).
  • Using Sizzler, developers could skip the tedious items that often lead to launch delays and tend to create a centralised point of failures, leading to untimely events and poor user experience if the infrastructure goes down.

To know more extensively about the system and its working, look into the elaborate techinical paper.

Sample Task Contracts

A task involves the calling of a specific entrypoint in a specific contract. This entrypoint has to be written in a certain way for it to be approved by Sizzler Network. It must include a call to the complete_task entrypoint in the TaskManager contract. This call can either be built into the core contracts of a platform, or a dedicated proxy contract can be set up (recommended). Examples for both methods are given below in Smartpy

In-build Call

@sp.entry_point
def liquidate_position(self, position_id):
  sp.set_type(position_id, sp.TNat)

  # Logic to liquidate the associated position
  # ....

  # Required call to the TaskManager contract
  c = sp.contract(
    sp.TAddress,
    self.data.task_manager_address,
    "complete_task"
  ).open_some()
  sp.transfer(sp.sender, sp.tez(0), c)

Proxied Call

@sp.entry_point
def liquidate_position_proxy(self, position_id):
  sp.set_type(position_id, sp.TNat)

  # Call to core contract
  c_core = sp.contract(
    sp.TNat,
    self.data.core_address,
    "liquidate_position",
  ).open_some()
  sp.transfer(position_id, sp.tez(0), c)

  # Required call to the TaskManager contract
  c_task_manager = sp.contract(
    sp.TAddress,
    self.data.task_manager_address,
    "complete_task"
  ).open_some()
  sp.transfer(sp.sender, sp.tez(0), c_task_manager)

Repo Structure

  • contracts: Smart Contracts running Sizzler Network - all written in SmartPy.
  • dapp: Front-end to interact with Sizzler Network.
  • deploy: Helper scripts to deploy Sizzler Network contracts.
  • indexer: Blockchain indexer for tasks and completion logs.

Relevent Links

Deployed Contracts

Task Breakdowns

  • On-paper Designing
  • Smart Contracts
  • Unit Testing of Contracts
  • Deployment System
  • UI design
  • Front end components
  • Indexing system
  • Connection of front end with the contracts
  • Technical paper write-up
  • Walkthrough video

Releases

No releases published

Packages

No packages published