Pool funds to bootstrap a Uniswap pair

Overview

Seed liquidity

A contract to pool funds which are then used to boostrap a new Uniswap liquidity pair.

Specification

  1. A new SeedLiquidity contract is deployed for non-existent or non-liquid Uniswap pair. The initial price is specified using target amounts.
  2. Users deposit tokens into the contract until both targets are reached.
  3. A user calls provide to supply liquidity to Uniswap.
  4. Users can claim their pro-rata share of the LP received LP token.
  5. If the target amounts are not raised or the liquidity is not provided before expiry, users can bail their deposits and the contract becomes void.

Interface

__init__(address,address[2],uint256[2],uint256,uint256)

Set up a new seed liquidity contract

  • router UniswapRouter address, e.g. 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
  • tokens Tokens which comprise a pair
  • target Amounts of tokens to provide, also determines the initial price
  • duration Duration over which the contract accepts deposits, in seconds
  • locktime How long the liquidity will stay locked, in seconds

deposit(uint256[2])

Deposit token amounts into the contract.

A user must have approved the contract to spend both tokens. The token amounts are clamped to not exceed their targets. This function only works up to the moment when liquidity is provided or the contract has expired, whichever comes first.

  • amounts Token amounts to deposit

provide()

Bootstrap a new Uniswap pair using the assets in the contract

This function can only be called once and before the contract has expired. Requires the target to be reached for both tokens. Requires the pool to have no liquidity in it.

claim()

Claim the received LP tokens

Can be called after liquidity is provided and the locktime has expired. The token amount is distributed pro-rata to the contribution.

bail()

Withdraw the tokens if the contract has expired without providing liquidity

Can be called after expiry given no liquidity has been provided.

Owner
core dev, yearn.finance
Linear encryption software programmed with python

Echoder linear encryption software programmed with python How does it work? The text in the text section runs a function with two keys entered keys mu

Emre Orhan 4 Dec 20, 2021
Gearbox-vyper-contracts - Auxillary contracts for the Gearbox Protocol written in Vyper

Gearbox Vyper Contracts Auxillary contracts for the Gearbox Protocol written in

Edward Amor 4 Jan 07, 2022
A Python script to implement Hill's Cipher Encryption and Decryption.

Hill_Cipher-Encryption_and_Decryption A Python script to implement Hill's Cipher Encryption and Decryption. Initially in the Encryption part, the Plai

Vishvendra Singh 1 Jan 19, 2022
A repository for Algogenous Smart Contracts created on the Algorand Blockchain.

Smart Contacts Alogrand Smart Contracts using Choice Coin. Read Docs for how to implement Algogenous Smart Contracts for your own applications. Smart

Choice Coin 3 Dec 20, 2022
A tool used to encrypt Python scripts version < 2.7 and version < 3.9

A tool used to encrypt Python scripts version 2.7 and version 3.9

Fajar Kim 1 Dec 14, 2021
Buckley 2 Jul 24, 2022
Technical_indicators_cryptos - Using technical indicators to find optimal trading strategies to deploy onto trading bot.

technical_indicators_cryptos Using technical indicators to find optimal trading strategies to deploy onto trading bot. In the Jup Notebook you wil

Van 4 Jul 03, 2022
TON Command Line Interface - easy smart contract manipulation

toncli The Open Network cross-platform smart contract command line interface. Easy to deploy and interact with TON smart contracts. Installation Toncl

Disintar IO 100 Dec 18, 2022
Mizogg-Bitcoin-Tools - A Python Tools for Bitcoin Information Balance, HASH160, DEC

Mizogg-Bitcoin-Tools Tools for Bitcoin Information Balance, HASH160, DEC, Englis

48 Jan 02, 2023
Bit is Python's fastest Bitcoin library and was designed from the beginning to feel intuitive, be effortless to use, and have readable source code.

Bit is Python's fastest Bitcoin library and was designed from the beginning to feel intuitive, be effortless to use, and have readable source code.

Ofek Lev 1.1k Jan 02, 2023
Simple crypto & blockchain implementation written in Python

JaamoCoin - simple Python blockchain example This is a very simple blockchain example written in Python. Based on this tutorial: https://medium.com/co

Jaakko Alajoki 1 Jan 07, 2022
Distributed, blockchain based hashtables middleware for deduplication of file uploads to the cloud

distributed-blockchain-based-secure-file-dedupe Searching is Distributed, Block and Access List for each upload is unique and it is stored in a single

Abhishek Tangod 1 Dec 02, 2021
Cryptocurrency Exchange Websocket Data Feed Handler

Cryptocurrency Exchange Websocket Data Feed Handler

Bryant Moscon 1.6k Dec 31, 2022
smartpassgen - A cross-platform package of modules for generating, secure storage and recovery of complex, cryptographic, smart passwords on the fly.

smartpassgen - A cross-platform package of modules for generating, secure storage and recovery of complex, cryptographic, smart passwords on the fly.

4 Sep 04, 2021
Stai Beta Of Staiking Chain - Food, Water And Electricity - Worldwide

Stai Beta Of Staiking Chain - Food, Water And Electricity - Worldwide

STATION-I 2 Feb 05, 2022
Gridlock - Encryption and decryption python project

Gridlock Encryption Encryption and decryption of plain text messages inspired by

Matthew 2 Mar 23, 2022
Cyber Security Starter Kit Platform

Cyber Security Starter Kit Platform (CSSKP) allows to instantiate new self-assessment products such as Fit4Cybersecurity, Fit4Privacy, Fit4Contract and the like.

CASES Luxembourg 3 Oct 21, 2021
Python repo to create blockchain CSVs

staketaxcsv Python repo to create blockchain CSVs for Terra (LUNA), Solana (SOL), and Cosmos (ATOM). CSV codebase for stake.tax Community contribution

187 Dec 31, 2022
BTCRecover is an open source wallet password and seed recovery tool.

BTCRecover is an open source wallet password and seed recovery tool. For seed based recovery, this is primarily useful in situations where you have lost/forgotten parts of your mnemonic, or have made

2 Aug 18, 2022