GithubHelp home page GithubHelp logo

sushiswap / sushiswap Goto Github PK

View Code? Open in Web Editor NEW
1.9K 65.0 1.5K 214.96 MB

Sushi 2.0 ๐Ÿฃ

License: MIT License

JavaScript 0.63% TypeScript 95.48% CSS 0.10% Solidity 3.77% Dockerfile 0.01%

sushiswap's Introduction

Sushi Monorepo

Sushi 2.0 ๐Ÿฃ

Getting Started

https://pnpm.io/installation

Install

pnpm install

Dev

pnpm exec turbo run dev --filter=evm

Vercel APIs

These need to be run from their own folder at the moment in development.

pnpm exec vercel dev

Build

pnpm run build

Single Repository

pnpm exec turbo run build --filter=api/app/package/protocol

Test

pnpm run test

Single Repository

pnpm exec turbo run test --filter=api/app/package/protocol

Clean

pnpm run clean

Single Repository

pnpm exec turbo run clean --filter=api/app/package/protocol

APIs

...

Creating a new API

git checkout -b feature/example-api

Apps

...

Creating a new app

git checkout -b feature/example-app

Config

...

Creating a new config

git checkout -b feature/example-config

Packages

...

Creating a new package

git checkout -b feature/example-package

Protocols

...

Creating a new protocol

git checkout -b feature/example-protocol

Subgraphs

...

Creating a new subgraph

git checkout -b feature/example-subgraph

Disclaimer

These smart contracts and code are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts and code. There can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information. In addition, using these smart contracts and code should be conducted in accordance with applicable law. Nothing in this repo should be construed as investment advice or legal advice for any particular facts or circumstances and is not meant to replace competent counsel. It is strongly advised for you to contact a reputable attorney in your jurisdiction for any questions or concerns with respect thereto. SushiSwap is not liable for any use of the foregoing and users should proceed with caution and use at their own risk.

Any stated APY (the 'Rate') is purely informational based on publicly available blockchain data, and is a forward-looking projection based on our good faith belief of how to reasonably project results over the relevant period, but such belief is subject to numerous assumptions, risks and uncertainties (including smart contract security risks and third-party actions) which could result in a materially different (lower or higher) token-denominated Rates. The Rate is not a promise, guarantee or undertaking on the part of any person or group of persons, but depends entirely on the results of operation of smart contracts and other autonomous systems (including third-party systems) and how third parties interact with those systems after the time of your deposit or other interactions. Even if the Rate is achieved as projected, you may still suffer a financial loss in fiat-denominated terms if the fiat-denominated value of the relevant tokens (your deposit and any tokens allocated or distributed to you pursuant to the Rate) declines during the deposit period.

sushiswap's People

Contributors

0xivan avatar 0xmasayoshi avatar chillichelli avatar drstevenbrule avatar dusknight4 avatar github-actions[bot] avatar grod220 avatar hhk-eth avatar inomurko avatar izayl avatar j-acks0n avatar jclancy93 avatar jiro-ono avatar lufycz avatar matthewlilley avatar okavango avatar olastenberg avatar pegahcarter avatar sarangparikh22 avatar sogipec avatar sushi-actions avatar ue avatar xiaolou86 avatar z0r0z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sushiswap's Issues

refactor(Wagmi): CurrencyInput and BalanceController

Once Wagmi has multicall support, refactor the BalanceController, useWalletBalance and the CurrencyInput. All these components are currently inside the Furo app but should be moved to the @sushiswap/wagmi package when multicall is available

SushiRoll.js: Error: No Uniswap Router on npx hardhat node start

Hey all, having trouble running hardhat tests and seeing conflicting things in the issues/PR

I couldn't run npx hardhat node with the dependency set to test per this PR

So I changed it back to Mocks and no longer get the 604 error on Mocks.js but now run into this:

Error HH604: Error running JSON-RPC server: ERROR processing /.../sushiswap-contracts/deploy/SushiRoll.js: Error: No Uniswap Router

