Code Monkey home page Code Monkey logo

swapr-expeditions-services's Introduction

Swapr Expedition Services

Provides a set of APIs for Swapr.eth dapp.

Deploy

Dockerize the app by running

npm run dockerize

or

sh ./docker/build.sh

Create .env file

MONGO_URI=mongodb://swapr:swapr@localhost

Now run the image swapr-expeditions-services

docker run -d \
-p 3000:3000 \
--env-file ./.env \
swapr-expeditions-services

Docs

http:{baseUrl}/documentation

swapr-expeditions-services's People

Contributors

0xvance avatar adamazad avatar dependabot[bot] avatar

Watchers

 avatar

swapr-expeditions-services's Issues

Weekly rewards: add liquidity

Weekly
Users should be prompted to provide new liquidity, worth at least 50 USD to claim during 5 different weeks. Eligible for 50 fragments, with an additional 50 fragments for each week completed, for a max of 750 throughout the 5-week campaign. Missing a week does not reset the user back to 50, but instead doesn’t increase their next claim.

  • Each $1 = 1 fragment.
  • Maximum fragments = 750.
  • Week starts on Monday at 00:00 AM UTC.
  • Week ends on Sunday at 11:59 PM UTC.
  • Past completed week adds 50 fragments to the total fragments.

Add `POST /expeditions/weekly-fragments/claim`

AC

  • POST /expeditions/weekly-fragments/claim accepts: address, signature, and type. type is an enum.
  • Add getWeeklyFragments to WeeklyFragmentService: a wrapper on top of the two main methods to get fragments.
  • Improve messages that should be signed by EOA.

Weekly rewards: staking

Weekly

Stake their LP in a reward campaign, users should have staked at least $50 of LP tokens in a DIY farming campaign (maybe one of DXdao deployed campaigns only?). Eligible for 50 fragments, with an additional 50 fragments for each week completed, for a max of 750 throughout the 5-week campaign. Missing a week does not reset the user back to 50, but instead doesn’t increase their next claim.

  • Each $1 = 1 fragment.
  • Maximum fragments = 750.
  • Week starts on Monday at 00:00 AM UTC.
  • Week ends on Sunday at 11:59 PM UTC.
  • Past completed week adds 50 fragments to the total fragments.

Currently proposed query:

import { gql } from '@apollo/client';

export const GetLiquidityMiningCampaignDepositsQuery = gql`
  query GetLiquidityMiningCampaignDeposits($user: Bytes!, $timestampStart: BigInt!, $timestampEnd: BigInt!) {
    liquidityMiningCampaignDeposits: deposits(
      where: { user: $user, timestamp_gte: $timestampStart, timestamp_lte: $timestampEnd }
    ) {
      id
      amount
      timestamp
      liquidityMiningCampaign {
        id
        stakablePair {
          id
          reserveUSD
          token0 {
            id
            symbol
          }
          token1 {
            id
            symbol
          }
        }
      }
    }
    singleSidedStakingCampaignDeposits(
      where: { user: $user, timestamp_gte: $timestampStart, timestamp_lte: $timestampEnd }
    ) {
      id
      amount
      timestamp
      singleSidedStakingCampaign {
        stakeToken {
          id
          symbol
        }
      }
    }
  }
`;

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.