• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Element Protocol Smart Contracts

Element Protocol

Build Status Coverage Status License

The Element Protocol is a DeFi primitive which runs on the Ethereum blockchain. The Protocol, at its core, allows a tokenized yield bearing position (ETH, BTC, USDC, etc) to be split into two separate tokens, the 1) principal token, and the 2) yield token. The principal tokens are redeemable for the deposited principal and the yield tokens are redeemable for the yield earned over the term period. This splitting mechanism allows users to sell their principal as a fixed-rate income position, further leveraging or increasing exposure to interest without any liquidation risk.

This repository contains the smart contracts which enable the functionality described above, including a custom AMM implementation based on the YieldSpace paper, designed as an integration with the Balancer V2 system.

Element is a community driven protocol and there are many ways to contribute to it, we encourage you to jump in and improve and use this code.

For a technical contract overview please read our specification.

Bugs and Feature Requests

The code in this repository's main branch is deployed to the Ethereum blockchain and cannot be changed. Despite that, the Element community is engaged in the active development of new features and code fixes which are an extension of this code. If you have a suggestion for a new feature, extension, or cool use case and want to help the community, drop by the dev channel in our discord to discuss and you will have a warm welcome!

For non-security-critical bugs, you can open a public issue on this repository, but please follow our issue guidelines. For any security-related critical bugs please report to [email protected] and follow responsible disclosure standards since these contracts are likely to hold high-value cryptocurrency. If you do find a bug there is a Bug Bounty program funded by Element Finance here. Additionally, the Element Finance Bug Bounty program has been extended to the Immunefi platform.

Integrations and Code Contributions

Integrating with the Element protocol's tokens is as easy as adding ERC20 compliant tokens to your project or integrating with the public methods smart contract directly on the Ethereum blockchain. Launching new assets on Element is also permissionless but may require some new smart contract code; to write this code please carefully review the specification and don't hesitate to reach out and ask any questions in the dev channel of our discord.

We welcome new contributors and code contributions with open arms! Please be sure to follow our contribution guidelines when proposing any new code. Lastly, because Element is a community driven protocol, any new code contributions are more likely to be accepted into future deployments of the protocol if they have been openly discussed within the community first.

Build and Testing

1. Getting Started (Prerequisites)

2. Setup

git clone [email protected]:delvtech/elf-contracts.git
cd elf-contracts
npm install
npm run load-contracts

3. Build

npm run build

4. Test

testing requires an alchemy API key exported in your environment (cp .env.sample .env then edit the .env file with your API key and source .env to set environment variable)

npm run test

Contract Addresses

Deployed contract addresses can be found in the changelog site.

Note: The highest release version will always contain the latest list of contract addresses.

Additionally, the latest deployed contract addresses for Goerli and Mainnet can be found here and here respectively.

More Repositories

1

council

Flexible DAO governance smart contracts, developed by Delv.
TypeScript
93
star
2

elf-council-frontend

Frontend repository for governance
CSS
65
star
3

solidity_takehome

TypeScript
61
star
4

elf-sdk

SDK for interacting with Element Core Contracts
TypeScript
33
star
5

elf-simulations

Analysis & simulation repo for Delv
Python
27
star
6

hyperdrive

An automated market maker for fixed and variable yield with on-demand terms.
Solidity
27
star
7

council-kit

A monorepo of apps and packages for the Council governance protocol.
TypeScript
27
star
8

frontend-monorepo

Frontends for all of the Element Finance apps.
TypeScript
19
star
9

zkp-merkle-airdrop-contracts

Solidity
11
star
10

elf-council-zkcontracts

Solidity
10
star
11

elf-deploy

TypeScript
9
star
12

hyperdrive-frontend

A monorepo of apps and packages for the Hyperdrive AMM.
TypeScript
9
star
13

bunnymen

fate up against your will
Nix
7
star
14

react-query-typechain

React Query bindings for typechain
TypeScript
5
star
15

nft-regenerative

regenerative scripts and elfi assets
JavaScript
4
star
16

elf-contracts-typechain

Typechain codegen for generating Typescript classes and types for elf-contracts
Solidity
3
star
17

elf-sdk-example

Examples for the elf-sdk
TypeScript
2
star
18

weiroll-periphery

JavaScript
2
star
19

nft-contracts

TypeScript
2
star
20

docs-portal

The Element Finance Documentation Portal
HTML
2
star
21

elf-stats

TypeScript
1
star
22

delv-landing-page-old

TypeScript
1
star
23

elf-calculators

JavaScript
1
star
24

elf-twitter-bot

Tweets out Fixed APR's daily for terms on element.fi
TypeScript
1
star
25

lp_contributions

Jupyter Notebook
1
star
26

hypers-drive-game

TypeScript
1
star
27

ui-core

Makes typechain contract stubs for unit testing
1
star
28

elf-merkle-tree-generator

TypeScript
1
star