Anyone have advice on resolving this?

Sushi <> PoolTogether integration

Prize Bounty

$2,500 USDC from Sushi.com
+ $2,500 USDC from PoolTogether

Challenge Description

Design an implementation of PoolTogether that implements the PoolTogether interface

Implementation should take Sushi as a deposit, wraps the Sushi as xSushi for the pool yield, and unwraps the original sushi amount on pool exit.

Submission Requirements

Code standards should align with PoolTogether's implementation quality and standards.

Judging Criteria

First valid submission received.

Winner Announcement Date

First to submit.

Issue in rewardDebt calculation in withdraw function

The rewardDebt is reduced to preserve the reward against the withdrawn LP amount for later harvest yet the rewardDebt amount is reduced with the amount taking reward into consideration from the start i.e. pool.accSushiPerShare and it does not take into account the rewardDebt for the LP amount being withdrawn.

I have created a PR, can please someone review and confirm if this is indeed an issue. #114

Incentives Program Implementation

Prize Bounty

3,500 USDC

Challenge Description

Implement a Solidity contract set that allows Sushi.com to issue an API key for vendors to swap using Sushi.com contracts. The contracts should assist in tracking volume that is coming from the vendor as to apportion rewards.

Submission Requirements

Implement a trust minimized platform that would allow Sushi.com to track volume driven to the pool from vendors.

Judging Criteria

First valid submission received.

Winner Announcement Date

First to submit.

mint infinity amount

It seems who ever holds the migrator address can possibly mint infinity amount of liquidity tokens during initial creation of given pairs.

npx hardhat node results in Error: No deployment found for: WETH9Mock

I forked the repository, installed dependencies using yarn, and I'm using Node v16.7.0.

When I run
npx hardhat node
I get the following error:

Error HH604: Error running JSON-RPC server: ERROR processing /home/user/workspace/sushiswap/deploy/UniswapV2Router02.js:
Error: No deployment found for: WETH9Mock

I've seen other people have had this issue, but it seems not solution was provided in those instances. Not sure how to proceed.

Token basket swaps

Prize Bounty

8,000 USDC

Challenge Description

Implement a set of contract that allows a user defined swap for one basket of tokens for another.

Swaps should be implemented as metatransactions using the Airswap v1 contracts as an example. Metatransactions should support any number of ERC20, ERC721, and ERC1155 tokens in the maker/taker basket.

Both sides of trade (maker and taker) will be defined within a metatransaction by the maker.

An example swap might look:

  • Maker
    • Cryptopunk tokenId 666
    • Cryptokitty tokenId 123
    • 20.51 USDC
      FOR
  • Taker
    • Hashmask tokenId 17
    • 0.5 ETH

That metatransaction is signed by the maker and delivered off chain to the taker to be redeemed by the taker.

Submission Requirements

  • Complete contracts that perform the function
  • Implementation of a mocha test case demonstrating the swaps
  • README.md giving an overview of your implementation

Judging Criteria

First valid submission received.

Winner Announcement Date

First to submit.

1inch did implement a migration from uniswap->mooniswap, you may use this code somewhere

please help to return my wmatic balance

Hello. I'm a sushiswap exchange user. I found a problem when I swap from matic to wmatic. the smart contract address shows the result is successful, but the balance in wmatic remains 0. please help to get my wmatic back. I attached a screenshot of the transaction.

Txhash : 0x509a93eaefc19ea120ddc333ca9b0d332cda568d146abafe9c14af15a5e43116

Wallet address : 0x0546c44F058d5D85AFEbaE2aC73B7F6A663C9a23

Matic to wmatic swap : 13 matic

