Skip to content

Documentation improvements and typo corrections #200

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

Open
wants to merge 4 commits into
base: router
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

- **ProtocolAdapter** is a special contract for every protocol. Its main purpose is to wrap all the protocol interactions.
There are different types of protocol adapters:
- "Asset" adapter returns the amount of the account's tokens held on the protocol and the
- "Asset" adapter returns the amount of the account's tokens held on the protocol.
- "Debt" adapter returns the amount of the account's debt to the protocol.

Some protocols do not use "simple" ERC20 tokens but instead have complex derivatives, for example the Compound protocol has CTokens.
The **ProtocolAdapter** contract also provides information about the type of tokens used within it.

- **TokenAdapter** is a contract for every derivative token type (e.g cTokens, aTokens, yTokens, etc.)
- **TokenAdapter** is a contract for every derivative token type (e.g cTokens, aTokens, yTokens, etc.).
Its main purpose is to provide ERC20-style token metadata as well as information about the underlying ERC20 tokens (like DAI for cDAI).
Namely, it provides addresses, types and rates of underlying tokens.

Expand Down
2 changes: 1 addition & 1 deletion docs/creating-your-adapters/interactive-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ Remove names of unused arguments.

Use `npx prettier ./contracts/**/*.sol --write` to fix linter issues.

Add tests for interactions it `test/` directory, use Uniswap, Weth, and other required adapters.
Add tests for interactions in `test/` directory, use Uniswap, WETH, and other required adapters.
6 changes: 3 additions & 3 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ on the [api.zerion.eth](https://etherscan.io/address/0x06fe76b2f432fdfecaef1a7d4
}]
```

## Make sense of tokens like `UNI-V1 ETH-cDAI`
## Make sense of tokens like `UNI-V1` and `ETH-cDAI`

<p align="center">
<img src="https://i.ibb.co/ZHq39S3/derivatives.png" width="650">
Expand All @@ -79,7 +79,7 @@ Sometimes, a DeFi token contains several other tokens, and to calculate their pr
getFinalFullTokenBalance('0x34E89740adF97C3A9D3f63Cc2cE4a914382c230b', "Uniswap V1 Pool Token")
```

and fetch the decomposition of UNI-token into ERC20 tokens, like `ETH` and `DAI`
and fetch the decomposition of UNI token into ERC20 tokens, like `ETH` and `DAI`

```javascript
0.98 ETH
Expand All @@ -95,7 +95,7 @@ In case you want to get account balances across all supported DeFi protocols, yo
getBalances('0x0ef51b7dac3933b8109482e7d910c21848e45da0f')
```

and obtain all balances for a given account. The response from the smart-contract will contain information about each of the protocols
and obtain all balances for a given account. The response from the smart contract will contain information about each of the protocols

```javascript
100 DAI // collateral on Compound
Expand Down
2 changes: 1 addition & 1 deletion docs/reading.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The following object is an example of the `ProtocolBalance` struct.
{
info: {
token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
name: "USD//C",
name: "USDC",
symbol: "USDC",
decimals: 6
},
Expand Down