bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 1쪽
# Welcome to Maple
Founded in 2019 and led by a team of former bankers and credit investment professionals aiming to improve upon legacy capital markets, Maple is a leading digital asset lending platform, empowering the digital asset economy with secure, innovative lending solutions.\
\
Maple combines industry-standard compliance and due diligence with the transparent and frictionless lending enabled by smart contracts and blockchain technology. Maple is the gateway to growth for financial institutions and companies seeking capital onchain.\
\
Maple yield is primarily generated from fixed rate, overcollateralized loans to institutional borrowers, supported by DeFi liquidity provision and futures basis trading. These short duration loans enable Maple to provide consistent high yield and short term liquidity for users. The strategy has a track record of yield outperformance compared to leading DeFi lending protocols.
Syrup makes Maple's institutional lending marketplace available to all through DeFi.
{% hint style="info" %}
**Links:**
* Website: <https://maple.finance/>
* Telegram: <https://t.me/maplefinance>
* Twitter: <https://twitter.com/maplefinance>
* LinkedIn: <https://www.linkedin.com/company/maplefinance/>
* Dune Dashboard: <https://dune.com/maple-finance/maple-finance>
* Token Terminal Dashboard: <https://tokenterminal.com/terminal/projects/maple-finance>
* Messari: <https://messari.io/project/syrup>
* Coin Market Cap: <https://coinmarketcap.com/currencies/maple-finance/>
* Coin Gecko: <https://www.coingecko.com/en/coins/maple-finance>
* DeFi Llama: <https://defillama.com/protocol/maple-finance>
* YouTube: <https://www.youtube.com/channel/UCXJPzNcN_kSXj82EfRrV1pQ>
{% endhint %}
# Get Started
syrupUSDC & syrupUSDT are ERC-4626 vaults generating sustainable high yields primarily from overcollateralized institutional loans and additional yield strategies.
{% hint style="info" %}
**⚡️ Speed Up Your Integration**
Add the Maple Docs MCP server to your IDE for faster, context-aware development.
[](cursor://anysphere.cursor-deeplink/mcp/install?name=maple-docs\&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vZG9jcy5tYXBsZS5maW5hbmNlL35naXRib29rL21jcCJ9) [](vscode:mcp/install?%7B%22name%22%3A%22maple-docs%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.maple.finance%2F~gitbook%2Fmcp%22%7D) [More Setup Options](/integrate/technical-resources/configure-mcp-server)
{% endhint %}
## Ethereum Mainnet
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><p><strong>Asset Integration</strong></p><p>List or accept syrupUSDC & syrupUSDT as collateral or liquidity in your protocol. Find contract addresses and price oracles.</p></td><td></td><td><a href="https://2107472351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLg9y0GYo0LxapRXEes%2Fuploads%2Fgit-blob-61c07d5aa943c9d08377ae6ec59cbf18cecb01ed%2FFrontend_integration.png?alt=media">Frontend_integration.png</a></td><td><a href="/integrate/ethereum-mainnet/asset-integration">Asset Integration: Ethereum Mainnet</a></td></tr><tr><td><p><strong>Frontend Integration</strong></p><p>Enable syrupUSDC & syrupUSDT deposits and withdrawals in your app via SDK/API. For wallets, apps, DEXes, custody solutions etc.</p></td><td></td><td><a href="https://2107472351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLg9y0GYo0LxapRXEes%2Fuploads%2Fgit-blob-aa4aef509ad7485037e02a2d0d771c56f323cc7b%2FBackend_integration.png?alt=media">Backend_integration.png</a></td><td><a href="/integrate/ethereum-mainnet/frontend-integration">Frontend Integration</a></td></tr><tr><td><strong>Smart Contract Integration</strong></td><td>Deposit, withdraw, and compose with syrupUSDC & syrupUSDT at a contract level. For lending markets, DEXs, yield aggregators, and other DeFi protocols.</td><td><a href="https://2107472351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLg9y0GYo0LxapRXEes%2Fuploads%2Fgit-blob-785a7c86c931b2c8c9f418ff985f5ba0a120c42d%2FSmart_contract_integration.png?alt=media">Smart_contract_integration.png</a></td><td><a href="/integrate/ethereum-mainnet/smart-contract-integration">Smart Contract Integration</a></td></tr></tbody></table>
## Crosschain (Solana, L2s and others)
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><p><strong>Asset Integration</strong></p><p>Access syrupUSDC & syrupUSDT across multiple blockchains. Find contract addresses, price oracles, and bridge contracts.</p></td><td></td><td><a href="https://2107472351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLg9y0GYo0LxapRXEes%2Fuploads%2Fgit-blob-61c07d5aa943c9d08377ae6ec59cbf18cecb01ed%2FFrontend_integration.png?alt=media">Frontend_integration.png</a></td><td><a href="/integrate/crosschain/syrupusd-crosschain">Asset Integration: Crosschain</a></td></tr><tr><td><strong>syrupUSDC Mint/Redeem</strong></td><td>Enable syrupUSDC deposits and withdrawals in your app via CCIP on chains other than Ethereum. For wallets, apps, DEXes, custody solutions etc.</td><td><a href="https://2107472351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLg9y0GYo0LxapRXEes%2Fuploads%2Fgit-blob-23031478fd33cebdc77d1a596c31bf7549def47f%2FSyrupUSD_crosschain.png?alt=media">SyrupUSD_crosschain.png</a></td><td><a href="/integrate/crosschain/syrupusdc-native-mint-redeem">syrupUSDC Native Mint/Redeem</a></td></tr></tbody></table>
# Ethereum Mainnet
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><p><strong>Asset Integration</strong></p><p>List or accept syrupUSDC & syrupUSDT as collateral, liquidity in your protocol. Find contract addresses and price oracles.</p></td><td></td><td><a href="https://2107472351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLg9y0GYo0LxapRXEes%2Fuploads%2Fgit-blob-61c07d5aa943c9d08377ae6ec59cbf18cecb01ed%2FFrontend_integration.png?alt=media">Frontend_integration.png</a></td><td><a href="/syrupusdc-usdt-usdg-for-lenders/new-wallets">New Wallets</a></td></tr><tr><td><p><strong>Frontend Integrations</strong></p><p>Enable your users to deposit into syrupUSDC & syrupUSDT through your own app. Manage deposits programmatically. For wallets, exchanges, custody solutions etc.</p></td><td></td><td><a href="https://2107472351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLg9y0GYo0LxapRXEes%2Fuploads%2Fgit-blob-aa4aef509ad7485037e02a2d0d771c56f323cc7b%2FBackend_integration.png?alt=media">Backend_integration.png</a></td><td><a href="/integrate/ethereum-mainnet/frontend-integration">Frontend Integration</a></td></tr><tr><td><strong>Smart Contract Integrations</strong></td><td>Integrate syrupUSDC & syrupUSDT into your protocol. For DeFi protocols composing with syrupUSD at the contract level. For lending markets, DEXs, aggregators etc.</td><td><a href="https://2107472351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLg9y0GYo0LxapRXEes%2Fuploads%2Fgit-blob-785a7c86c931b2c8c9f418ff985f5ba0a120c42d%2FSmart_contract_integration.png?alt=media">Smart_contract_integration.png</a></td><td><a href="/integrate/ethereum-mainnet/smart-contract-integration">Smart Contract Integration</a></td></tr></tbody></table>
# Asset Integration: Ethereum Mainnet
List or accept syrupUSDC, syrupUSDT & syrupUSDG as collateral or liquidity in your protocol.
syrupUSDC, syrupUSDT and syrupUSDG are ERC-4626 vault tokens on Ethereum mainnet. This page covers token addresses and three methods for obtaining pricing data.
### Token addresses
{% tabs %}
{% tab title="Mainnet" %}
<table><thead><tr><th width="171.50872802734375">Token</th><th>Address</th></tr></thead><tbody><tr><td>syrupUSDC</td><td><a href="https://etherscan.io/token/0x80ac24aa929eaf5013f6436cda2a7ba190f5cc0b">0x80ac24aA929eaF5013f6436cdA2a7ba190f5Cc0b</a></td></tr><tr><td>syrupUSDT</td><td><a href="https://etherscan.io/token/0x356b8d89c1e1239cbbb9de4815c39a1474d5ba7d">0x356b8d89c1e1239cbbb9de4815c39a1474d5ba7d</a></td></tr><tr><td>syrupUSDG</td><td><a href="https://etherscan.io/token/0x87b65c4aaffa76881f9e96f3e7ed945ddfc3cd7a">0x87b65C4aAFFA76881f9E96F3e7ED945ddFC3Cd7A</a></td></tr></tbody></table>
{% endtab %}
{% tab title="Testnet (Sepolia)" %}
<table><thead><tr><th width="174.407958984375">Token</th><th>Address</th></tr></thead><tbody><tr><td>syrupUSDC</td><td><a href="https://sepolia.etherscan.io/token/0x2d8d21fee98d060655729efd7b14bc432c375ac1">0x2d8d21fee98d060655729efd7b14bc432c375ac1</a></td></tr><tr><td>syrupUSDT</td><td><a href="https://sepolia.etherscan.io/token/0x7679cbe9ae66298114ac6dac73487b63ac023c0b">0x7679cbe9ae66298114ac6dac73487b63ac023c0b</a></td></tr><tr><td>syrupUSDG</td><td><a href="https://sepolia.etherscan.io/token/0x0f40d60293433a64bb8da7e4dfd9d13399ed319e">0x0f40d60293433a64bb8da7e4dfd9d13399ed319e</a></td></tr></tbody></table>
{% endtab %}
{% endtabs %}
### Pricing
#### Option 1: Smart contract (ERC-4626)
syrupUSDC, syrupUSDT and syrupUSDG use the ERC-4626 tokenized vault standard. You can query the token price directly from the contract using two functions:
1. **`convertToAssets(uint256 shares_)`** - Returns the amount of underlying assets (USDC/USDT) that would be received for a given number of shares. Use this for display purposes and general price calculations.
2. **`convertToExitAssets(uint256 shares_)`** - Returns the amount of underlying assets accounting for any unrealized losses in the pool. Use this when calculating actual redemption values.
All three tokens use 6 decimals. To get the price per token, call either function with `1000000` (1 share):
{% tabs %}
{% tab title="Solidity" %}
```solidity
uint256 pricePerShare = ISyrupToken(syrupUSDC).convertToAssets(1000000);
```
{% endtab %}
{% tab title="Ethers" %}
```javascript
const syrupUSDC = new ethers.Contract(
"0x80ac24aA929eaF5013f6436cdA2a7ba190f5Cc0b",
["function convertToAssets(uint256) view returns (uint256)"],
provider
);
const price = await syrupUSDC.convertToAssets(1000000n); // 1 share
```
{% endtab %}
{% tab title="Viem" %}
```typescript
import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';
const client = createPublicClient({
chain: mainnet,
transport: http()
});
const price = await client.readContract({
address: '0x80ac24aA929eaF5013f6436cdA2a7ba190f5Cc0b',
abi: [{ inputs: [{ type: 'uint256' }], name: 'convertToAssets', outputs: [{ type: 'uint256' }], stateMutability: 'view', type: 'function' }],
functionName: 'convertToAssets',
args: [1000000n]
});
```
{% endtab %}
{% tab title="Python" %}
```python
# web3.py
from web3 import Web3
w3 = Web3(Web3.HTTPProvider("https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY"))
abi = [{"inputs":[{"type":"uint256"}],"name":"convertToAssets","outputs":[{"type":"uint256"}],"stateMutability":"view","type":"function"}]
contract = w3.eth.contract(address="0x80ac24aA929eaF5013f6436cdA2a7ba190f5Cc0b", abi=abi)
price = contract.functions.convertToAssets(1000000).call()
```
{% endtab %}
{% endtabs %}
#### Option 2: Pyth Oracle
Pyth Network provides low-latency, high-fidelity price feeds for syrupUSDC and syrupUSDT. Pyth calculates pricing using the smart contract ERC-4626 functions.
**Feed IDs**
<table><thead><tr><th width="164.24737548828125">Token</th><th>Price Feed ID</th></tr></thead><tbody><tr><td>syrupUSDC/USDC</td><td><code>0x2ad31d1c4a85fbf2156ce57fab4104124c5ef76a6386375ecfc8da1ed5ce1486</code></td></tr><tr><td>syrupUSDT/USDT</td><td><code>0x7e10170c23d7df62d301b2ade26854200ee584f3f3b84cb2e5195adf35c5b97f</code></td></tr></tbody></table>
**Contract addresses**
<table><thead><tr><th width="156.80816650390625">Network</th><th>Pyth Contract</th></tr></thead><tbody><tr><td>Ethereum</td><td><a href="https://etherscan.io/address/0x4305fb66699c3b2702d4d05cf36551390a4c69c6">0x4305FB66699C3B2702D4d05CF36551390A4c69C6</a></td></tr><tr><td>Sepolia Testnet</td><td><a href="https://sepolia.etherscan.io/address/0xDd24F84d36BF92C65F92307595335bdFab5Bbd21">0xDd24F84d36BF92C65F92307595335bdFab5Bbd21</a></td></tr></tbody></table>
**Get price from Pyth**
{% tabs %}
{% tab title="Offchain" %}
**Offchain: Fetch price from Pyth Hermes API**
**bash**
```bash
# Get latest syrupUSDC price
curl "https://hermes.pyth.network/v2/updates/price/latest?ids[]=0x2ad31d1c4a85fbf2156ce57fab4104124c5ef76a6386375ecfc8da1ed5ce1486"
```
**javascript**
```javascript
const feedId = "0x2ad31d1c4a85fbf2156ce57fab4104124c5ef76a6386375ecfc8da1ed5ce1486";
const response = await fetch(
`https://hermes.pyth.network/v2/updates/price/latest?ids[]=${feedId}`
);
const data = await response.json();
const priceData = data.parsed[0].price;
const price = Number(priceData.price) * Math.pow(10, priceData.expo);
```
{% endtab %}
{% tab title="Onchain" %}
**Onchain: Read price from Pyth contract**
```solidity
import "@pythnetwork/pyth-sdk-solidity/IPyth.sol";
import "@pythnetwork/pyth-sdk-solidity/PythStructs.sol";
contract MyContract {
IPyth pyth = IPyth(0x4305FB66699C3B2702D4d05CF36551390A4c69C6);
bytes32 constant SYRUP_USDC_FEED = 0x2ad31d1c4a85fbf2156ce57fab4104124c5ef76a6386375ecfc8da1ed5ce1486;
function getSyrupUSDCPrice(bytes[] calldata priceUpdateData) public payable returns (int64) {
uint fee = pyth.getUpdateFee(priceUpdateData);
pyth.updatePriceFeeds{value: fee}(priceUpdateData);
PythStructs.Price memory price = pyth.getPrice(SYRUP_USDC_FEED);
return price.price;
}
}
```
{% endtab %}
{% endtabs %}
See [Pyth documentation](https://docs.pyth.network/price-feeds/core/getting-started) for complete integration guides.
#### Option 3: CoinGecko / CoinMarketCap APIs
CoinGecko and CoinMarketCap track syrupUSDC and syrupUSDT prices via DEX pool data. These prices can fluctuate with onchain swaps, so we recommend Options 1 & 2.
* [CoinGecko API](https://docs.coingecko.com/)
* [CoinMarketCap API](https://coinmarketcap.com/api/documentation/v1/)
### Which price to use
<table><thead><tr><th width="308.9521484375">Use case</th><th>Recommended method</th></tr></thead><tbody><tr><td>DeFi protocols requiring oracle feeds</td><td>Option 1 (ERC-4626 functions) or Option 2 (Pyth)</td></tr><tr><td>Frontend display / portfolios</td><td>Option 1 (ERC-4626 functions) or Option 2 (Pyth)</td></tr><tr><td>Smart contract integrations</td><td>Option 1 (ERC-4626 functions)</td></tr></tbody></table>
### Resources & contact
* Partnerships & queries: <partnerships@maple.finance>
* [Pyth Price Feeds](https://docs.pyth.network/price-feeds)
* [CoinGecko API](https://docs.coingecko.com/)
* [CoinMarketCap API](https://coinmarketcap.com/api/documentation/v1/)
# Frontend Integration
Enable your users to deposit into syrupUSDC, syrupUSDT & syrupUSDG from your app via SDK/API on Ethereum mainnet. For wallets, apps, DEXes, custody solutions etc.
{% hint style="info" %}
**Step-by-step**
**Deposit**:
1. [**Query the Maple API**](#id-1.-query-the-maple-api) to retrieve the necessary contract addresses.
2. [**Determine user authorization**](#id-2.-determine-user-authorization) as a Syrup lender.
3. [**Retrieve an authorization signature**](#id-3.-retrieve-authorization-signature) from the Maple API
4. [**Execute the Deposit**](#id-4.-execute-the-deposit) (authorize and deposit, or deposit only).
**Withdrawal**:
1. [**Retrieve Pool Position**](#id-1.-retrieve-pool-position) from the Maple API
2. [**Calculate Shares to Redeem**](#id-2.-calculate-shares-to-redeem) from the Pool contract
3. [**Execute the Withdrawal**](#id-3.-execute-the-withdrawal) on the Pool contract
4. [**Await Withdrawal Completion**](#id-4.-await-withdrawal-completion)
{% endhint %}
## SDK and GraphQL API
All necessary ABIs and addresses are available in the Maple SDK or via GitHub:
* [**Maple JS GitHub (ABIs)**](https://github.com/maple-labs/maple-js/tree/main/src/abis)
* [**Maple JS GitHub (Addresses)**](https://github.com/maple-labs/maple-js/tree/main/src/addresses)
Within the SDK, both ABIs and network-specific addresses are accessible. The package can also be installed and used within applications.
{% tabs %}
{% tab title="npm" %}
```sh
npm install @maplelabs/maple-js
```
{% endtab %}
{% tab title="yarn" %}
```sh
yarn add @maplelabs/maple-js
```
{% endtab %}
{% tab title="pnpm" %}
```sh
pnpm add @maplelabs/maple-js
```
{% endtab %}
{% endtabs %}
To access the necessary data, use the GraphQL API:
{% tabs %}
{% tab title="Mainnet" %}
`https://api.maple.finance/v2/graphql`
{% endtab %}
{% tab title="Sepolia" %}
`https://sepolia.api.maple.finance/v2/graphql`
{% endtab %}
{% endtabs %}
**NOTE**: In order to perform the integration in Sepolia, you'll need to contact us at <partnerships@maple.finance> to receive Sepolia `USDC`/`USDT`/`USDG` tokens.
## Deposit
### 1. Query the Maple API
Syrup's main contract, the `SyrupRouter`, is designed to allow authorized participants to securely access the yields available in the Maple ecosystem, abstracting all the complexity of the permissioning system. Each Syrup `PoolV2` has an associated `SyrupRouter`.
{% tabs %}
{% tab title="Mainnet" %}
**syrupUSDC**
<table><thead><tr><th width="224.8125">Contract</th><th>Address</th></tr></thead><tbody><tr><td>PoolV2</td><td><a href="https://etherscan.io/address/0x80ac24aA929eaF5013f6436cdA2a7ba190f5Cc0b">0x80ac24aA929eaF5013f6436cdA2a7ba190f5Cc0b</a></td></tr><tr><td>SyrupRouter</td><td><a href="https://etherscan.io/address/0x134cCaaA4F1e4552eC8aEcb9E4A2360dDcF8df76">0x134cCaaA4F1e4552eC8aEcb9E4A2360dDcF8df76</a></td></tr><tr><td>WithdrawalManagerQueue</td><td><a href="https://etherscan.io/address/0x1bc47a0Dd0FdaB96E9eF982fdf1F34DC6207cfE3">0x1bc47a0Dd0FdaB96E9eF982fdf1F34DC6207cfE3</a></td></tr></tbody></table>
**syrupUSDT**
<table><thead><tr><th width="224.6953125">Contract</th><th>Address</th></tr></thead><tbody><tr><td>PoolV2</td><td><a href="https://etherscan.io/address/0x356B8d89c1e1239Cbbb9dE4815c39A1474d5BA7D">0x356B8d89c1e1239Cbbb9dE4815c39A1474d5BA7D</a></td></tr><tr><td>SyrupRouter</td><td><a href="https://etherscan.io/address/0xF007476Bb27430795138C511F18F821e8D1e5Ee2">0xF007476Bb27430795138C511F18F821e8D1e5Ee2</a></td></tr><tr><td>WithdrawalManagerQueue</td><td><a href="https://etherscan.io/address/0x86eBDf902d800F2a82038290B6DBb2A5eE29eB8C">0x86eBDf902d800F2a82038290B6DBb2A5eE29eB8C</a></td></tr></tbody></table>
**syrupUSDG**
<table><thead><tr><th width="224.6953125">Contract</th><th>Address</th></tr></thead><tbody><tr><td>PoolV2</td><td><a href="https://etherscan.io/address/0x87b65C4aAFFA76881f9E96F3e7ED945ddFC3Cd7A">0x87b65C4aAFFA76881f9E96F3e7ED945ddFC3Cd7A</a></td></tr><tr><td>SyrupRouter</td><td><a href="https://etherscan.io/address/0x191ac16255f49F7C6cB2e3b2502064A805943849">0x191ac16255f49F7C6cB2e3b2502064A805943849</a></td></tr><tr><td>WithdrawalManagerQueue</td><td><a href="https://etherscan.io/address/0xAf63C06970086d535F338565D77c5fA3bDC5fD79">0xAf63C06970086d535F338565D77c5fA3bDC5fD79</a></td></tr></tbody></table>
{% endtab %}
{% tab title="Sepolia" %}
**syrupUSDC**
<table><thead><tr><th width="225.05078125">Contract</th><th>Address</th></tr></thead><tbody><tr><td>PoolV2</td><td><a href="https://sepolia.etherscan.io/address/0x2d8d21fee98d060655729efd7b14bc432c375ac1">0x2d8d21fee98d060655729efd7b14bc432c375ac1</a프로젝트로 돌아가기