Screenshot_2021-12-15-18-07-12-38_40deb401b9ffe8e1df2f1cc5ba480b12
Screenshot_2021-12-15-20-25-38-14_08800057d42e3b72e31ae4fd4c41ba57
Screenshot_2021-12-15-20-25-42-72_08800057d42e3b72e31ae4fd4c41ba57
Screenshot_2021-12-15-20-27-36-22_08800057d42e3b72e31ae4fd4c41ba57

No Top Up / Update Stream after completion

Screenshot_2022-06-08_20-53-11.png

Steps to reproduce:

Create a stream, wait for it to get completed.

Actual result:

Removes the stream update button, after completion.

Expected result:

The update stream button should stay after completion. Only when the stream is cancelled it should be removed.


Reported by: Sarang Parikh ([email protected])

Source URL: https://sushi.com/furo/stream/1001?chainId=137

Issue details: Open in Marker.io

Console: ๐Ÿ“ƒ 0 logs

BrowserChrome 97.0.4692.71
Screen Size1920 x 1080
OSLinux 5.11.0
Viewport Size1920 x 1011
Zoom Level100%
Pixel Ratio@โ€‹1x

TypeScript

Tests, configs, tasks etc... should be migrated to TypeScript.

~/sushiswap# npx hardhat node failed to start

Compilation finished successfully
Creating Typechain artifacts in directory types for target ethers-v5
Successfully generated Typechain artifacts!
Error HH604: Error running JSON-RPC server: ERROR processing skip func of /root/sushiswap/deploy/SushiMaker.js:
Error: Cannot find module '@uniswap/v2-core/build/IUniswapV2Pair.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/root/sushiswap/node_modules/@sushiswap/sdk/dist/sdk.cjs.development.js:18:38)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

For more info go to https://hardhat.org/HH604 or run Hardhat with --show-stack-traces

Error: No deployment found for: WETH9Mock

$ npx hardhat node
? Help us improve Hardhat with anonymous crash reports & basic usage data? (Y/n) โ€ฃ (node:879722) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
โœ– Help us improve Hardhat with anonymous crash reports & basic usage data? (Y/n) ยท true
Nothing to compile
Creating Typechain artifacts in directory types for target ethers-v5
Successfully generated Typechain artifacts!
deploying "UniswapV2Factory" (tx: 0x59e1bdf230a75035b662eb7ed727fb5c4cb9da81610ccb503f5df71a20600a0f)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 2508106 gas
Error HH604: Error running JSON-RPC server: ERROR processing /data/work/sushiswap/deploy/UniswapV2Router02.js:
Error: No deployment found for: WETH9Mock
    at Object.get (/data/work/sushiswap/node_modules/hardhat-deploy/src/DeploymentsManager.ts:127:17)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at runNextTicks (internal/process/task_queues.js:62:3)
    at listOnTimeout (internal/timers.js:523:9)
    at processTimers (internal/timers.js:497:7)
    at Object.module.exports [as func] (/data/work/sushiswap/deploy/UniswapV2Router02.js:13:20)
    at DeploymentsManager.executeDeployScripts (/data/work/sushiswap/node_modules/hardhat-deploy/src/DeploymentsManager.ts:989:22)
    at DeploymentsManager.runDeploy (/data/work/sushiswap/node_modules/hardhat-deploy/src/DeploymentsManager.ts:820:5)
    at Environment._runTaskDefinition (/data/work/sushiswap/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
    at Environment.run (/data/work/sushiswap/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)

For more info go to https://hardhat.org/HH604 or run Hardhat with --show-stack-traces

Hardhat/Ethers Question

It seems like you all recently made a big change in your tooling i.e., truffle to hardhat/ethers. Can you explain the context here? What motivated this change?

Harvest button on SushiSwap Yield - MATIC - does not work

I am using the ETH/USDT pool on Sushi Yield tab on MATIC. rewards show properly, but clicking the Harvest button does not seem to do anything. I tried 2 different RPC's but no luck. It seems that Meta Mask is not called and or does not generate the TX, leading me to believe its a api interaction issue.

Here is the console log when clicking the button:
image

Discussion around users with the issue on discord:
https://discord.com/channels/748031363935895552/749850975581241374/845719364028203060

Farms: Promised/Claimable Rewards > Total Available Rewards

The rewards accumulated by depositors can exceed the total amount of rewards available in the rewarder contract. This prevents the user from 1) withdrawing/obtaining their 'promised' rewards (and creates a scenario where everyone is required to rush to claim their rewards before the rewards in the pool run out), and 2) those who are unable to claim their accumulated rewards due to a lack of tokens in the rewarder contract are stuck in the pool and unable to withdraw, due to their need to "claim" upon withdrawing.

