Skip to content

docs: add README — contracts, architecture, trust model#2

Open
MiaMakesItHappen wants to merge 1 commit intostackitai:mainfrom
MiaMakesItHappen:docs/add-readme
Open

docs: add README — contracts, architecture, trust model#2
MiaMakesItHappen wants to merge 1 commit intostackitai:mainfrom
MiaMakesItHappen:docs/add-readme

Conversation

@MiaMakesItHappen
Copy link

@MiaMakesItHappen MiaMakesItHappen commented Mar 12, 2026

What this does

Adds a README to the public smart contract repo. Currently there's no README or repo description, so agent developers and builders who find this repo see raw Solidity with zero context.

Why it matters

The open-source contracts are StackIt's primary trust signal for agents and developers — they prove that funds only move with the user's authorization and safety rules are enforced on-chain. Without a README, that signal is invisible.

Changes

  • Contract explanations — what Stack.sol, Wallet.sol, and WalletImplementation.sol each do
  • On-chain safety rules — documents the health factor floor, borrow caps, nonce replay prevention, cooldown enforced by WalletImplementation
  • Custody model — explains wallet-sovereign architecture (StackIt constructs + simulates, user signs, StackIt never holds keys)
  • Open source scope — clarifies why contracts are open but rules engine is proprietary
  • Architecture diagram — shows how the contracts relate to each other and to Aave/Uniswap
  • Deployment table — placeholder for Arbiscan addresses (needs to be filled in)
  • Dev setup — yarn install / compile / test

One thing needed from the team

Fill in the Arbiscan deployment addresses in the contracts table before merging. That's the most important trust link for agent developers.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive README documenting the StackIt Smart Contracts ecosystem, including architecture overview, deployment guide for Arbitrum One, security constraints, custody model, development commands, and licensing information.

- Describes Stack.sol, Wallet.sol, WalletImplementation.sol
- Documents on-chain safety rules (health factor floor, borrow caps,
  nonce replay prevention, cooldown)
- Explains wallet-sovereign custody model (StackIt never holds keys)
- Clarifies open source scope: contracts are the trust layer
- Placeholder for Arbiscan deployment addresses
- Development setup instructions
@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Walkthrough

A comprehensive README.md file is added to document the StackIt Smart Contracts ecosystem, covering contract architecture, design patterns, deployment information, development setup, and licensing details.

Changes

Cohort / File(s) Summary
Documentation
README.md
Comprehensive documentation covering contract roles, per-user Wallet proxy design, WalletImplementation logic, custody model, Arbitrum One deployment, security constraints, development commands, and licensing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A README hops into view,
With architecture clear and bright and true,
Smart contracts dancing in the light,
From Wallet proxies to safety's might,
Documentation complete—the ecosystem's right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main change: adding documentation (README) that covers contracts, architecture, and the trust model—all core elements of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan for PR comments
  • Generate coding plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
README.md (1)

73-79: Consider documenting the required toolchain versions.

A short note on the expected Node/Yarn version would make this setup section more reproducible for contributors.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 73 - 79, Update the "## Development" section in
README to state the required Node and Yarn versions and how to select them
(e.g., add a one-line note like "Requires Node X.Y.Z and Yarn A.B.C"), and also
add references to repository-tooling (create an .nvmrc with the Node version and
ensure package.json has an "engines" field for Node/Yarn) so contributors can
reproduce the environment; locate the "## Development" heading and the listed
commands (yarn install, yarn hardhat compile, yarn hardhat test) and append the
version note and brief instructions for using nvm or yarn version managers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 58-61: Update the README table to replace the placeholder entries
for Stack.sol and WalletImplementation.sol with the actual Arbiscan contract
URLs; locate the table rows referencing "Stack.sol" and
"WalletImplementation.sol" and paste the correct Arbiscan links (or verified
contract addresses formatted as Arbiscan URLs) so readers can directly verify
the deployed trust-layer contracts.
- Around line 38-48: The fenced diagram block in README.md is missing a language
tag which triggers markdownlint; update the opening triple-backtick for the
architecture diagram to include a language tag (e.g., text) so the block starts
with ```text, leaving the diagram content (lines like "User Wallet (EOA)",
"Wallet.sol (proxy, per user)", "WalletImplementation.sol (logic)", "Aave",
"Uniswap V2", "Stack.sol") unchanged.

---

Nitpick comments:
In `@README.md`:
- Around line 73-79: Update the "## Development" section in README to state the
required Node and Yarn versions and how to select them (e.g., add a one-line
note like "Requires Node X.Y.Z and Yarn A.B.C"), and also add references to
repository-tooling (create an .nvmrc with the Node version and ensure
package.json has an "engines" field for Node/Yarn) so contributors can reproduce
the environment; locate the "## Development" heading and the listed commands
(yarn install, yarn hardhat compile, yarn hardhat test) and append the version
note and brief instructions for using nvm or yarn version managers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d5313ba7-ed84-484c-8e33-46132901d1b3

📥 Commits

Reviewing files that changed from the base of the PR and between c25c41b and e3424d3.

📒 Files selected for processing (1)
  • README.md

Comment on lines +38 to +48
```
User Wallet (EOA)
└── Wallet.sol (proxy, per user)
└── WalletImplementation.sol (logic)
├── Aave (lending/borrowing)
├── Uniswap V2 (swaps)
└── Stack.sol (registry + access control)
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language tag to the architecture fence.

markdownlint will keep flagging this block until the fence is annotated. text is enough if you just want a plaintext diagram.

Suggested fix
-```
+```text
 User Wallet (EOA)
     │
     └── Wallet.sol (proxy, per user)
             │
             └── WalletImplementation.sol (logic)
                     │
                     ├── Aave (lending/borrowing)
                     ├── Uniswap V2 (swaps)
                     └── Stack.sol (registry + access control)
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 38-38: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 38 - 48, The fenced diagram block in README.md is
missing a language tag which triggers markdownlint; update the opening
triple-backtick for the architecture diagram to include a language tag (e.g.,
text) so the block starts with ```text, leaving the diagram content (lines like
"User Wallet (EOA)", "Wallet.sol (proxy, per user)", "WalletImplementation.sol
(logic)", "Aave", "Uniswap V2", "Stack.sol") unchanged.

Comment on lines +58 to +61
| Contract | Address |
|----------|---------|
| Stack.sol | *(add Arbiscan link)* |
| WalletImplementation.sol | *(add Arbiscan link)* |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Replace the deployment placeholders before merge.

This README frames the contracts as the trust layer, so shipping it without the actual Arbitrum addresses blocks readers from verifying what is deployed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 58 - 61, Update the README table to replace the
placeholder entries for Stack.sol and WalletImplementation.sol with the actual
Arbiscan contract URLs; locate the table rows referencing "Stack.sol" and
"WalletImplementation.sol" and paste the correct Arbiscan links (or verified
contract addresses formatted as Arbiscan URLs) so readers can directly verify
the deployed trust-layer contracts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant