Git Product home page Git Product logo

across-token's Introduction

Across Distributor

The Across token distributor facilitates the ACX liquidity mining program that will accompany the launch of the protocol. It is heavily inspired by the Synthetix StakingRewards.sol contract, with a number of modifications. The contract will be owned by the Across DAO multisig which will govern parameters such as the whitelisting of new tokens to stake and the configuration thereof.

The core logic of the contract enables stakers to lock up enabled LP tokens to earn rewards. At deposit time depositors earn a fixed base emission rate. The longer they remain staked the higher the reward rate they earn by a reward multiplier (similar to an Ampleforth Geyser). The reward multiplier is capped to some max multiplier, set by the owner of the distributor. Sequential deposits result in an average deposit time as a weighted average of previous deposits. If at any point the depositor claims their rewards their multiplier is reset. Unstaking LP tokens does not reset their multiplier or change their average deposit time, unless all LP tokens are unstaked in which case the multiplier is reset to 0.

The contract is designed to hold multiple LP tokens with independent parameterization for each liquidity mining. This is done to enable the depositor to take advantage of multicall when depositing, claiming rewards and unstaking (i.e you can stake multiple tokens at once).

Build

yarn
yarn hardhat compile

Test

yarn test # Run unit tests without gas analysis
yarn test:gas-analytics # Run only tests that count gas costs
yarn test:report-gas # Run unit tests with hardhat-gas-reporter enabled

Lint

yarn lint
yarn lint-fix

Deploy and Verify

NODE_URL_5=https://goerli.infura.com/xxx yarn hardhat deploy --network goerli
ETHERSCAN_API_KEY=XXX yarn hardhat etherscan-verify --network goerli --license AGPL-3.0 --force-license --solc-input

Across Token

Addresses

across-token's People

Contributors

chrismaree avatar nicholaspai avatar dependabot[bot] avatar james-a-morris avatar mrice32 avatar kevinuma avatar

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.