To fix this, pools should stop rewarding tokens at the block that the rewards will run out. That is - if there are 100,000 tokens in the depositor contract, and the daily distribution rate is 10,000 tokens/day, depositors should stop accumulating new rewards on day 10 (not when there are no tokens left in the rewarder contract).

Add automated CI

I could help on adding automated CI test, formatting and coverage reports.
Is that something the team is interested in?

About Harmony chef contract abi

It seems this contract is neither open-sourced or uploaded onto github.

Also it is different from the MiniChef contract used by Sushi on Matic.

Where can I find the abi?

Redundant Calculation

There are redundant calculation of amountIn.mul(997) in the function _swap of contract SushiMaker.sol, why not replace its calculation by the viariable amountInWithFee which stores the result of amountIn.mul(997).
Is there any special reason?

function _swap(
address fromToken,
address toToken,
uint256 amountIn,
address to
) internal returns (uint256 amountOut) {
// Checks
// X1 - X5: OK
IUniswapV2Pair pair =
IUniswapV2Pair(factory.getPair(fromToken, toToken));
require(address(pair) != address(0), "SushiMaker: Cannot convert");
// Interactions
// X1 - X5: OK
(uint256 reserve0, uint256 reserve1, ) = pair.getReserves();
uint256 amountInWithFee = amountIn.mul(997);
if (fromToken == pair.token0()) {
amountOut =
amountIn.mul(997).mul(reserve1) /
reserve0.mul(1000).add(amountInWithFee);
IERC20(fromToken).safeTransfer(address(pair), amountIn);
pair.swap(0, amountOut, to, new bytes(0));
// TODO: Add maximum slippage?
} else {
amountOut =
amountIn.mul(997).mul(reserve0) /
reserve1.mul(1000).add(amountInWithFee);
IERC20(fromToken).safeTransfer(address(pair), amountIn);
pair.swap(amountOut, 0, to, new bytes(0));
// TODO: Add maximum slippage?
}
}

ETHCC - Sushi Challenge

Prize Title

Sushi Challenge

Prize Bounty

Up to $3,000 USD (in Sushi)

Challenge Description

This open challenge asks for creative solutions that builds upon our latest product families.
The following paths are available.

  • build a dApp on BentoBox, our permissionless token vault
  • improvements on MISO (new type of auctions or token launch models)
  • UI/UX trading swap improvements for our main AMM product
  • Ideas integrating with Kashi Lending, expanding the functionality through advanced UI or build a product on top of it

Submission Requirements

A submission must have a public GitHub repository and the code should be published under a GPLv3 or comparable license. A short demo video should be posted.

The application must be (1) the original work of the individual participant or the participating team; (2) third-party technology used by the individual participant or the participating team must be subject to valid perpetual, irrevocable licenses.

By submitting an application, the individual participant and each member of a participating team, jointly and severally, represent and warrant that the application, and all components thereof, will not violate any rights of any person or entity, including without limitation, any copyright, trademark, patent or other intellectual property rights, or violate any applicable national, federal, state, or local laws, regulations, or policies, including those relating to export control.

Judging Criteria

  1. Completeness and complexity of the implementations
  2. Potential utility of a dApp
  3. Level of innovation

Deadline

Deadline for submissions is July 25 @ 2PM CET

Winner Announcement Date

July 25th 6PM CET

