Giter Club home page Giter Club logo

teddyswap-yeild-contracts's Introduction

teddyswap lp tokens staking contracts

contracts interactions

flowchart TD 
    subgraph legend
        bot_legend[(pub key\nbot)]
        user_legend((pub key\nuser))
        validator
        policy{{policy}}
    end
Loading
flowchart TD

    botWallet
    bot[(bot)]
    yeildReserveOwnerOracle
    validRewardNFT{{validRewardNFT}}
    tedyYeildReserve
    liquidityStakingContract
    user((user))


    bot -. pkh param .-> validRewardNFT
    validRewardNFT -- proofs utxos are valid --> tedyYeildReserve
    validRewardNFT  -.hash param.-> liquidityStakingContract

    yeildReserveOwnerOracle -. owner ref .-> tedyYeildReserve
    
    botWallet --> bot --creates utxos-->  tedyYeildReserve
    
    tedyYeildReserve  == sends rewards ==> liquidityStakingContract

    tedyYeildReserve -.hash param.-> botWallet
    liquidityStakingContract == mints on first deposit ==> liquidityStakingContract
    liquidityStakingContract  == sends rewards ==> user
    liquidityStakingContract  == sends back rest ==> tedyYeildReserve
    liquidityStakingContract -. snapshots .-> bot

    user == deposits / mints ==> liquidityStakingContract
    user == harvests ==> liquidityStakingContract
Loading

Local testing procedure

Prerequisites

on your local environment you should have a private testnet running with a project structure similar to the one you can find in the woofpool/cardano-private-testnet-setup repository

then in this directory you need to create an .env file specifying a PRIVATE_TESTNET_PATH environment variable specifiyng the path to the private-testnet folder as follows.

PRIVATE_TESTNET_PATH="path/to/cardano-private-testnet-setup/private-testnet"

run the setup script if in private tesnet

npm run yeild:setup

compiling the contracts

npm run yeild:compile

initialize the yeildReserveOwner oracle contract

npm run yeild:initOwnerOracle

mint some fakeTEDYs

npm run yeild:mintFakeTedy (epoch_index) [mint_amount]

create a stake account

npm run yeild:firstStake

teddyswap-yeild-contracts's People

Contributors

michele-nuzzi avatar

Stargazers

 avatar Clark Alesna avatar

Watchers

Clark Alesna avatar

Forkers

wdm33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.