Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Establish BUSL-1.1 business license (#433)
Browse files Browse the repository at this point in the history
* first cut

* normalize whitespace

* updated change date from 1 to 3 years
  • Loading branch information
EdNoepel authored Dec 21, 2022
1 parent bc09a53 commit 473c64c
Show file tree
Hide file tree
Showing 83 changed files with 159 additions and 734 deletions.
697 changes: 54 additions & 643 deletions LICENSE

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@ pip install solc-select && solc-select install 0.8.14 && solc-select use 0.8.14
make analyze
```

## Licensing
Ajna is under [BUSL license](https://github.com/ajna-finance/contracts/blob/develop/LICENSE) with the
following exceptions:
- To facilitate integrations, public-facing interfaces are licensed under `MIT`, as indicated in their SPDX headers.
- As a derivative work of [ds-math](https://github.com/dapphub/ds-math/), `Maths.sol` is licensed under `GPL-3.0-or-later`, as indicated in its SPDX header.
- Unit and integration tests under `tests` folder remain unlicensed, unless their file header specifies otherwise.

Ajna Labs, LLC shall retain rights to this BUSL license until dissolution, at which point the license shall be
transferred to the Ajna Foundation. Licensor reserves the right to specify Additional Use Grants at their discretion
and to facilitate changes enacted by the Grant Coordination process.

The Change License is hereby specified as _GNU Affero General Public License v3.0 or later_ (`AGPL-3.0-or-later`).
Licensor may modify this change license prior to the change date by updating this file in the `master` branch of [source control](https://github.com/ajna-finance/contracts/tree/master).

The Change Date is hereby specified as April 1, 2026. Licensor may modify this change date by updating this file in the `master` branch of [source control](https://github.com/ajna-finance/contracts/tree/master).

## Deployment

A deployment script has been created to automate deployment of libraries and factory contracts.
Expand Down
2 changes: 1 addition & 1 deletion src/base/FlashloanablePool.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
2 changes: 1 addition & 1 deletion src/base/PermitERC721.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
2 changes: 1 addition & 1 deletion src/base/Pool.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
2 changes: 1 addition & 1 deletion src/base/PoolDeployer.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
2 changes: 1 addition & 1 deletion src/base/PoolHelper.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
2 changes: 1 addition & 1 deletion src/base/PoolInfoUtils.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
2 changes: 1 addition & 1 deletion src/base/PositionManager.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
2 changes: 1 addition & 1 deletion src/base/PositionNFT.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.14;

import { Base64 } from '@base64-sol/base64.sol';
Expand Down
1 change: 1 addition & 0 deletions src/base/interfaces/pool/IPoolImmutables.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/erc20/ERC20Pool.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
3 changes: 2 additions & 1 deletion src/erc20/ERC20PoolFactory.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

import { ClonesWithImmutableArgs } from '@clones/ClonesWithImmutableArgs.sol';
Expand Down
1 change: 1 addition & 0 deletions src/erc20/interfaces/pool/IERC20PoolBorrowerActions.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
1 change: 1 addition & 0 deletions src/erc20/interfaces/pool/IERC20PoolEvents.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
1 change: 1 addition & 0 deletions src/erc20/interfaces/pool/IERC20PoolImmutables.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
1 change: 1 addition & 0 deletions src/erc20/interfaces/pool/IERC20PoolLenderActions.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/erc721/ERC721Pool.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
3 changes: 2 additions & 1 deletion src/erc721/ERC721PoolFactory.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

import { ClonesWithImmutableArgs } from '@clones/ClonesWithImmutableArgs.sol';
Expand Down
1 change: 1 addition & 0 deletions src/erc721/interfaces/pool/IERC721PoolBorrowerActions.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
1 change: 1 addition & 0 deletions src/erc721/interfaces/pool/IERC721PoolEvents.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
1 change: 1 addition & 0 deletions src/erc721/interfaces/pool/IERC721PoolImmutables.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
1 change: 1 addition & 0 deletions src/erc721/interfaces/pool/IERC721PoolLenderActions.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
1 change: 1 addition & 0 deletions src/erc721/interfaces/pool/IERC721PoolState.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

/**
Expand Down
3 changes: 2 additions & 1 deletion src/libraries/Buckets.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

import { Bucket, Lender } from '../base/interfaces/IPool.sol';
Expand Down
3 changes: 2 additions & 1 deletion src/libraries/Deposits.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

import { DepositsState } from '../base/interfaces/IPool.sol';
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Loans.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
3 changes: 2 additions & 1 deletion src/libraries/Maths.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.14;

library Maths {
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/external/Auctions.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

Expand Down
3 changes: 2 additions & 1 deletion src/libraries/external/LenderActions.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

import { MoveQuoteParams, RemoveQuoteParams, PoolState } from '../../base/interfaces/IPool.sol';
Expand Down
3 changes: 2 additions & 1 deletion src/libraries/external/PoolCommons.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.14;

import { PRBMathUD60x18 } from "@prb-math/contracts/PRBMathUD60x18.sol";
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/Auctions.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import './utils/DSTestPlus.sol';
Expand Down
3 changes: 2 additions & 1 deletion tests/forge/ERC20Pool/ERC20DSTestPlus.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.14;

import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20FlashloanCollateral.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolBorrow.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolCollateral.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
3 changes: 1 addition & 2 deletions tests/forge/ERC20Pool/ERC20PoolFactory.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolGasLoadTest.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20DSTestPlus } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolInterestRateAndEMAs.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolLiquidationsArbTake.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolLiquidationsKick.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolLiquidationsMisc.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolLiquidationsSettle.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolLiquidationsTake.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolMulticall.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.14;

Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolPrecision.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';
Expand Down
3 changes: 1 addition & 2 deletions tests/forge/ERC20Pool/ERC20PoolPurchaseQuote.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolQuoteToken.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20PoolTransferLPTokens.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC20Pool/ERC20SafeTransferTokens.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20HelperContract } from './ERC20DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC721Pool/ERC721DSTestPlus.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC20 } from '@openzeppelin/contracts/token/ERC20/ERC20.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC721Pool/ERC721FlashloanQuote.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from './ERC721DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC721Pool/ERC721NonStandardTokenTransfer.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from './ERC721DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC721Pool/ERC721PoolBorrow.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from './ERC721DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC721Pool/ERC721PoolCollateral.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from './ERC721DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC721Pool/ERC721PoolFactory.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from './ERC721DSTestPlus.sol';
Expand Down
2 changes: 1 addition & 1 deletion tests/forge/ERC721Pool/ERC721PoolInterest.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from './ERC721DSTestPlus.sol';
Expand Down
3 changes: 1 addition & 2 deletions tests/forge/ERC721Pool/ERC721PoolLiquidationsKick.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from "./ERC721DSTestPlus.sol";
Expand Down
3 changes: 1 addition & 2 deletions tests/forge/ERC721Pool/ERC721PoolLiquidationsSettle.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from "./ERC721DSTestPlus.sol";
Expand Down
3 changes: 1 addition & 2 deletions tests/forge/ERC721Pool/ERC721PoolLiquidationsTake.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;

import { ERC721HelperContract } from "./ERC721DSTestPlus.sol";
Expand Down
Loading

0 comments on commit 473c64c

Please sign in to comment.