The Eurodollar Protocol consists of two types of tokens, USDE a compliant USD stablecoin and InvestToken (EUI), for compliant yield tokens, and a price oracle, which allows seamless conversion between the two tokens. The system is designed to be compliant with EU regulation regarding stablecoins (MICA) and security tokens (MIFID2).
The solutions utilizes OpenZeppelin contracts for the tokens, to ensure upgradeability is implemented.
The stablecoin ERC20 token contract. Implements following functionality:
The yield-bearing ERC4626 token contract. Implements following functionality:
Smart-contract for providing the conversion price between the stablecoin and an yield bearing token. Implements following functionality:
maxPriceIncrease
.delay
since last update is not violated and that the new price's increase does exceed maxIncrease
.Smart-contract keeping track of the transfer persmission state of an address. Each address can be in 1 of 3 states:
WHITELISTED
BLACKLISTED
VOID
(default) - considered neither whitelisted or blacklistedThese states have corresponding set functions (allowing one or more accounts) and are relevant for the view functions:
isValid(from, to)
keeping track of the blacklisted state of the from
and to
address; it returns false if either of from
or to
is BLACKLISTED
, except for the cases corresponding to burning, when to
would be null address 0x0
isValidStrict(from, to)
keeping track of the whitelisted state of the from
and to
address; it returns false if either of from
or to
is not WHITELISTED
, except for the cases corresponding to minting to WHITELISTED
address, when from
would be null address,or burning, when to
would be null address
forge install
forge build
Copy .env.example
to .env
and set your private key.
Check script/Deploy.s.sol
if you want to modify parameters.
Run deployment script. For example, testing locally (anvil environment):
forge script script/Deploy.s.sol
--fork-url http://localhost:8545
--broadcast