Giter Site home page Giter Site logo

core's Introduction

Rare Protocol Core Smart Contract

Deploy

RareStakingDeploy

Follow script/staking/RareStakingDeploy.sol script to deploy and get the address for stakingRegistry which will be used when deploying SuperRareBazaar.

forge script script/staking/RareStakingDeploy.s.sol:RareStakingDeploy --broadcast --rpc-url https://goerli.infura.io/v3/02a2a786a118479dbadfd39431aca051

.env

RARE_ADDRESS=SuperRareGovToken.sol

WETH_RARE_POOL_ADDRESS we have to create a uniswap v3 pool. RARE - WETH and use the UniswapV3Pool address here.

SuperRareBazaar

Follow script/NetworkDeploy.sol to deploy the SuperRareBazaar.sol marketplace.

Contracts

Staking

Staking Registry

The RareStakingRegistry serves as a registry where staking contracts (see Rarity Pools), reward swapping contracts, and configuration settings related to staking can be managed and accessed.

Rarity Pool

The RarityPool provides functions for initializing the contract, adding rewards, taking snapshots, staking, unstaking, and claiming rewards. It also includes various read functions to query information about stakers, rounds, rewards, historical rewards, calculations, and more.

The RarityPool is where users can stake tokens, earn rewards, and claim them based on their stake during the round.

Reward Accumulator

The contract provides functions for initializing the contract, accumulates rewards and performs a reward swap, and estimates the discounted price of RARE for a given token. The reward swap function allows users to specify the token they want to receive, the minimum amount they are willing to accept, and the amount of RARE they want to trade. The contract also includes a read function to estimate the discounted price of RARE for a specific token.

Overall, the contract serves as an interface for a sending rewards and reward swapping where users can trade their RARE tokens for other ERC20 tokens and ether at a discounted price.

Bazaar

The Bazaar is the interface to Rare Protocol's market mechanisms which include: offers, general and direct sale prices/purchases, Coldie Auctions (aka Reserve auctions), and scheduled auctions.

Building

Require Dependencies

Be sure to run forge install when first cloning the repo.

make build

Tests

forge test

core's People

Contributors

charlescrain avatar rymcol avatar y0unghe 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.