Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update deployed contracts #36

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
PRIVATE_KEY=

# RPC URLs
OPTIMISM_SEPOLIA_RPC=
OPTIMISM_MAINNET_RPC=
OPTIMISM_TESTNET_RPC=https://sepolia.optimism.io
OPTIMISM_MAINNET_RPC=https://mainnet.optimism.io

CYBER_SEPOLIA_RPC=
CYBER_MAINNET_RPC=
CYBER_TESTNET_RPC=https://cyber-testnet.alt.technology
CYBER_MAINNET_RPC=https://cyber.alt.technology

# Etherscan API keys
ETHEREUM_ETHERSCAN_API_KEY=
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
.PHONY: deploy-testnet deploy-mainnet deploy-aave
SHELL := /bin/bash
.PHONY: deploy-testnet deploy-mainnet deploy-aave-mainnet

DEPLOY_CMD=source .env && forge script scripts/Deploy.s.sol:DeployScript
DEPLOY_AAVE_CMD=source .env && forge script scripts/DeployAave.s.sol:DeployAaveScript
VERIFY_CMD=--etherscan-api-key $$OPTIMISM_ETHERSCAN_API_KEY --verify

deploy-testnet:
${DEPLOY_CMD} --rpc-url $$OPTIMISM_TESTNET_RPC --broadcast ${VERIFY_CMD} -vvvv
${DEPLOY_CMD} --rpc-url $$CYBER_TESTNET_RPC --broadcast -vvvv
#${DEPLOY_CMD} --rpc-url $$CYBER_TESTNET_RPC --broadcast -vvvv

deploy-mainnet:
${DEPLOY_CMD} --rpc-url $$OPTIMISM_MAINNET_RPC --broadcast ${VERIFY_CMD} -vvvv
${DEPLOY_CMD} --rpc-url $$CYBER_MAINNET_RPC --broadcast -vvvv
#${DEPLOY_CMD} --rpc-url $$CYBER_MAINNET_RPC --broadcast -vvvv

deploy-aave:
deploy-aave-testnet:
${DEPLOY_AAVE_CMD} --rpc-url $$OPTIMISM_TESTNET_RPC --broadcast ${VERIFY_CMD} -vvvv
${DEPLOY_AAVE_CMD} --rpc-url $$OPTIMISM_MAINNET_RPC --broadcast ${VERIFY_CMD} -vvvv

deploy-aave-mainnet:
${DEPLOY_AAVE_CMD} --rpc-url $$OPTIMISM_MAINNET_RPC --broadcast ${VERIFY_CMD} -vvvv
66 changes: 40 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

##

**A payment protocol designed for creators**, it bridges the gap between creators and fans, where fans can **donate, sponsor, subscribe**, and more, while creators receive **fees and yield**.
**A payment protocol designed for creators**, it bridges the gap between creators and fans, where fans can **donate,
sponsor, subscribe**, and more, while creators receive **fees and yield**.

- For fans, pay early and earn more;
- For creators, long-term income from fees and yield;
Expand All @@ -21,20 +22,25 @@
- Made for creators like startups, indie hackers and KOLs.

## Bug Bounty

If you are interested in the smart contracts, here's a simple bug bounty:

- Discover [hign / medium](https://docs.sherlock.xyz/audit/judging/judging#iv.-how-to-identify-a-high-issue) issues - $1200 *cc ashu@vv.meme*
- Discover [hign / medium](https://docs.sherlock.xyz/audit/judging/judging#iv.-how-to-identify-a-high-issue) issues -
$1200 *cc ashu@vv.meme*
- Add/optimize test cases - $100 / PR

## How it works?

The contract uses a sigmoid bonding curve for dynamic pricing. When you buy, it mints tokens and drives prices up, then when you sell, it burns tokens and drives prices down. The staked ETH is allocated in an interest-rate market to generate sustainable rewards, which are then redistributed to the creators.
The contract uses a sigmoid bonding curve for dynamic pricing. When you buy, it mints tokens and drives prices up, then
when you sell, it burns tokens and drives prices down. The staked ETH is allocated in an interest-rate market to
generate sustainable rewards, which are then redistributed to the creators.

<div align="center">
<img src="images/curve.gif" width="80%">
<img alt="curve" src="images/curve.gif" width="80%">
</div>

## Why is it better?

<div align="center">

| Features | V4V | Friendtech | Patreon | Coinbase Commerce |
Expand All @@ -51,36 +57,41 @@ The contract uses a sigmoid bonding curve for dynamic pricing. When you buy, it

### NFT

> The token is a standard ERC1155 contract, with NFTs acting as shares in the bonding curve. When you trade shares, NFTs are minted or burned.
> The token is a standard ERC1155 contract, with NFTs acting as shares in the bonding curve. When you trade shares, NFTs
> are minted or burned.

| Network | Address |
|------------------|--------------------------------------------|
| Optimism Mainnet | N/A |
| Optimism Sepolia | 0x4aCF2aF23f51b7008dF3518A1511871F87083C38 |
| Cyber Mainnet | N/A |
| Cyber Sepolia | 0x552d348657fafd661372f5864093dd9555a2ef06 |
| Network | Address |
|------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| Optimism Mainnet | N/A |
| Optimism Sepolia | [0x02a04ee779587afbbe7f844180ff760bc5e73039](https://sepolia-optimism.etherscan.io/address/0x02a04ee779587afbbe7f844180ff760bc5e73039) |
| Cyber Mainnet | N/A |
| Cyber Sepolia | |

### Shares

> SharesFactory is the core contract that contains the bonding curve and yield aggregator logic where you can mint, buy, and sell shares, as well as change yield strategies and claim yields.
> SharesFactory is the core contract that contains the bonding curve and yield aggregator logic where you can mint, buy,
> and sell shares, as well as change yield strategies and claim yields.

| Network | Address |
|------------------|--------------------------------------------|
| Optimism Mainnet | N/A |
| Optimism Sepolia | 0x9F94C75341D23EAb48793b2879F6062a400132e3 |
| Cyber Mainnet | N/A |
| Cyber Sepolia | 0x1b05f188388b49ee9053914d3109119d228060b5 |
| Network | Address |
|------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| Optimism Mainnet | N/A |
| Optimism Sepolia | [0x4509932e2f18b622f454cf73fac8069901fbbebc](https://sepolia-optimism.etherscan.io/address/0x4509932e2f18b622f454cf73fac8069901fbbebc) |
| Cyber Mainnet | N/A |
| Cyber Sepolia | 0x1b05f188388b49ee9053914d3109119d228060b5 |

### Yield

> YieldAggregator is a yield strategy contract that provides a common interface for SharesFactory to use, such as deposit, withdraw, and claimable. However, the underlying logic can be any yield strategy, such as Aave, Pendle and LRT, or nothing at all.
> YieldAggregator is a yield strategy contract that provides a common interface for SharesFactory to use, such as
> deposit, withdraw, and claimable. However, the underlying logic can be any yield strategy, such as Aave, Pendle and
> LRT,
> or nothing at all.

| Network | Address |
|------------------|--------------------------------------------|
| Optimism Mainnet | N/A |
| Optimism Sepolia | 0xc1eB8f8119De78Da6852F2607d5525d849FCBaaE |
| Cyber Mainnet | N/A |
| Cyber Sepolia | 0xba2553060e90551c797bebd48ee04909606bb04f |
| Network | Address |
|------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| Optimism Mainnet | N/A |
| Optimism Sepolia | [0xa77fc72fbb2e7f6c4ba4f97f0f6eeee9f46a2b97](https://sepolia-optimism.etherscan.io/address/0xa77fc72fbb2e7f6c4ba4f97f0f6eeee9f46a2b97) |
| Cyber Mainnet | N/A |
| Cyber Sepolia | 0xba2553060e90551c797bebd48ee04909606bb04f |

## Test and Deploy

Expand All @@ -100,4 +111,7 @@ deploy

## Acknowledgement

Thanks to [Simon de la Rouviere](https://docs.google.com/document/d/1VNkBjjGhcZUV9CyC0ccWYbqeOoVKT2maqX0rK3yXB20), whose ideas inspired *V4V* to combine curated market with bonding curves, and to the ideal S-curve model from [sound protocol](https://github.com/soundxyz/sound-protocol), we’ve also learned the principle of minimalism from [friend tech](https://www.friend.tech) and [bodhi](https://bodhi.wtf).
Thanks to [Simon de la Rouviere](https://docs.google.com/document/d/1VNkBjjGhcZUV9CyC0ccWYbqeOoVKT2maqX0rK3yXB20), whose
ideas inspired *V4V* to combine curated market with bonding curves, and to the ideal S-curve model
from [sound protocol](https://github.com/soundxyz/sound-protocol), we’ve also learned the principle of minimalism
from [friend tech](https://www.friend.tech) and [bodhi](https://bodhi.wtf).
13 changes: 9 additions & 4 deletions scripts/Base.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,29 @@ contract BaseScript is Script {
// set the factory address here so that the yieldAggregator can be deployed.

// Optimism Sepolia
SHARES_FACTORY[OPTIMISM_TESTNET] = 0x9F94C75341D23EAb48793b2879F6062a400132e3;
SHARES_FACTORY[OPTIMISM_TESTNET] = 0x4509932e2f18b622F454cf73FAc8069901fbbebC;
WETH[OPTIMISM_TESTNET] = 0x4200000000000000000000000000000000000006;
AAVE_POOL[OPTIMISM_TESTNET] = 0xb50201558B00496A145fE76f7424749556E326D8;
AAVE_WETH_GATEWAY[OPTIMISM_TESTNET] = 0x589750BA8aF186cE5B55391B0b7148cAD43a1619;

// Optimism Mainnet
SHARES_FACTORY[OPTIMISM_MAINNET] = address(0);
SHARES_FACTORY[OPTIMISM_MAINNET] = 0x3eC4241152E5CEc606E1F0FB45448251221104E7;
WETH[OPTIMISM_MAINNET] = 0x4200000000000000000000000000000000000006;
AAVE_POOL[OPTIMISM_MAINNET] = 0x794a61358D6845594F94dc1DB02A252b5b4814aD;
AAVE_WETH_GATEWAY[OPTIMISM_MAINNET] = 0xe9E52021f4e11DEAD8661812A0A6c8627abA2a54;

// Cyber Sepolia
// Cyber Testnet
WETH[CYBER_TESTNET] = 0x4200000000000000000000000000000000000006;
SHARES_FACTORY[CYBER_TESTNET] = address(0);
AAVE_POOL[CYBER_TESTNET] = address(0);
AAVE_WETH_GATEWAY[CYBER_TESTNET] = address(0);

// Cyber Mainnet
WETH[CYBER_MAINNET] = address(0);
SHARES_FACTORY[CYBER_MAINNET] = address(0);
WETH[CYBER_MAINNET] = 0x4200000000000000000000000000000000000006;
AAVE_POOL[CYBER_MAINNET] = address(0);
AAVE_WETH_GATEWAY[CYBER_MAINNET] = address(0);

}

modifier broadcast() {
Expand Down
Loading