SIP-153: LINK Wrappr
Author | |
---|---|
Status | Rejected |
Type | Governance |
Implementor | TBD |
Release | TBD |
Discussions-To | https://research.synthetix.io/ |
Created | 2021-07-01 |
Simple Summary
NOTE: This SIP has been moved to rejected as there is a planned SIP to create a generic implementation of a wrapperfactory to support any wrapped assets.
Allow users to wrap LINK to mint sLINK
Abstract
This SIP proposes to deploy a new wrappr as per SIP-112 (ETHwrappr) that will accept deposits of LINK and mint sLINK.
Motivation
The Curve LINK/sLINK pool has deep liquidity but sLINK remains unbalanced in the pool causing sLINK to trade above par against LINK. sLink has been a top three Synth by open interest for most of this year so there is a significant positive skew that can be offset through the introduction of a LINKwrappr.
Specification
Overview
sLINK is minted whenever a user deposits LINK into the contract. The user can deposit any amount, however, this is subject to not exceeding the maxLINK
configurable via SCCP.
There is no duration, interest rate or collateralization ratio, as any user can at any time buy back LINK available in the contract by burning sLINK.
Minters benefit as minting sLINK and burning sLINK are subject to a mintingFeeRate
and burningFeeRate
, both of which are paid to the fee pool after conversion into sUSD
.
Rationale
Adding additional wrappr contracts to support new assets will help expand the total Synth supply, LINK is one of the most liquid ERC-20 tokens and is therefore a good wrappr candidate.
Technical Specification
Contracts
Two contracts are required to be deployed:
LINKWrapper.sol
which is able to mintsLINK
against LINK deposited and release LIK againstsLINK
burned.
Interfaces
The entry points for users on LINKWrapper.sol
implements the following interface.
interface LINKWrapper.sol {
function mint(uint amount) external;
function burn(uint amount) external;
}
Key Bounds
-
The upper bound on the amount of Minting is determined with a helper function,
capacity
, defined by max(maxLINK
, 0) withLINK
being the amount locked in the contract. In case the user attempts to mint an amount greater than the upper bound, thencapacity
is minted and the residual is returned to the user (please refer to test cases for calculation specs). -
The upper bound on the amount of Burning is computed as
LINK
locked in the contract multiplied(1+burnFeeRate)
(please refer to test cases for calculation specs). -
mintFeeRate
andburnFeeRate
are both bounded between 0% and 100%, inclusive.
Test Cases
- Given that a user has
u
amount of LINK and the contract hasc
amount of LINK in spare capacity- Given that
u
is larger than or equal toc
- When the user attempts to deposit
u
LINK into the contract- ✅ Then it succeeds and the following take place:
c
LINK is locked up in the contractc(1-mintFeeRate)
is minted into the user's wallet in sLINKc*mintFeeRate
worth of sLINK is sent to the fee pool in the form of sUSDu - c
worth of LINK is refunded back to the user
- When the user attempts to deposit
- Given that
u
is strictly lower thanc
- When the user attempts to deposit
u
LINK into the contract- ✅ Then it succeeds and the following take place:
u
LINK is locked up in the contractu(1-mintFeeRate)
is minted into the user's wallet in sLINKu*mintFeeRate
worth of sLINK is sent to the fee pool in the form of sUSD
- ✅ Then it succeeds and the following take place:
- When the user attempts to deposit
- Given that
- Given that the contract's capacity is zero, as
maxLINK
is locked in the contract- When the user attempts deposit LINK into the contract
- ❌ Then the transaction reverts due to max capacity being reached
- When the user attempts deposit LINK into the contract
- Given that a user has
u
amount of sLINK and the contract holdsc
amount of LINK- Given that
u
is larger than or equal toc(1+burnFeeRate)
- When the user attempts to draw out LINK from the contract by burning
u
sLINK and flagging withdrawal in LINK- ✅ Then it succeeds and the following take place:
c
LINK is sent to the userc
sLINK is burnedc * burnFeeRate
worth of sLINK is swapped to sUSD and sent to the fee poolu - c(1+burnFeeRate)
worth of sLINK is refunded back to the user
- ✅ Then it succeeds and the following take place:
- When the user attempts to draw out LINK from the contract by burning
- Given that
u
is strictly lower thanc(1+burnFeeRate)
- When the user attempts to draw out LINK from the contract by burning
u
sLINK and flagging withdrawal in LINK- ✅ Then it succeeds and the following take place:
u (1-burnFeeRate)
worth of LINK is sent to the useru * burnFeeRate
worth of sLINK is swapped to sUSD and sent to the fee poolu (1 - burnFeeRate)
sLINK is burned
- ✅ Then it succeeds and the following take place:
- When the user attempts to draw out LINK from the contract by burning
- Given that
- Given that the contract's holds no LINK
- When the user attempts draw out LINK from the contract
- ❌ Then the transaction reverts due to the contract being out of LINK
- When the user attempts draw out LINK from the contract
Configurable Values (Via SCCP)
For the wrappr contract, the following values must be set:
maxLINK
the maximum amount of LINK held by contract.mintFeeRate
the fee for depositing LINK into the contract.burnFeeRate
the fee for burning sLINK and releasing LINK from the contract
It is expected that arbitrage will be capturd via flashbots once this new contract is deployed, therefore, to maximise the fees to stakers the following process is proposed for the deployment. Post deployment stage multiple pDAO transactions to progressively decrease fees and increase the cap in the following increments:
maxLINK
0 - 2.5m LINK in 250k incrementsmintFeeRate
75bp - 25bp in 5bp incrementsburnFeeRate
5bp
Copyright
Copyright and related rights waived via CC0.