Resources

Is MasterChefV2 used for Yield Farming?

Is MasterChefV2 used for Yield Farming?

Does a Liquidity pool have to be created first, in order for a user to participate in Yield Farming?

Simply creating a Liquidity pool doesn't automatically activate Yield Farming? Meaning, MasterChefV2 has to be utilized too?

How to use all of that as a developer, in JS or Python? There're neither documentation, nor examples.

Multiple Ownable & ERC20, IMigratorChef duplicates

We have a situation where we're generating multiple types for multiple contracts with duplicate names, causing a collision. More recently more have been popping up, we should figure out a way to solve this.

Screenshot_38

Generalized interface for ERC721 wrapping and unwrapping

Prize Bounty

2,000 USDC

Challenge Description

Currently there exist the capability to wrap NFTs as ERC20s. Some examples are NFTX, WG0 (Wrapped Gen 0 Kitties), WK (Wrapped Cryptokitties). This bounty is for the definition of an ERC721, ERC1155 to ERC20 wrapping interface. Please review source material for common design patterns and submit an EIP. https://github.com/ethereum/EIPs

Submission Requirements

  • Draft EIP in the repository detailing the interface
  • Example implementation of the interface

Judging Criteria

First valid submission received.

Winner Announcement Date

First to submit.

why why why

Why the ETH was returned to the community, and the sushi buyback led to a fall in its price

Forking and Testing contracts on Ropsten

Hello,

I forked this project and tried to run the unit tests.
I got all kinds of different errors from (very few times no errors, to contract is to big and may not be able to be depoyed on main net, to to low gas messages) which I found very strange since I assumed at least the unit tests should run out of the box.

However I then decided so simply run yarn ropsten:deploy and test the contract manually (My plan is to use sushiswap-interface and see if everything works out). Fist I got an error message in BentoBox.js and noticed everything is commented out. So I uncommented the code and startet yrn ropsten:deploy again, But I am stuck at deploying for ages now.

I suspect I do something wrong but the documentation is not existing.
Is there maybe any Tutorials how to set up sushiswap/sushiswap amd sushiswap/sushiswap-interface on ropsten testnet for testing purposes? Actually I have no way to try things out.

cant unstake

{jsonrpc: "2.0", id: 3956211715384043,โ€ฆ}
error: {code: -32005, message: "exceeded project daily request limit",โ€ฆ}
id: 3956211715384043
jsonrpc: "2.0"

Potential reentrancy

It seems that functions like updatePool are vulnerable to reentrancy attack. If a malicious LPtoken is added, sushiswap may suffer from this.
Why do not use nonReentrant modifier to ensure functions like updatePool to be safe to reentrancy attack?

Please Update License from WTFPL to a Standard License

WTFPL is, unfortunately, not blessed by nearly any legal department and will greatly reduce the number of contributors to the project.

I'd suggest a dual license, MIT + Apache 2.0 license going forward. Happy to submit a PR if need be.

How does the Fee Function accept sushi and how can you make it accept something else?

Hey, I'm a developer trying to fork sushiswap and I'm trying to change the fee function to accept our own token rather than sushi.

The code I have is from UniswapV2Factory.sol

function setFeeTo(address _feeTo) external override {
        require(msg.sender == feeToSetter, 'UniswapV2: FORBIDDEN');
        feeTo = _feeTo;
    }

    function setMigrator(address _migrator) external override {
        require(msg.sender == feeToSetter, 'UniswapV2: FORBIDDEN');
        migrator = _migrator;
    }

    function setFeeToSetter(address _feeToSetter) external override {
        require(msg.sender == feeToSetter, 'UniswapV2: FORBIDDEN');
        feeToSetter = _feeToSetter;
    }

Where in the setFee function do I change the fee token?

Thank you in advance!

queuedTransaction is always false!

Hello
After successfully queueTransaction, i try to to executeTransaction but send back "Timelock::executeTransaction: Transaction hasn't been queued." error.
And i chech with transaction hex in queuedTransaction than it turns false too.

