docs: add README — contracts, architecture, trust model#2
docs: add README — contracts, architecture, trust model#2MiaMakesItHappen wants to merge 1 commit intostackitai:mainfrom
Conversation
- 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
WalkthroughA 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
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. Comment |
There was a problem hiding this comment.
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
| ``` | ||
| User Wallet (EOA) | ||
| │ | ||
| └── Wallet.sol (proxy, per user) | ||
| │ | ||
| └── WalletImplementation.sol (logic) | ||
| │ | ||
| ├── Aave (lending/borrowing) | ||
| ├── Uniswap V2 (swaps) | ||
| └── Stack.sol (registry + access control) | ||
| ``` |
There was a problem hiding this comment.
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.
| | Contract | Address | | ||
| |----------|---------| | ||
| | Stack.sol | *(add Arbiscan link)* | | ||
| | WalletImplementation.sol | *(add Arbiscan link)* | |
There was a problem hiding this comment.
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.
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
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