Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
12a2025
initial commit
rohan-patra Feb 8, 2025
9d941d4
Update USDY.s.sol
rohan-patra Feb 8, 2025
243932c
Create README.md
rohan-patra Feb 8, 2025
40084aa
Add tokens project to README.md
raviriley Feb 8, 2025
6498028
rename to SRC
rohan-patra Feb 8, 2025
cd41f47
remove bloat
rohan-patra Feb 8, 2025
6d22bdb
forge install: forge-std
rohan-patra Feb 8, 2025
c2a1416
forge install: openzeppelin-contracts
rohan-patra Feb 8, 2025
bdda8f4
add submodules and update imports
rohan-patra Feb 8, 2025
ac17e8d
Update SRC20.sol
rohan-patra Feb 8, 2025
85b8bca
Rename project from tokens to rent
raviriley Feb 8, 2025
8813bed
forge install: forge-std
raviriley Feb 8, 2025
f3e8339
forge install: openzeppelin-contracts
raviriley Feb 8, 2025
c75fa04
Update SRC20 comment
raviriley Feb 8, 2025
dafd3fe
Merge remote-tracking branch 'upstream/main'
raviriley Feb 8, 2025
9d6932f
feat(SRC20): improve privacy and event handling
rohan-patra Feb 8, 2025
eb38f04
more renames, and fix tests for new interface
rohan-patra Feb 8, 2025
2de9654
Update USDY and SRC20 with review fixes
rohan-patra Feb 8, 2025
1197d5f
Emit real value from _update
rohan-patra Feb 8, 2025
b1b24c7
remove extra internal _approve function
rohan-patra Feb 8, 2025
ca2c4b8
remove scripts
rohan-patra Feb 8, 2025
be3a4b4
fix ISRC20 and SRC20 comments and USDY double emit issue
rohan-patra Feb 10, 2025
a829561
update READMEs and delete env example
rohan-patra Feb 10, 2025
61413bc
rename rent/ to dwell/
rohan-patra Feb 10, 2025
6877d82
Update ISRC20.sol
rohan-patra Feb 10, 2025
7bde66c
Update ISRC20.sol
rohan-patra Feb 10, 2025
3c2dc4d
Update ISRC20.sol
rohan-patra Feb 10, 2025
e8e911b
Update SRC20.sol
rohan-patra Feb 10, 2025
4624c67
Merge branch 'main' into main
lyronctk Feb 11, 2025
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
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[submodule "rent/lib/forge-std"]
path = dwell/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "rent/lib/openzeppelin-contracts"]
path = dwell/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts

[submodule "riff/lib/forge-std"]
path = riff/lib/forge-std
url = https://github.com/foundry-rs/forge-std
Expand Down
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,26 @@ Welcome to the **Seismic** blockchain's **Prototypes** repository! This repo is

## Purpose

This repository exists for:
This repository exists for:

- **Reference & Examples:** Developers looking to understand the Seismic blockchain or seeking best practices can explore these prototypes as real-world examples.
- **Collaboration:** We encourage contributions, feedback, and discussions about all things Seismic.
- **Reference & Examples:** Developers looking to understand the Seismic blockchain or seeking best practices can explore these prototypes as real-world examples.
- **Collaboration:** We encourage contributions, feedback, and discussions about all things Seismic.

Each project in this repo lives in its own directory and includes a dedicated README that provides more details.

## Projects Overview

Below is a quick summary of each prototype currently available in this repository:

1. **`Riff`**
A bonding curve that you can hear.
2. **`Project 2 here`**
Description here.

1. **`RIFF`**
Listen to a bonding curve.
1. **`DWELL`**
Pay your rent with a yield-bearing stablecoin.

## Contributing

1. **Fork** this repository.
2. **Create** a new branch for your prototype or feature.
1. **Fork** this repository.
2. **Create** a new branch for your prototype or feature.
3. **Add** your prototype in a new directory, including a `README.md` with setup instructions and information on your project. Additionally, include a 1-2 sentence summary of the project in this top-level `README.md`.
4. **Open** a pull request describing your changes and why they're valuable.

Expand All @@ -34,7 +33,7 @@ We're excited to see what you build and look forward to collaborating on the fut

## Get in Touch

- **Website:** [Seismic Blockchain](https://www.seismic.systems)
- **Twitter:** [@SeismicSys](https://x.com/SeismicSys)
- **Website:** [Seismic Blockchain](https://www.seismic.systems)
- **Twitter:** [@SeismicSys](https://x.com/SeismicSys)

If you have any questions or want to propose a new idea, please open an issue or reach out on our official channels. Thank you for being an early part of the Seismic ecosystem!
If you have any questions or want to propose a new idea, please open an issue or reach out on our official channels. Thank you for being an early part of the Seismic ecosystem!
4 changes: 4 additions & 0 deletions dwell/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.env
broadcast/
cache/
out/
20 changes: 20 additions & 0 deletions dwell/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Privacy-Preserving/Yield-Bearing Tokens

## Overview

**Problem**: Traditional rent payments are antiquated, requiring manual processing, offering no yield on deposits, and exposing sensitive financial information. This creates inefficiencies for both tenants and landlords while leaving value on the table.

**Insight**: Since rental markets operate on predictable payment schedules, there's an opportunity to optimize capital efficiency through automated payments and yield generation. Privacy-preserving mechanisms can protect sensitive financial data while maintaining transparency where needed.

**Solution**: USDY (USD Yield) implements a privacy-preserving token system for rental payments that generates yield during deposit periods while protecting transaction privacy. Tenants can earn returns on their deposits until rent is due, landlords receive guaranteed on-time payments, and all parties maintain financial privacy through shielded transactions. The system uses a shares-based accounting mechanism to distribute yield fairly among all participants.

## Architecture

- `SRC20.sol`: Base privacy-preserving ERC20 implementation using shielded types
- `ISRC20.sol`: Interface for shielded ERC20 functionality
- `USDY.sol`: Yield-bearing USD stablecoin with privacy features
- Comprehensive test suite in `test/` directory

## License

AGPL-3.0-only
6 changes: 6 additions & 0 deletions dwell/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[profile.default]
src = "src"
out = "out"
libs = ["lib"]

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
1 change: 1 addition & 0 deletions dwell/lib/forge-std
Submodule forge-std added at 3b20d6
1 change: 1 addition & 0 deletions dwell/lib/openzeppelin-contracts
Submodule openzeppelin-contracts added at acd4ff
84 changes: 84 additions & 0 deletions dwell/src/ISRC20.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity ^0.8.20;

/**
* @dev Interface of the ERC-20 standard as defined in the ERC, modified for shielded types.
*/
interface ISRC20 {
/**
* @dev Function to emit when tokens are moved from one account to another.
* Must be overridden by implementing contracts to define event emission behavior.
* Default implementation is no-op for privacy.
*
* @param from The sender address
* @param to The recipient address
* @param value The transfer amount
*/
function emitTransfer(address from, address to, uint256 value) external;

/**
* @dev Function to emit when allowance is modified.
* Must be overridden by implementing contracts to define event emission behavior.
* Default implementation is no-op for privacy.
*
* @param owner The token owner
* @param spender The approved spender
* @param value The approved amount
*/
function emitApproval(address owner, address spender, uint256 value) external;

/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);

/**
* @dev Returns the value of tokens owned by `account`.
* For privacy reasons, returns actual balance only if caller is the account owner,
* otherwise reverts.
*/
function balanceOf(saddress account) external view returns (uint256);

/**
* @dev Moves a shielded `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded,
* otherwise reverts.
*
* Expected that implementation calls emitTransfer.
*/
function transfer(saddress to, suint256 value) external returns (bool);

/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
* For privacy reasons, returns actual allowance only if caller is either owner or spender,
* otherwise reverts.
*/
function allowance(saddress owner, saddress spender) external view returns (uint256);

/**
* @dev Sets a shielded `value` amount of tokens as the allowance of a shielded `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Expected that implementation calls emitApproval.
*/
function approve(saddress spender, suint256 value) external returns (bool);

/**
* @dev Moves a shielded `value` amount of tokens from a shielded `from` address to a shielded `to` address using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Expected that implementation calls emitTransfer.
*/
function transferFrom(saddress from, saddress to, suint256 value) external returns (bool);
}
25 changes: 25 additions & 0 deletions dwell/src/ISRC20Metadata.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity ^0.8.20;

import {ISRC20} from "./ISRC20.sol";

/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
interface ISRC20Metadata is ISRC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);

/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);

/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
Loading