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:
- https://www.investopedia.com/terms/p/poisonpill.asp
- https://twitter.com/GuardAOR/status/1476271943351427078
- 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. - 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 theIPriceOracle
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.
- 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.
- Now, whitelisted users can use
$WETH
or$USDC
to start buying$TOKEN
in discount. - Any acquired
$WETH
or$USDC
can be withdrawn by anyone back to the treasury.
Forge is used under the hood to build, test, and deploy the contract.
make build
make test
Find a variety of Chainlink feeds to test with at https://market.link.
Update the deploy-ropsten
target in Makefile with your own parameters, then:
make deploy-ropsten
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.