bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 13쪽
ategory) that will go to the Pool Delegate (actor).
## Fixed Term Loans
### Origination Fees
Origination fees are paid during Loan funding and refinance operations for fixed-term Loans. Origination fees are calculated in the following way:
* `delegateOriginationFee` is a loan term that is specified on loan instantiation as a nominal amount (e.g., `1_750 USDC`).
* `platformOriginationFeeRate` is a Governor-settable variable in globals that is settable on a Pool level. When a loan is funded, the origination fee amount to be paid is calculated using the following formula:
$$
\large \begin{align} \nonumber platformOriginationFee = platformOriginationFeeRate \times principal \times \frac{loanTermLength}{oneYear} \end{align}
$$
### Refinancing of Origination Fees
In the case of a refinance, two things happen with regards to origination fees:
1. The `delegateOriginationFee` amount can be updated by updating the fee terms as a part of the refinance (optionally). If no change is made, the same origination fee is used.
2. The `platformOriginationFee` is recalculated and saved based on the resulting terms of the refinance operation and the current `platformOriginationFeeRate` set in globals.
### Service Fees
Service fees are paid during loan payments. Service fees are calculated in the following way:
* `delegateServiceFee` is a loan term that is specified on loan instantiation as a nominal amount (e.g., `100 USDC`).
* `platformServiceFeeRate` is a Governor-settable variable in globals that is settable on a Pool level. When a loan is funded, the service fee amount to be paid is calculated using the following formula:
$$
\large \begin{align} \nonumber platformServiceFee = platformServiceFeeRate \times principal \times \frac{paymentIntervalLength}{oneYear} \end{align}
$$
Both of these values are saved in mappings in the MapleLoanFeeManager and used for all payments for a loan until it either refinances or matures.
### Refinancing of Service Fees
In the case of a refinance, three things happen with regards to service fees:
1. The `delegateServiceFee` amount can be updated by updating the fee terms as a part of the refinance (optionally). If no change is made, the same service fee is used.
2. The platform service fee is recalculated and saved based on the resulting terms of the refinance operation and the current `platformServiceFeeRate` set in globals. This is done using the same formula:
$$
\large \begin{align} \nonumber platformServiceFee = platformServiceFeeRate \times principal \times \frac{paymentIntervalLength}{oneYear} \end{align}
$$
3. The platform and delegate service fee amounts that have accrued between the last payment due date and the refinance are saved in the FeeManager as `platformRefinanceServiceFee` and `delegateRefinanceServiceFee` using the following formula:
$$
\large \begin{align} \nonumber refinanceServiceFee = serviceFee \times \frac{(timestamp - lastPaymentDueDate)}{paymentInterval} \end{align}
$$
## Open Term Loans
### Service Fees
Service fees are paid during loan payments. Service fees are calculated in the following way:
* `delegateServiceFeeRate` is a loan term that is specified on loan instantiation as an annualized rate scaled by `1e6` (the `HUNDRED_PERCENT` constant). It is a rate, not a nominal currency amount (e.g., `100_000` = 10%).
* `platformServiceFeeRate` is a Governor-settable variable in globals that is settable on a Pool level. When a loan is funded, the service fee amount to be paid is calculated using the following formula for both the delegate and platform service fees:
$$
\large \begin{align} \nonumber platformServiceFee = platformServiceFeeRate \times principal \times \frac{Interval}{oneYear} \end{align}
$$
$$
\large \begin{align} \nonumber delegateServiceFee = delegateServiceFeeRate \times principal \times \frac{Interval}{oneYear} \end{align}
$$
Both of these values are saved in storage of the Loan contract and used for all payments for a loan until it either refinances or matures.
### Refinancing of Service Fees
In the case of a refinance, three things happen with regards to service fees:
1. The `delegateServiceFeeRate` can be updated by updating the fee terms as a part of the refinance (optionally). If no change is made, the same service fee is used.
2. The platform service fee is recalculated and saved based on the resulting terms of the refinance operation and the current `platformServiceFeeRate` set in globals.
Both are done using the same formula:
$$
\large \begin{align} \nonumber platformServiceFee = platformServiceFeeRate \times principal \times \frac{Interval}{oneYear} \end{align}
$$
$$
\large \begin{align} \nonumber delegateServiceFee = delegateServiceFeeRate \times principal \times \frac{Interval}{oneYear} \end{align}
$$
3. The platform and delegate service fee amounts that have accrued between the last payment or funding (whichever is greatest) and the refinance are paid during the refinance using the following formula:
$$
\large \begin{align} \nonumber refinanceServiceFee = serviceFee \times \frac{(timestamp - \max(datePaid, dateFunded))}{paymentInterval} \end{align}
$$
## Management Fees
Management fees are paid during loan payments, after a loan's interest has moved out of the loan and into the Pool contracts. Management fees are deducted from gross interest paid by borrowers using the following formula:
$$
\large \begin{align} \nonumber managementFee = grossInterest \times managementFeeRate \end{align}
$$
The remainder of the interest (net interest) goes to the Liquidity Providers.
Note Management fees are treated the same for both fixed-term and open-term loans.
# Composability
This section contains a brief overview of certain ERC standards that have been adopted in order to allow for a greater degree of composability between the Maple protocol and the rest of the Ethereum ecosystem:
| Contract Standard | Usage |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [`ERC-20`](https://eips.ethereum.org/EIPS/eip-20) | Used by the `Pool` to facilitate fungible token interactions. |
| [`ERC-1967`](https://eips.ethereum.org/EIPS/eip-1967) | Used by all upgradeable contracts in the Maple protocol that are deployed using `MapleProxyFactory` or `NonTransparentProxy`. |
| [`ERC-2612`](https://eips.ethereum.org/EIPS/eip-2612) | Used by the `Pool` to facilitate `permit` functionality for fungible token interactions. |
| [`ERC-4626`](https://eips.ethereum.org/EIPS/eip-4626) | Used by the `Pool` to facilitate easier integrations with protocols that want to interact with yield bearing fungible tokens. |
# Proxies and Upgradeability
## Overview
Across the protocol, many proxy contracts are used, incorporating upgradeability functionality. These contracts are deployed using the same pattern, governed by the MapleProxyFactory contract. This is a generic factory contract that deploys proxies and manages their implementations under Governor control (the on‑chain `GovernorTimelock`). This pattern has multiple benefits as listed below.
#### Cheaper deployment of contracts
Since proxies are being deployed instead of full contracts, the gas cost of contract deployment goes down significantly. This is because the bytecode size of the proxy smart contracts is much smaller than its corresponding implementation.
#### Single factory contract can manage many versions
Since the proxies are deployed from a central factory contract, this contract can be allowlisted in `MapleGlobals` once by the Governor (via the timelock), and then can be used for many versions afterwards. The Governor manages all versions that are to be used by contracts deployed by a given factory, so upgrades can only happen to implementation contracts that have been vetted and approved through the governance process.
It is also beneficial from an events perspective to use a single contract for the factory, as all creation events will come from the same address. For a new version of a contract to be used a new implementation must be deployed, and the implementation must be registered and tied to a version by the Governor. Once that is done, all subsequent contracts deployed from the factory will use that version.
## Version Management
In order to manage versions in the `MapleProxyFactory`, the following actions are performed by the Governor (via the `GovernorTimelock`):
* **Add a new version**: Once an implementation is deployed, that implementation can be registered in the context of the factory and tied to a version identifier.
* **Enable/Disable upgrade path**: If it is determined to be entirely safe to upgrade a deployed proxy instance from one implementation to another, the upgrade path can be added to the factory by the Governor. Only then can upgrades be performed by authorized admins from one version to another.
* **Set the default version**: The default version is the version that is used for all deployments of contracts. This means that if it is decided that an older version is preferable, it can be set and all new deployments will be at the old version. It also means that the factory can be paused by the Governor if the default version is set to zero, since that will return a null implementation which will prevent the deployment of new contracts.
### Governance, Allowlisting, and Timelocks
* Factories are allowlisted in Globals using `setValidInstanceOf("<FACTORY_KEY>", <factoryAddress>, true)` and deploy permissions are granted per account using `setCanDeployFrom(<factoryAddress>, <account>, true)`. Note: `setValidPoolDeployer` is deprecated for enabling deployers and should not be used for that purpose.
* Governor‑privileged actions (e.g., adding versions, enabling upgrade paths, setting defaults) must be scheduled and executed via the `GovernorTimelock` (schedule → delay → execution window).
* Certain contract upgrades initiated by pool‑level admins (e.g., Pool Delegate) require a valid scheduled call recorded in Globals before execution. The Security Admin may have direct execution rights depending on the contract ACLs.
### Proxy Deployment
Below is a diagram outlining the smart contract architecture and calls used for factories. It should be noted that the `_initialize` functionality was intentionally moved to a separate smart contract so that the same "initializer" could be used across many versions, and so that "migrators" could be used, instead of "initializers", when upgrading from one implementation to another. Effectively, an "initializer" is a very specific "migrator", in that is sets up the storage of a contract that went from *no* implementation, to some specific implementation.

## Proxy Upgrades
Below is a diagram outlining the process for upgrading a proxy contract. When an upgrade is performed the following occurs:
1. An authorized admin calls `upgrade()` on the Proxy (e.g., Pool Delegate via a valid scheduled call, or Security Admin where permitted by the contract ACLs).
2. Proxy delegatecalls `upgrade()` to v2.0.0 implementation.
3. `upgrade()` calls the relevant Factory to do `upgradeInstance()`, which checks that this is a valid upgrade path.
4. `upgradeInstance()` calls `setImplementation()` on the Proxy.
5. Proxy delegatecalls `setImplementation()` to the current implementation, which updates the implementation address in Proxy storage at `IMPLEMENTATION_SLOT` to the target implementation address.
6. `upgradeInstance()` calls `migrate()` on the Proxy.
7. Proxy delegatecalls `migrate()` to the v3.0.0 implementation.
8. v3.0.0 implementation delegatecalls `migrate()` to the Migrator, which updates any storage necessary in the Proxy to finalize the upgrade.

### Note on MapleLoan Implementation
The MapleLoan contract, during a refinancing, performs a `delegatecall`, which is a dangerous operation. One common concern is that someone would be able to access those functions in the implementation contract and do something like a `selfdestruct`, which would destroy all existing loans. However, this is not possible, since all functions in the Loan that perform such calls are access controlled, meaning that they would always fail being called directly in the implementation because all storage is empty. Access-control storage variables cannot be altered in the implementation itself because of the fact that Initializer contracts are used. The `initialize` functionality of the implementation is performed outside of the implementation itself.
# Security Overview: Maple Smart Contracts
# Security Architecture & Audits
## Audits
### December 2022 Release
The Maple protocol contracts went through 3 audits during its development for the December 2022 release, details of which you can find below. All relevant issues identified by auditors were addressed prior to the launch of V2.
| Auditor | Report Link |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Trail of Bits | [`2022-08 - Trail of Bits Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2022-december/TrailOfBits-Maple.pdf) |
| Spearbit | [`2022-10 - Spearbit Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2022-december/Spearbit-maple.pdf) |
| Three Sigma | [`2022-10 - Three Sigma Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2022-december/Three-Sigma-Maple-Finance-Dec-2022.pdf) |
### June 2023 Release
The Maple protocol contracts went through 2 audits during its development for the June 2023 release, details of which you can find below. All relevant issues identified by auditors were addressed prior to release.
| Auditor | Report Link |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Spearbit Auditors via Cantina | [`2023-06 - Cantina Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2023-june/Cantina-Maple.pdf) |
| Three Sigma | [`2023-04 - Three Sigma Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2023-june/Three-Sigma-Maple-Finance-Jun-2023.pdf) |
### December 2023 Release
The Maple protocol contracts went through 2 audits during its development for the December 2023 release. Details of these audits can be found below, and all relevant issues identified by auditors were addressed prior to release.
| Auditor | Report Link |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Three Sigma | [`2023-11 - Three Sigma Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2023-december/Three-Sigma-Maple-Finance-Dec-2023.pdf) |
| 0xMacro | [`2023-11 - 0xMacro Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2023-december/0xMacro-Maple-Finance-Dec-2023.pdf) |
### August 2024 Release
The Maple & Syrup protocol contracts went through 2 audits during its development for the August 2024 release. Details of these audits can be found below, and all relevant issues identified by auditors were addressed prior to release.
| Auditor | Report Link |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Three Sigma | [`2024-08 - Three Sigma Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2024-august/Three-Sigma-Maple-Finance-Aug-2024.pdf) |
| 0xMacro | [`2024-08 - 0xMacro Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2024-august/0xMacro-Maple-Finance-Aug-2024.pdf) |
| ThreeSigma (Router) | [`2024-05 - Three Sigma Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2024-august/Three-Sigma-Maple-Finance-Aug-2024-Syrup.pdf) |
### December 2024 Release
The Maple & Syrup protocol contracts went through 2 audits during its development for the December 2024 release. Details of these audits can be found below, and all relevant issues identified by auditors were addressed prior to release.
| Auditor | Report Link |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Three Sigma | [`2024-12 - Three Sigma Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2024-december/Three-Sigma-Maple-Finance-Dec-2024%20.pdf) |
| 0xMacro | [`2024-12 - 0xMacro Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2024-december/0xMacro-Maple-Finance-Dec-2024.pdf) |
### September 2025 Release
This release is for the Governor Timelock Contract upgrade. The Maple protocol contracts went through 2 audits during its development for the September 2025 release. Details of these audits can be found below, and all relevant issues identified by auditors were addressed prior to release.
| Auditor | Report Link |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Sherlock | [`2025-09 - Sherlock Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2025-sept-governor-timelock/Sherlock-Maple-Finance-timelock-Sept-2025.pdf) |
| 0xMacro | [`2025-09 - 0xMacro Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2025-sept-governor-timelock/0xMacro-Maple-Finance-timelock-Sept-2025.pdf) |
### November 2025 Release
The November 2025 release is for the Withdrawal Manager upgrade which introduces support to allow multiple pending requests per owner. The upgrade went through two audits by Spearbit and Sherlock. The audit reports can be seen below.
| Auditor | Report Link |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Spearbit | [`2025-11 - Spearbit Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2025-november/Spearbit-Maple-Finance-WM-Nov-2025.pdf) |
| Sherlock | [`2025-11 - Sherlock Report`](https://github.com/maple-labs/maple-core-v2/blob/main/audits/2025-november/Sherlock-Maple-Finance-WM-Nov-2025.pdf) |
### January 2026 Release
The January 2026 release is for the Maple CCIP Receiver on Ethereum mainnet allowing crosschain deposits and redemptions for syrupUSDC.
| Auditor | Report Link |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dedaub | [`2025-11 - Dedaub Report`](https://github.com/maple-labs/maple-cross-chain-receiver/blob/main/audits/2025-november/Dedaub-Chainlink-Maple.pdf) |
| Sigma Prime | [`2026-01 - Sigma Prime Report`](https://github.com/maple-labs/maple-cross-chain-receiver/blob/main/audits/2026-january/SigmaPrime-Chainlink-Maple.pdf) |
## Bug Bounty
The Maple protocol has an active bug bounty to incentive whitehat hackers to report any issues discovered in the protocol to allow for the opportunity for a patch to be made before the exploit is performed by a malicious actor. For all information related to the ongoing bug bounty for these contracts run by [Immunefi](https://immunefi.com/), please visit this [site](https://immunefi.com/bounty/maple/).
## Critical Monitoring
Maple Finance makes use of a custom s프로젝트로 돌아가기