My queueTransaction setup

target : Correct Masterchef address
value: 0
signature: set(uint256,uint256,bool)
data: used web3.abi.encodeParameters -> (web3.eth.abi.encodeParameters(['uint256', 'uint256', 'bool'], ['0', '4736', false]);
)
and data result is =>
0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012800000000000000000000000000000000000000000000000000000000000000000
eta: Correct epoch time bigger than delay


What must i do for solve this problem?
I'm testing in Rinkeby testnet
Thanks

How is a LP created?

A liquidity pool is usually a pair, that is, 2 tokens, right? Then why is here there's only one:

https://github.com/sushiswap/sushiswap/blob/canary/test/MasterChef.test.ts

  context("With ERC/LP token added to the field", function () {
    beforeEach(async function () {
      this.lp = await this.ERC20Mock.deploy("LPToken", "LP", "10000000000") // only 1 token?
     //.......

Or does the 1st token get added into a newly liquidity pool implicitly? If so, what is that 1st token? SushiToken?

How does one create a liquidity pool? How to add liquidity to it? How to withdraw liquidity from and destroy it?

As a developer I mean -- in Javascript/Typescript.

It seems who ever holds the migrator address can possibly mint infinity amount of liquidity tokens during initial creation of given pairs.

  function mint(address to) external lock returns (uint liquidity) {
        (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
        uint balance0 = IERC20Uniswap(token0).balanceOf(address(this));
        uint balance1 = IERC20Uniswap(token1).balanceOf(address(this));
        uint amount0 = balance0.sub(_reserve0);
        uint amount1 = balance1.sub(_reserve1);

        bool feeOn = _mintFee(_reserve0, _reserve1);
        uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        if (_totalSupply == 0) {
            address migrator = IUniswapV2Factory(factory).migrator();
            if (msg.sender == migrator) {
                liquidity = IMigrator(migrator).desiredLiquidity();
                require(liquidity > 0 && liquidity != uint256(-1), "Bad desired liquidity");
            } else {
                require(migrator == address(0), "Must not have migrator");
                liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY);
                _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
            }
        } else {
            liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1);
        }
        require(liquidity > 0, 'UniswapV2: INSUFFICIENT_LIQUIDITY_MINTED');
        _mint(to, liquidity);

        _update(balance0, balance1, _reserve0, _reserve1);
        if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
        emit Mint(msg.sender, amount0, amount1);
    }

Let focus particular at this piece of code from above mint function.

if (msg.sender == migrator) {
                liquidity = IMigrator(migrator).desiredLiquidity();

It seems who ever holds the migrator address can possibly mint infinity amount of liquidity tokens during initial creation of given pairs and possibly withdraw all amount from the given pool, if it has pair tokens deposited.

Currently migrator address is set to address(0) but it can be reassign through factory contract.

I'm not sure what is the real reason for adding this piece of code.

Where is the real migrations code? The code pushed to github is incomplete...

Cannot deploy SushiSwap on truffle / ganache for testing purposes.

truffle migrate does not deploy anything, because there is nothing inside the 2_deploy_contracts.js to deploy

What is the correct deployment order? The migration scripts on the official github do not have any contract deployment within them, please publish the correct code, or let me know how I can set this up for testing.

100m Dash: SushiSwap / Uniswap Forking Opportunity

100m Dash: SushiSwap / Uniswap Forking OpportunityTitle: Submit Token Information
---------- Submit sUDT Token Information ----------
Type Script:
Code Hash:
Hash Type:
Args:
Information:
Full Name: 32 length max
Symbol: 8 length max / ASCII
Decimal: 8 (default)
Description:
Website:
Icon File: attachment (40 x 40)
Other Info:

---------- Submit NRC 721 Factory Information ----------
Information:
Deployment Tx Hash:
Contract Source Code:
Other Info:

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.