File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: AGPL-3.0-only
2+ pragma solidity ^ 0.8.0 ;
3+
4+ import "@uma/core/contracts/common/implementation/MultiCaller.sol " ;
5+ import "@openzeppelin/contracts/access/Ownable.sol " ;
6+
7+ /**
8+ * @title Maps rate model objects to L1 token.
9+ * @dev This contract is designed to be queried by off-chain relayers that need to compute realized LP fee %'s before
10+ * submitting relay transactions to a BridgePool contract. Therefore, this contract does not perform any validation on
11+ * the shape of the rate model, which is stored as a string to enable arbitrary data encoding via a stringified JSON
12+ * object. This leaves this contract unopionated on the parameters within the rate model, enabling governance to adjust
13+ * the structure in the future.
14+ */
15+ contract RateModelStore is Ownable , MultiCaller {
16+ mapping (address => string ) public l1TokenRateModels;
17+
18+ event UpdatedRateModel (address indexed l1Token , string rateModel );
19+
20+ /**
21+ * @notice Updates rate model string for L1 token.
22+ * @param l1Token the l1 token rate model to update.
23+ * @param rateModel the updated rate model.
24+ */
25+ function updateRateModel (address l1Token , string memory rateModel ) external onlyOwner {
26+ l1TokenRateModels[l1Token] = rateModel;
27+ emit UpdatedRateModel (l1Token, rateModel);
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments