On-chain defense against hostile takeovers

Overview

Poison pill

LICENSE

On-chain defense against hostile takeovers. In layman's terms, this smart contract only facilitates a discounted sale of shares to a whitelisted group.

More info on the concept of a poison pill can be found below:

How to use

  1. Off-chain process in $TOKEN entity (corporate or DAO) triggers the need to use a poison pill. It is assumed that shares in the entity are represented as an ERC20 token.
  2. Deploy the poison pill with an initial set of whitelisted accounts. The whitelist can also be updated post-deployment. There are two ways to facilitate a discount on $TOKEN via this contract:
  • set _tokenOracle to a price oracle that supports the IPriceOracle interface, eg. Chainlink. Set _discountBP to the basis points you want to discount from the market price returned from the price oracle.
  • if no $TOKEN price feed exists on-chain, it is still possible to maintain the market price of $TOKEN manually directly in the contract via _price. At this point, you can either set _price directly to the discounted price, in which case _discountBP should be set to zero, or set to market price and specify the discount separately.
  1. Once the contract is deployed, the last step that needs to happen before the sale starts is to move the funds to sell from the entity's treasury to the smart contract. The ultimate goal of the pill is to deter some attacker who tries to take over the entity and/or bring them to the negotiation table. This means that it is up to the entity's management to determine how to execute the poison pill, before the attacker backs outs. Hence, this step can be repeated more than once, eg., entity agrees to start selling batches of their treasury and not all of it in one go. Obviously, this process is out of scope of the smart contract but it can still be facilitated.
  2. Now, whitelisted users can use $WETH or $USDC to start buying $TOKEN in discount.
  3. Any acquired $WETH or $USDC can be withdrawn by anyone back to the treasury.

Build

yarn
yarn build

Test

yarn test

Find a variety of Chainlink feeds to test with at https://market.link.

Deploy in Ropsten

Copy .env.example to .env and configure accordingly. Once you have all the config in place, you can deploy with the following command:

yarn deploy ropsten ./scripts/deploy.ts

Update the Hardhat config and .env accordinly to deploy in Mainnet.

Disclaimer

These smart contracts are being provided as is. No guarantee, representation, or warranty is being made, express or implied, as to the safety or correctness of any code provided in this repository. The contracts have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information, or loss of funds. The original author is not liable for any of the foregoing. Users should proceed with caution and use at their own risk. On top of this, nothing in this repository constitutes legal advice. Please advise with a lawyer before executing the poison pill strategy.

You might also like...

Cards Against Humanity Game Client made with ⚡Nextron (Next.js + Electron) and Typescript

CAH Client Introduction This project is one of the other projects related to the Cards Against Humanity (CAH) game. This client is made in Electron, u

Jun 17, 2022

A large scale simulation which pits millions of space ships against each other in a virtual universe all running directly in SingleStore.

A large scale simulation which pits millions of space ships against each other in a virtual universe all running directly in SingleStore.

Wasm Space Program In this demo we simulate a fake universe full of thousands of solar systems. In each solar system there are many space ships and en

Nov 2, 2022

Invadium runs exploit playbooks against vulnerable target applications in an intuitive, reproducible, and well-defined manner.

Invadium Invadium runs exploits against one or more target applications in an intuitive, reproducable, and well-defined manner. It focuses on bridging

Nov 6, 2022

Validate your Markdown frontmatter data against a JSON schema — remark-lint rule plugin

Validate your Markdown frontmatter data against a JSON schema — remark-lint rule plugin

remark-lint-frontmatter-schema Validate Markdown frontmatter YAML against an associated JSON schema with this remark-lint rule plugin. Supports: Types

Dec 10, 2022

An app to test out your typing speed, save your progress and view statistics against them.

An app to test out your typing speed, save your progress and view statistics against them.

Introduction An app to test out your typing speed, save your progress and view statistics against them. Demo Check out the quick demo here. Getting St

Sep 7, 2022

Patronum: Ethereum RPC proxy that verifies RPC responses against given trusted block hashes

Patronum: Ethereum RPC proxy that verifies RPC responses against given trusted block hashes

Patronum Ethereum RPC proxy that verifies RPC responses against given trusted block hashes. Currently, most of the DAPPs and Wallets interact with Eth

Dec 7, 2022

Evmos chain

Evmos Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum. It's built using the Co

Jan 3, 2023

WAMpage - A WebOS root LPE exploit chain

WAMpage - A WebOS root LPE exploit chain

WAMpage WAMpage - A WebOS root LPE exploit chain This exploit is mainly of interest to other researchers - if you just want to root your TV, you proba

Dec 2, 2022

Nouns On-Chain Proposal Simulation and Analysis

Nouns Diligence Nouns On-Chain Proposal Simulation and Analysis For Voters Technical reports for all reviewed proposals can be found in the reports fo

Dec 26, 2022
Owner
Michalis Kargakis
Michalis Kargakis
Chrome extension to simulate cryptoblades fights, giving you the win rate % against all enemies with just one click

CryptoBlades fight simulator This is a Chrome extension that will help you to know the exact win rate percentage you have on each cryptoblades fight.

Jose Leonardo Dos Ramos Rivas 12 Aug 7, 2022
A javascript standard data structure library which benchmark against C++ STL.

js-sdsl A javascript standard data structure library which benchmark against C++ STL. Note Note that our official version starts from 2.0.0. In order

Zilong Yao 5 Dec 10, 2022
A lightweight extension to automatically detect and provide verbose warnings for embedded iframe elements in order to protect against Browser-In-The-Browser (BITB) attacks.

Enhanced iFrame Protection - Browser Extension Enhanced iFrame Protection (EIP) is a lightweight extension to automatically detect and provide verbose

odacavo 16 Dec 24, 2022
🦔 Cyber-weapon against Putin.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Artem Tamoian 7 Sep 14, 2022
Utility for authorizing user in a connected app, creating JWT to authenticate against it, and perform a sample callout.

Question: What is this for? Answer: When configuring a Salesforce Connected app to use certificates to authenticate you will use JSON Web Tokens to a

null 4 Jun 15, 2022
This project will be using various AI and Rule Engine algorithm to detect various attack against a company!

?? Introduction This project will be using various AI and Rule Engine algorithm to detect various attack against a website! ?? Mission After starting

Harish S.G 4 Apr 29, 2022
Fullstack Dynamic NFT Mini Game built using 💎 Diamond Standard [EIP 2535] 🏃‍♀️Players can use Hero NFT to battle against Thanos ⚔ Heroes can be Healed by staking their NFT 🛡

?? Fullstack Dynamic NFT Mini Game ?? ?? Using Diamond Standard Play On ?? ?? ⏩ http://diamond-dapp.vercel.app/ Project Description ?? Fullstack Dynam

Shiva Shanmuganathan 21 Dec 23, 2022
LeakInspector: an add-on that warns and protects against personal data exfiltration

LeakInspector ?? LeakInspector is an add-on that warns and protects against personal data exfiltration. We developed LeakInspector to help publishers

LeakyForms 119 Nov 15, 2022
Security tool + attack database used to take quick action against newly-discovered vulnerabilities in the blockchain.

SolidGuard Version: v1.0.1 SolidGuard is a Blockchain Security tool catered towards organizations who manages decentralized applications on the Ethere

Team SolidGuard 4 Jan 3, 2023
A server setup to take screenshots against the green screen in-game.

alt:V Clothing Green Screener Support on Patreon. Seriously. Ever want screenshots of every single clothing item in GTA:V? Well this is your repositor

null 13 Dec 26, 2022