Latest 25 from a total of 770 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unpause | 23451418 | 12 days ago | IN | 0 ETH | 0.00003039 | ||||
Withdraw Multipl... | 23414419 | 18 days ago | IN | 0 ETH | 0.00001641 | ||||
Withdraw Multipl... | 23245198 | 41 days ago | IN | 0 ETH | 0.00023232 | ||||
Withdraw Multipl... | 23116395 | 59 days ago | IN | 0 ETH | 0.0004922 | ||||
Withdraw Multipl... | 23064754 | 66 days ago | IN | 0 ETH | 0.00035959 | ||||
Withdraw Multipl... | 22936985 | 84 days ago | IN | 0 ETH | 0.00044595 | ||||
Withdraw Multipl... | 22928349 | 85 days ago | IN | 0 ETH | 0.0002701 | ||||
Withdraw Multipl... | 22878311 | 92 days ago | IN | 0 ETH | 0.0005192 | ||||
Withdraw Multipl... | 22833992 | 99 days ago | IN | 0 ETH | 0.00047468 | ||||
Assess | 22791481 | 105 days ago | IN | 0 ETH | 0.00022647 | ||||
Withdraw Multipl... | 22687618 | 119 days ago | IN | 0 ETH | 0.00021425 | ||||
Withdraw Multipl... | 22438906 | 154 days ago | IN | 0 ETH | 0.00366414 | ||||
Withdraw Multipl... | 22345669 | 167 days ago | IN | 0 ETH | 0.00026014 | ||||
Withdraw Multipl... | 22315842 | 171 days ago | IN | 0 ETH | 0.0001669 | ||||
Withdraw Multipl... | 22301875 | 173 days ago | IN | 0 ETH | 0.00004942 | ||||
Withdraw Multipl... | 22264773 | 178 days ago | IN | 0 ETH | 0.0001911 | ||||
Withdraw Multipl... | 22258311 | 179 days ago | IN | 0 ETH | 0.00006901 | ||||
Withdraw Multipl... | 22014956 | 213 days ago | IN | 0 ETH | 0.00013134 | ||||
Withdraw Multipl... | 21986714 | 217 days ago | IN | 0 ETH | 0.0001736 | ||||
Withdraw Multipl... | 21951628 | 222 days ago | IN | 0 ETH | 0.00176141 | ||||
Withdraw Multipl... | 21888095 | 231 days ago | IN | 0 ETH | 0.00030041 | ||||
Withdraw Multipl... | 21838095 | 238 days ago | IN | 0 ETH | 0.00048905 | ||||
Withdraw Multipl... | 21822435 | 240 days ago | IN | 0 ETH | 0.00020994 | ||||
Withdraw Multipl... | 21803487 | 243 days ago | IN | 0 ETH | 0.00018127 | ||||
Withdraw Multipl... | 21771845 | 247 days ago | IN | 0 ETH | 0.00037076 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
- | 13819566 | 1392 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Minimal Proxy Contract for 0xcd123dd7b07e164bf1b33fc639a8f7a04c3370b2
Contract Name:
TranchedPool
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "@openzeppelin/contracts/drafts/IERC20Permit.sol";import "@openzeppelin/contracts-ethereum-package/contracts/math/Math.sol";import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";import "../../interfaces/ITranchedPool.sol";import "../../interfaces/IERC20withDec.sol";import "../../interfaces/IV2CreditLine.sol";import "../../interfaces/IPoolTokens.sol";import "./GoldfinchConfig.sol";import "./BaseUpgradeablePausable.sol";import "./ConfigHelper.sol";import "../../external/FixedPoint.sol";import "../../library/SafeERC20Transfer.sol";contract TranchedPool is BaseUpgradeablePausable, ITranchedPool, SafeERC20Transfer {GoldfinchConfig public config;using ConfigHelper for GoldfinchConfig;using FixedPoint for FixedPoint.Unsigned;using FixedPoint for uint256;bytes32 public constant LOCKER_ROLE = keccak256("LOCKER_ROLE");
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;import "../Initializable.sol";/** @dev Provides information about the current execution context, including the* sender of the transaction and its data. While these are generally available* via msg.sender and msg.data, they should not be accessed in such a direct* manner, since when dealing with GSN meta-transactions the account sending and* paying for execution may not be the actual sender (as far as an application* is concerned).** This contract is only required for intermediate, library-like contracts.*/contract ContextUpgradeSafe is Initializable {// Empty internal constructor, to prevent people from mistakenly deploying// an instance of this contract, which should be used via inheritance.function __Context_init() internal initializer {__Context_init_unchained();}function __Context_init_unchained() internal initializer {}
1234567891011121314151617181920212223242526pragma solidity >=0.4.24 <0.7.0;/*** @title Initializable** @dev Helper contract to support initializer functions. To use it, replace* the constructor with a function that has the `initializer` modifier.* WARNING: Unlike constructors, initializer functions must be manually* invoked. This applies both to deploying an Initializable contract, as well* as extending an Initializable contract via inheritance.* WARNING: When used with inheritance, manual care must be taken to not invoke* a parent initializer twice, or ensure that all initializers are idempotent,* because this is not dealt with automatically as with constructors.*/contract Initializable {/*** @dev Indicates that the contract has been initialized.*/bool private initialized;/*** @dev Indicates that the contract is in the process of being initialized.*/bool private initializing;
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;import "../utils/EnumerableSet.sol";import "../utils/Address.sol";import "../GSN/Context.sol";import "../Initializable.sol";/*** @dev Contract module that allows children to implement role-based access* control mechanisms.** Roles are referred to by their `bytes32` identifier. These should be exposed* in the external API and be unique. The best way to achieve this is by* using `public constant` hash digests:** ```* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");* ```** Roles can be used to represent a set of permissions. To restrict access to a* function call, use {hasRole}:** ```* function foo() public {* require(hasRole(MY_ROLE, _msgSender()));* ...
12345678910111213141516171819202122pragma solidity ^0.6.0;/*** @dev Interface of the ERC165 standard, as defined in the* https://eips.ethereum.org/EIPS/eip-165[EIP].** Implementers can declare support of contract interfaces, which can then be* queried by others ({ERC165Checker}).** For an implementation, see {ERC165}.*/interface IERC165 {/*** @dev Returns true if this contract implements the interface defined by* `interfaceId`. See the corresponding* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]* to learn more about how these ids are created.** This function call must use less than 30 000 gas.*/function supportsInterface(bytes4 interfaceId) external view returns (bool);}
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;/*** @dev Standard math utilities missing in the Solidity language.*/library Math {/*** @dev Returns the largest of two numbers.*/function max(uint256 a, uint256 b) internal pure returns (uint256) {return a >= b ? a : b;}/*** @dev Returns the smallest of two numbers.*/function min(uint256 a, uint256 b) internal pure returns (uint256) {return a < b ? a : b;}/*** @dev Returns the average of two numbers. The result is rounded towards* zero.*/function average(uint256 a, uint256 b) internal pure returns (uint256) {// (a + b) / 2 can overflow, so we distribute
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;/*** @dev Wrappers over Solidity's arithmetic operations with added overflow* checks.** Arithmetic operations in Solidity wrap on overflow. This can easily result* in bugs, because programmers usually assume that an overflow raises an* error, which is the standard behavior in high level programming languages.* `SafeMath` restores this intuition by reverting the transaction when an* operation overflows.** Using this library instead of the unchecked operations eliminates an entire* class of bugs, so it's recommended to use it always.*/library SafeMath {/*** @dev Returns the addition of two unsigned integers, reverting on* overflow.** Counterpart to Solidity's `+` operator.** Requirements:* - Addition cannot overflow.*/function add(uint256 a, uint256 b) internal pure returns (uint256) {
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;/*** @title SignedSafeMath* @dev Signed math operations with safety checks that revert on error.*/library SignedSafeMath {int256 constant private _INT256_MIN = -2**255;/*** @dev Multiplies two signed integers, reverts on overflow.*/function mul(int256 a, int256 b) internal pure returns (int256) {// Gas optimization: this is cheaper than requiring 'a' not being zero, but the// benefit is lost if 'b' is also tested.// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522if (a == 0) {return 0;}require(!(a == -1 && b == _INT256_MIN), "SignedSafeMath: multiplication overflow");int256 c = a * b;require(c / a == b, "SignedSafeMath: multiplication overflow");return c;
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;/*** @dev Interface of the ERC20 standard as defined in the EIP.*/interface IERC20 {/*** @dev Returns the amount of tokens in existence.*/function totalSupply() external view returns (uint256);/*** @dev Returns the amount of tokens owned by `account`.*/function balanceOf(address account) external view returns (uint256);/*** @dev Moves `amount` tokens from the caller's account to `recipient`.** Returns a boolean value indicating whether the operation succeeded.** Emits a {Transfer} event.*/function transfer(address recipient, uint256 amount) external returns (bool);/**
1234567891011121314151617181920212223242526pragma solidity ^0.6.2;import "../../introspection/IERC165.sol";/*** @dev Required interface of an ERC721 compliant contract.*/interface IERC721 is IERC165 {event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);event ApprovalForAll(address indexed owner, address indexed operator, bool approved);/*** @dev Returns the number of NFTs in ``owner``'s account.*/function balanceOf(address owner) external view returns (uint256 balance);/*** @dev Returns the owner of the NFT specified by `tokenId`.*/function ownerOf(uint256 tokenId) external view returns (address owner);/*** @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to* another (`to`).*
1234567891011121314151617181920212223242526pragma solidity ^0.6.2;/*** @dev Collection of functions related to the address type*/library Address {/*** @dev Returns true if `account` is a contract.** [IMPORTANT]* ====* It is unsafe to assume that an address for which this function returns* false is an externally-owned account (EOA) and not a contract.** Among others, `isContract` will return false for the following* types of addresses:** - an externally-owned account* - a contract in construction* - an address where a contract will be created* - an address where a contract lived, but was destroyed* ====*/function isContract(address account) internal view returns (bool) {// According to EIP-1052, 0x0 is the value returned for not-yet created accounts// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;/*** @dev Library for managing* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive* types.** Sets have the following properties:** - Elements are added, removed, and checked for existence in constant time* (O(1)).* - Elements are enumerated in O(n). No guarantees are made on the ordering.** ```* contract Example {* // Add the library methods* using EnumerableSet for EnumerableSet.AddressSet;** // Declare a set state variable* EnumerableSet.AddressSet private mySet;* }* ```** As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`* (`UintSet`) are supported.*/
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;import "../GSN/Context.sol";import "../Initializable.sol";/*** @dev Contract module which allows children to implement an emergency stop* mechanism that can be triggered by an authorized account.** This module is used through inheritance. It will make available the* modifiers `whenNotPaused` and `whenPaused`, which can be applied to* the functions of your contract. Note that they will not be pausable by* simply including this module, only once the modifiers are put in place.*/contract PausableUpgradeSafe is Initializable, ContextUpgradeSafe {/*** @dev Emitted when the pause is triggered by `account`.*/event Paused(address account);/*** @dev Emitted when the pause is lifted by `account`.*/event Unpaused(address account);bool private _paused;
1234567891011121314151617181920212223242526pragma solidity ^0.6.0;import "../Initializable.sol";/*** @dev Contract module that helps prevent reentrant calls to a function.** Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier* available, which can be applied to functions to make sure there are no nested* (reentrant) calls to them.** Note that because there is a single `nonReentrant` guard, functions marked as* `nonReentrant` may not call one another. This can be worked around by making* those functions `private`, and then adding `external` `nonReentrant` entry* points to them.** TIP: If you would like to learn more about reentrancy and alternative ways* to protect against it, check out our blog post* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].*/contract ReentrancyGuardUpgradeSafe is Initializable {bool private _notEntered;function __ReentrancyGuard_init() internal initializer {__ReentrancyGuard_init_unchained();}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.6.0 <0.8.0;/*** @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].** Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by* presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't* need to send a transaction, and thus is not required to hold Ether at all.*/interface IERC20Permit {/*** @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,* given `owner`'s signed approval.** IMPORTANT: The same issues {IERC20-approve} has related to transaction* ordering also apply here.** Emits an {Approval} event.** Requirements:** - `spender` cannot be the zero address.* - `deadline` must be a timestamp in the future.
12345678910111213141516171819202122232425// SPDX-License-Identifier: AGPL-3.0-only// solhint-disable// Imported from https://github.com/UMAprotocol/protocol/blob/4d1c8cc47a4df5e79f978cb05647a7432e111a3d/packages/core/contracts/common/implementation/FixedPoint.solpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";import "@openzeppelin/contracts-ethereum-package/contracts/math/SignedSafeMath.sol";/*** @title Library for fixed point arithmetic on uints*/library FixedPoint {using SafeMath for uint256;using SignedSafeMath for int256;// Supports 18 decimals. E.g., 1e18 represents "1", 5e17 represents "0.5".// For unsigned values:// This can represent a value up to (2^256 - 1)/10^18 = ~10^59. 10^59 will be stored internally as uint256 10^77.uint256 private constant FP_SCALING_FACTOR = 10**18;// --------------------------------------- UNSIGNED -----------------------------------------------------------------------------struct Unsigned {uint256 rawValue;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// Taken from https://github.com/compound-finance/compound-protocol/blob/master/contracts/CTokenInterfaces.solpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "./IERC20withDec.sol";interface ICUSDCContract is IERC20withDec {/*** User Interface ***/function mint(uint256 mintAmount) external returns (uint256);function redeem(uint256 redeemTokens) external returns (uint256);function redeemUnderlying(uint256 redeemAmount) external returns (uint256);function borrow(uint256 borrowAmount) external returns (uint256);function repayBorrow(uint256 repayAmount) external returns (uint256);function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256);function liquidateBorrow(address borrower,uint256 repayAmount,address cTokenCollateral
123456789101112131415161718192021// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;abstract contract ICreditDesk {uint256 public totalWritedowns;uint256 public totalLoansOutstanding;function setUnderwriterGovernanceLimit(address underwriterAddress, uint256 limit) external virtual;function drawdown(address creditLineAddress, uint256 amount) external virtual;function pay(address creditLineAddress, uint256 amount) external virtual;function assessCreditLine(address creditLineAddress) external virtual;function applyPayment(address creditLineAddress, uint256 amount) external virtual;function getNextPaymentAmount(address creditLineAddress, uint256 asOfBLock) external view virtual returns (uint256);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;interface ICreditLine {function borrower() external view returns (address);function limit() external view returns (uint256);function interestApr() external view returns (uint256);function paymentPeriodInDays() external view returns (uint256);function termInDays() external view returns (uint256);function lateFeeApr() external view returns (uint256);// Accounting variablesfunction balance() external view returns (uint256);function interestOwed() external view returns (uint256);function principalOwed() external view returns (uint256);function termEndTime() external view returns (uint256);
1234567891011121314151617181920// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";/*Only addition is the `decimals` function, which we need, and which both our Fidu and USDC use, along with most ERC20's.*//*** @dev Interface of the ERC20 standard as defined in the EIP.*/interface IERC20withDec is IERC20 {/*** @dev Returns the number of decimals used for the token*/function decimals() external view returns (uint8);}
1234567891011121314// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "./IERC20withDec.sol";interface IFidu is IERC20withDec {function mintTo(address to, uint256 amount) external;function burnFrom(address to, uint256 amount) external;function renounceRole(bytes32 role, address account) external;}
1234567891011121314// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;interface IGoldfinchConfig {function getNumber(uint256 index) external returns (uint256);function getAddress(uint256 index) external returns (address);function setAddress(uint256 index, address newAddress) external returns (address);function setNumber(uint256 index, uint256 newNumber) external returns (uint256);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;interface IGoldfinchFactory {function createCreditLine() external returns (address);function createBorrower(address owner) external returns (address);function createPool(address _borrower,uint256 _juniorFeePercent,uint256 _limit,uint256 _interestApr,uint256 _paymentPeriodInDays,uint256 _termInDays,uint256 _lateFeeApr) external returns (address);function createMigratedPool(address _borrower,uint256 _juniorFeePercent,uint256 _limit,uint256 _interestApr,uint256 _paymentPeriodInDays,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;abstract contract IPool {uint256 public sharePrice;function deposit(uint256 amount) external virtual;function withdraw(uint256 usdcAmount) external virtual;function withdrawInFidu(uint256 fiduAmount) external virtual;function collectInterestAndPrincipal(address from,uint256 interest,uint256 principal) public virtual;function transferFrom(address from,address to,uint256 amount) public virtual returns (bool);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC721/IERC721.sol";interface IPoolTokens is IERC721 {event TokenMinted(address indexed owner,address indexed pool,uint256 indexed tokenId,uint256 amount,uint256 tranche);event TokenRedeemed(address indexed owner,address indexed pool,uint256 indexed tokenId,uint256 principalRedeemed,uint256 interestRedeemed,uint256 tranche);event TokenBurned(address indexed owner, address indexed pool, uint256 indexed tokenId);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "./ITranchedPool.sol";abstract contract ISeniorPool {uint256 public sharePrice;uint256 public totalLoansOutstanding;uint256 public totalWritedowns;function deposit(uint256 amount) external virtual returns (uint256 depositShares);function depositWithPermit(uint256 amount,uint256 deadline,uint8 v,bytes32 r,bytes32 s) external virtual returns (uint256 depositShares);function withdraw(uint256 usdcAmount) external virtual returns (uint256 amount);function withdrawInFidu(uint256 fiduAmount) external virtual returns (uint256 amount);
12345678910111213// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "./ISeniorPool.sol";import "./ITranchedPool.sol";abstract contract ISeniorPoolStrategy {function invest(ISeniorPool seniorPool, ITranchedPool pool) public view virtual returns (uint256 amount);function estimateInvestment(ISeniorPool seniorPool, ITranchedPool pool) public view virtual returns (uint256);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "./IV2CreditLine.sol";abstract contract ITranchedPool {IV2CreditLine public creditLine;uint256 public createdAt;enum Tranches {Reserved, Senior, Junior}struct TrancheInfo {uint256 id;uint256 principalDeposited;uint256 principalSharePrice;uint256 interestSharePrice;uint256 lockedUntil;}function initialize(address _config,address _borrower,uint256 _juniorFeePercent,uint256 _limit,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "./ICreditLine.sol";abstract contract IV2CreditLine is ICreditLine {function principal() external view virtual returns (uint256);function totalInterestAccrued() external view virtual returns (uint256);function termStartTime() external view virtual returns (uint256);function setLimit(uint256 newAmount) external virtual;function setBalance(uint256 newBalance) external virtual;function setPrincipal(uint256 _principal) external virtual;function setTotalInterestAccrued(uint256 _interestAccrued) external virtual;function drawdown(uint256 amount) external virtual;function assess()external
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";/*** @title Safe ERC20 Transfer* @notice Reverts when transfer is not successful* @author Goldfinch*/abstract contract SafeERC20Transfer {function safeERC20Transfer(IERC20 erc20,address to,uint256 amount,string memory message) internal {require(to != address(0), "Can't send to zero address");bool success = erc20.transfer(to, amount);require(success, message);}function safeERC20Transfer(IERC20 erc20,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "@openzeppelin/contracts-ethereum-package/contracts/access/AccessControl.sol";import "@openzeppelin/contracts-ethereum-package/contracts/utils/ReentrancyGuard.sol";import "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol";import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";import "./PauserPausable.sol";/*** @title BaseUpgradeablePausable contract* @notice This is our Base contract that most other contracts inherit from. It includes many standard* useful abilities like ugpradeability, pausability, access control, and re-entrancy guards.* @author Goldfinch*/contract BaseUpgradeablePausable isInitializable,AccessControlUpgradeSafe,PauserPausable,ReentrancyGuardUpgradeSafe{bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");using SafeMath for uint256;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "./GoldfinchConfig.sol";import "../../interfaces/IPool.sol";import "../../interfaces/IFidu.sol";import "../../interfaces/ISeniorPool.sol";import "../../interfaces/ISeniorPoolStrategy.sol";import "../../interfaces/ICreditDesk.sol";import "../../interfaces/IERC20withDec.sol";import "../../interfaces/ICUSDCContract.sol";import "../../interfaces/IPoolTokens.sol";import "../../interfaces/IGoldfinchFactory.sol";/*** @title ConfigHelper* @notice A convenience library for getting easy access to other contracts and constants within the* protocol, through the use of the GoldfinchConfig contract* @author Goldfinch*/library ConfigHelper {function getPool(GoldfinchConfig config) internal view returns (IPool) {return IPool(poolAddress(config));
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;/*** @title ConfigOptions* @notice A central place for enumerating the configurable options of our GoldfinchConfig contract* @author Goldfinch*/library ConfigOptions {// NEVER EVER CHANGE THE ORDER OF THESE!// You can rename or append. But NEVER change the order.enum Numbers {TransactionLimit,TotalFundsLimit,MaxUnderwriterLimit,ReserveDenominator,WithdrawFeeDenominator,LatenessGracePeriodInDays,LatenessMaxDays,DrawdownPeriodInSeconds,TransferRestrictionPeriodInDays,LeverageRatio}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "./BaseUpgradeablePausable.sol";import "../../interfaces/IGoldfinchConfig.sol";import "./ConfigOptions.sol";/*** @title GoldfinchConfig* @notice This contract stores mappings of useful "protocol config state", giving a central place* for all other contracts to access it. For example, the TransactionLimit, or the PoolAddress. These config vars* are enumerated in the `ConfigOptions` library, and can only be changed by admins of the protocol.* Note: While this inherits from BaseUpgradeablePausable, it is not deployed as an upgradeable contract (this* is mostly to save gas costs of having each call go through a proxy)* @author Goldfinch*/contract GoldfinchConfig is BaseUpgradeablePausable {bytes32 public constant GO_LISTER_ROLE = keccak256("GO_LISTER_ROLE");mapping(uint256 => address) public addresses;mapping(uint256 => uint256) public numbers;mapping(address => bool) public goList;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;pragma experimental ABIEncoderV2;import "@openzeppelin/contracts-ethereum-package/contracts/utils/Pausable.sol";import "@openzeppelin/contracts-ethereum-package/contracts/access/AccessControl.sol";/*** @title PauserPausable* @notice Inheriting from OpenZeppelin's Pausable contract, this does small* augmentations to make it work with a PAUSER_ROLE, leveraging the AccessControl contract.* It is meant to be inherited.* @author Goldfinch*/contract PauserPausable is AccessControlUpgradeSafe, PausableUpgradeSafe {bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");// solhint-disable-next-line func-name-mixedcasefunction __PauserPausable__init() public initializer {__Pausable_init_unchained();}/*** @dev Pauses all functions guarded by Pause*
12345678910111213141516171819202122{"evmVersion": "istanbul","libraries": {},"metadata": {"bytecodeHash": "ipfs","useLiteralContent": true},"optimizer": {"enabled": true,"runs": 200},"remappings": [],"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","abi"]}}}
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCreditLine","type":"address"},{"indexed":true,"internalType":"address","name":"newCreditLine","type":"address"}],"name":"CreditLineMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tranche","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DepositMade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DrawdownMade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"DrawdownsPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"DrawdownsUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"EmergencyShutdown","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payer","type":"address"},{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"interestAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"remainingAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reserveAmount","type":"uint256"}],"name":"PaymentApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReserveFundsCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":true,"internalType":"uint256","name":"tranche","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principalSharePrice","type":"uint256"},{"indexed":false,"internalType":"int256","name":"principalDelta","type":"int256"},{"indexed":false,"internalType":"uint256","name":"interestSharePrice","type":"uint256"},{"indexed":false,"internalType":"int256","name":"interestDelta","type":"int256"}],"name":"SharePriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tranche","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interestWithdrawn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principalWithdrawn","type":"uint256"}],"name":"WithdrawalMade","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FP_SCALING_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCKER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ONE_HUNDRED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OWNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_PER_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"__BaseUpgradeablePausable__init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"__PauserPausable__init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"availableToWithdraw","outputs":[{"internalType":"uint256","name":"interestRedeemable","type":"uint256"},{"internalType":"uint256","name":"principalRedeemable","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrower","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"contract GoldfinchConfig","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"createdAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creditLine","outputs":[{"internalType":"contract IV2CreditLine","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tranche","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tranche","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositWithPermit","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"drawdown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"drawdownsPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyShutdown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tranche","type":"uint256"}],"name":"getTranche","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"principalDeposited","type":"uint256"},{"internalType":"uint256","name":"principalSharePrice","type":"uint256"},{"internalType":"uint256","name":"interestSharePrice","type":"uint256"},{"internalType":"uint256","name":"lockedUntil","type":"uint256"}],"internalType":"struct ITranchedPool.TrancheInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_config","type":"address"},{"internalType":"address","name":"_borrower","type":"address"},{"internalType":"uint256","name":"_juniorFeePercent","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"},{"internalType":"uint256","name":"_interestApr","type":"uint256"},{"internalType":"uint256","name":"_paymentPeriodInDays","type":"uint256"},{"internalType":"uint256","name":"_termInDays","type":"uint256"},{"internalType":"uint256","name":"_lateFeeApr","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"interestApr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"juniorFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lateFeeApr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockJuniorCapital","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCl","type":"address"}],"name":"migrateAndSetNewCreditLine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_borrower","type":"address"},{"internalType":"uint256","name":"_limit","type":"uint256"},{"internalType":"uint256","name":"_interestApr","type":"uint256"},{"internalType":"uint256","name":"_paymentPeriodInDays","type":"uint256"},{"internalType":"uint256","name":"_termInDays","type":"uint256"},{"internalType":"uint256","name":"_lateFeeApr","type":"uint256"}],"name":"migrateCreditLine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseDrawdowns","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"pay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paymentPeriodInDays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"sharePrice","type":"uint256"},{"internalType":"uint256","name":"totalShares","type":"uint256"}],"name":"sharePriceToUsdc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"termInDays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseDrawdowns","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateGoldfinchConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"totalShares","type":"uint256"}],"name":"usdcToSharePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"interestWithdrawn","type":"uint256"},{"internalType":"uint256","name":"principalWithdrawn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawMax","outputs":[{"internalType":"uint256","name":"interestWithdrawn","type":"uint256"},{"internalType":"uint256","name":"principalWithdrawn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"withdrawMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.999715 | 5,470.4158 | $5,468.86 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.