Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2254 commits
Select commit Hold shift + click to select a range
ca2ec33
docs: auto generate NATSPEC docs
github-actions[bot] Apr 20, 2024
8aaa03c
feat: add ICurveStableSwapNG (#933)
rndquu Apr 24, 2024
db2a5d0
docs: auto generate NATSPEC docs
github-actions[bot] Apr 24, 2024
92549be
feat: add plain pool migration
rndquu Apr 25, 2024
de86212
docs: update
rndquu Apr 25, 2024
447ec1d
Merge pull request #935 from rndquu/feat/migration-curve-plain
rndquu Apr 26, 2024
5db9383
docs: auto generate NATSPEC docs
github-actions[bot] Apr 26, 2024
1827e39
chore(deps): add typechain
0x4007 May 13, 2024
e4c1fae
chore: add deployment logs
0x4007 May 13, 2024
a5ddded
test: add skeleton for UbiquityPoolFacet fuzz tests
gitcoindev May 24, 2024
fe834cb
test: assume max collateral ratio between 0 and 1_000_000 (100%)
gitcoindev May 24, 2024
b6e432d
test: set up correct fuzz parameters in testMintDollar_FuzzDollarPric…
gitcoindev May 27, 2024
dc0125c
test: set up correct fuzz parameters in testMintDollar_FuzzDollarAmou…
gitcoindev May 27, 2024
df22fef
chore: increase max_test_rejects to 90000
gitcoindev May 27, 2024
485efe1
test: set correct parameters for collateral and governance slippage fuzz
gitcoindev May 29, 2024
809f149
test: minting fuzz tests parameters tweaks
gitcoindev May 29, 2024
eaa29b3
test: use ABDKMathQuad to fuzz fractional mint
gitcoindev May 30, 2024
222355d
test: add Dollar redeem fuzz tests skeleton
gitcoindev May 30, 2024
e9e0e6c
test: add testRedeemDollar_FuzzDollarPriceUsdTooHigh
gitcoindev Jun 4, 2024
60651d5
test: add redeem fuzz tests InsufficientCollateralAvailable Collatera…
gitcoindev Jun 5, 2024
3a58107
test: add testRedeemDollar_FuzzGovernanceAmountSlippage
gitcoindev Jun 6, 2024
478e4df
test: add testRedeemDollar_FuzzRedemptionDelayBlocks
gitcoindev Jun 6, 2024
ab85a33
test: add testMintDollar_FuzzCorrectDollarAmountMinted
gitcoindev Jun 14, 2024
fce4ecb
test: add testMintDollar_FuzzCorrectDollarAmountRedeemed
gitcoindev Jun 15, 2024
62d4c8a
test: set dollarOutMin>99 at testMintDollar_FuzzDollarAmountSlippage
gitcoindev Jun 16, 2024
320f710
test: increase max_test_rejects for long running fuzz tests
gitcoindev Jun 16, 2024
62e1e64
chore: add initial jest tests for UI
molecula451 Jun 20, 2024
28e7dd5
chore: move new fuzz tests to separate folders structure
gitcoindev Jun 21, 2024
7dce7be
chore: update import paths after moving fuzz tests
gitcoindev Jun 21, 2024
565aaa6
Merge pull request #940 from gitcoindev/ubiquitypoolfacet-fuzz-tests
rndquu Jun 24, 2024
64ab8b9
docs: auto generate NATSPEC docs
github-actions[bot] Jun 24, 2024
3315f8e
Merge branch 'ubiquity:development' into development
molecula451 Jun 25, 2024
59e059c
chore: update RPC
molecula451 Jun 26, 2024
9ff5ddc
chore: clean branch
molecula451 Jun 26, 2024
bb70cdd
Merge pull request #947 from molecula451/update-rpc
gitcoindev Jun 26, 2024
5bb26bb
chore: skip check_storage_layout check if provide_contracts job retur…
gitcoindev Jun 26, 2024
cea94a0
Merge pull request #948 from gitcoindev/fix-storage-collision-workflows
rndquu Jun 27, 2024
66db497
chore: fix some comments
jianghuyiyuan Jul 31, 2024
0cae716
Merge pull request #952 from jianghuyiyuan/development
0x4007 Jul 31, 2024
0a230f9
docs: auto generate NATSPEC docs
github-actions[bot] Jul 31, 2024
9e0d5fc
test(UbiquityPoolFacet): add invariant tests for collateral token add…
alexandr-masl Aug 21, 2024
42d739a
test(ubiquityPoolFacet): add invariant test for Ubiquity Dollar minti…
alexandr-masl Aug 25, 2024
6689906
test(ubiquity-pool-facet): add collateral, ceiling, redeem, and dolla…
alexandr-masl Aug 27, 2024
142f779
test(UbiquityPoolFacetInvariantTest): add collateral price manipulati…
alexandr-masl Aug 29, 2024
5407774
test(UbiquityPoolFacetInvariantTest): delete irrelevant logs
alexandr-masl Aug 29, 2024
dd94c7e
test(lib-ubiquity-pool): add conservative estimates for price and fees
alexandr-masl Aug 31, 2024
989d9c6
test(pool-facet-handler): add fuzzed parameters to dollar price manip…
alexandr-masl Aug 31, 2024
1b7f1da
test(pool-facet-handler): add usd price manipulations
alexandr-masl Aug 31, 2024
fd8acb6
test(pool-facet-handler): eth/usd price manipulations
alexandr-masl Sep 2, 2024
26abd14
test(pool-facet-handler): add docs
alexandr-masl Sep 2, 2024
dfff4f3
test(pool-facet-handler): deted hard params for redeemDollar
alexandr-masl Sep 2, 2024
b49a875
test(pool-facet-handler): update assume statements in redeemDollar an…
alexandr-masl Sep 3, 2024
3cc89d0
feat: add safe transfer library
zugdev Sep 7, 2024
01de15a
feat: wip ubiquity AMO minter
zugdev Sep 7, 2024
f7c9d4b
feat: generalize tickers
zugdev Sep 9, 2024
ba66a5f
feat: add dollar and governance minting/burning
zugdev Sep 9, 2024
73bb161
chore: format
zugdev Sep 10, 2024
701a83b
feat: set constants and immutables
zugdev Sep 10, 2024
f15daba
feat: add Aave AMO
zugdev Sep 10, 2024
96e72d7
feat: clean AMO minter addAMO function
zugdev Sep 10, 2024
44e9bf5
test(pool-facet-handler): refactor the income fuzz parameters
alexandr-masl Sep 10, 2024
316d557
test(pool-facet-invariant): add new invariant checks for minting and …
alexandr-masl Sep 11, 2024
16de33c
test(setting-up-ci): add deep-invariant ci sttings
alexandr-masl Sep 11, 2024
e98f977
chore: delete aave interfaces
zugdev Sep 11, 2024
ee2528b
chore: install aave submodules
zugdev Sep 11, 2024
53b8e1a
feat: refac AMO minter to handle only collateral
zugdev Sep 11, 2024
61530d0
feat: refac aave AMO to V3 and use submodules
zugdev Sep 11, 2024
29c2ea5
feat: add events
zugdev Sep 11, 2024
42f592e
chore: fix slither warning
zugdev Sep 11, 2024
ae26dfb
test(ci-settings): update fuzz and invariant ci settings
alexandr-masl Sep 13, 2024
283bd06
feat: add semgrep security issues scanning
obeys Sep 14, 2024
746c6f5
feat: test AMO minter constructor
zugdev Sep 16, 2024
5a6fb7f
feat: change AMO minter borrow cap
zugdev Sep 16, 2024
a521729
feat: remove timelock and add fine AMO control to owner
zugdev Sep 16, 2024
624a9ea
chore: code order
zugdev Sep 17, 2024
32284d6
feat: adhere to LibUbiquityPool AMO minter standard
zugdev Sep 17, 2024
2dbd2da
feat: full test suite for AMO minter
zugdev Sep 17, 2024
e03c3eb
chore: comments
zugdev Sep 17, 2024
e24e164
feat: receive Aave parameters in AaveAMO
zugdev Sep 17, 2024
9092bec
feat: wip AaveAMO tests
zugdev Sep 17, 2024
10136da
feat: missing immutable
zugdev Sep 17, 2024
1e7c794
feat: working AaveAMO test suite
zugdev Sep 17, 2024
48069c5
fix: fix semgrep scanning issue
obeys Sep 17, 2024
820f9fa
fix: run on push and pull request
obeys Sep 17, 2024
77a9093
fix: add back pull_request run
obeys Sep 17, 2024
e5c687e
test: add an invariant profile to the foundry configuration
alexandr-masl Sep 18, 2024
aafc79b
feat: test constructor
zugdev Sep 18, 2024
c3e21c2
chore: match comment style
zugdev Sep 18, 2024
861de4f
chore: change MockERC20 import path
zugdev Sep 18, 2024
5d5cb86
feat: remove unused modifier
zugdev Sep 18, 2024
397d1fd
feat: add claim Aave rewards mechanism
zugdev Sep 18, 2024
375e8d1
feat: test AMO minter constructor
zugdev Sep 18, 2024
dc2eb43
feat: rename error msg
zugdev Sep 18, 2024
30c9512
feat: fix rewards controller test
zugdev Sep 18, 2024
a79de73
chore: delete unused lib
zugdev Sep 19, 2024
e8d1d6f
feat: style changes
zugdev Sep 19, 2024
3a66f18
chore: comments
zugdev Sep 19, 2024
94f9c4f
feat: interface natspec
zugdev Sep 19, 2024
02bbe8f
feat: implemente amo interface in Aave AMO to ensure amo standard
zugdev Sep 19, 2024
4bdd75c
chore: fix AMO contracts version
zugdev Sep 21, 2024
ee11e95
chore: specify branch in git submodules
zugdev Sep 21, 2024
5e6a5fc
feat: remove borrowing from AaveAmo
zugdev Sep 22, 2024
d133e8a
feat: adapt tests
zugdev Sep 22, 2024
c8a9b02
Merge branch 'development' of https://github.com/zugdev/ubiquity-doll…
zugdev Sep 22, 2024
c8e4c35
Merge pull request #953 from alexandr-masl/invariant_testing
rndquu Sep 23, 2024
56f03ed
docs: auto generate NATSPEC docs
github-actions[bot] Sep 23, 2024
96dae22
ci: update deep-invariant.yml
rndquu Sep 23, 2024
c5891e9
Merge pull request #963 from ubiquity/rndquu-patch-3
rndquu Sep 23, 2024
f128408
Merge branch 'pull/961' into development
rndquu Sep 30, 2024
aa758b7
ci: test
rndquu Sep 30, 2024
3741d4c
ci: test
rndquu Sep 30, 2024
a88e853
ci: test
rndquu Sep 30, 2024
70071d7
ci: test
rndquu Sep 30, 2024
27c3e39
ci: test
rndquu Sep 30, 2024
e68c548
ci: test
rndquu Sep 30, 2024
496513b
ci: test
rndquu Sep 30, 2024
e21970e
ci: test
rndquu Sep 30, 2024
258ff61
ci: test
rndquu Sep 30, 2024
2a1d865
Merge pull request #2 from rndquu/ci/semgrep
obeys Sep 30, 2024
ce7a699
feat: optimal runs for fuzz and invariant
zugdev Oct 1, 2024
700127f
Merge pull request #961 from cohow/add-semgrep
rndquu Oct 1, 2024
6c25a2d
Merge pull request #967 from zugdev/optimal-fuzz-invariant-runs
rndquu Oct 1, 2024
b279051
docs: add dunedashboard link
YanVictorSN Oct 2, 2024
386de2a
Merge pull request #956 from zugdev/development
rndquu Oct 3, 2024
20799be
docs: auto generate NATSPEC docs
github-actions[bot] Oct 3, 2024
3da93ae
docs: update link
YanVictorSN Oct 7, 2024
50cb7e6
feat: add an addresses table to README
zugdev Nov 6, 2024
398c9df
feat: only reference prod addresses in readme
zugdev Nov 7, 2024
ca74325
Merge pull request #977 from zugdev/add-addresses-table
rndquu Nov 8, 2024
6ecefca
docs: update README.md
rndquu Nov 18, 2024
5fe63f8
docs: update README.md
rndquu Dec 13, 2024
e897745
build: use another sepolia rpc
rndquu Dec 13, 2024
0ebea6d
Merge pull request #980 from rndquu/fix/sepolia-build
rndquu Dec 13, 2024
c977a24
merge development branch
YanVictorSN Dec 13, 2024
42e43cb
docs: update README.md
YanVictorSN Dec 13, 2024
6f3b3e0
Merge pull request #969 from YanVictorSN/feature/analyticsdashboard
rndquu Dec 13, 2024
1ce7ea3
ci: add generate artifacts workflow
rndquu Jan 28, 2025
b778a6c
Merge pull request #986 from rndquu/ci/generate-artifacts
rndquu Jan 30, 2025
1a83ace
docs: update README.md
0x4007 Mar 10, 2025
6015d88
docs: update README.md
0x4007 Mar 10, 2025
f8cfcb8
docs: update README.md
0x4007 Mar 10, 2025
5ea786b
chore: [skip ci] update labels configuration
ubiquity-os[bot] Mar 13, 2025
e82f065
chore: [skip ci] update labels configuration
ubiquity-os[bot] Mar 13, 2025
093e944
chore: [skip ci] update labels configuration
ubiquity-os[bot] Mar 13, 2025
7bdfbdd
feat: add traditional MasterChef
rndquu Mar 25, 2025
9935c6f
chore: [skip ci] update labels configuration
ubiquity-os[bot] Mar 26, 2025
f2a2c2b
chore: [skip ci] update labels configuration
ubiquity-os[bot] Mar 26, 2025
1e24d1e
test: add basic MasterChef tests
rndquu Mar 26, 2025
066c869
refactor: prepare MasterChef for diamond
rndquu Mar 26, 2025
719e1d6
feat: add missing methods to MasterChef
rndquu Mar 27, 2025
480638f
test: fix
rndquu Mar 27, 2025
ae43d59
feat: add internal accounting
rndquu Mar 27, 2025
9a36ff2
ci: use stable foundry version
rndquu Mar 27, 2025
11647fe
ci: fix
rndquu Mar 27, 2025
ee49fa4
ci: use foundry-rs/foundry-toolchain action
rndquu Mar 27, 2025
55dced4
Merge pull request #989 from rndquu/ci/foundry-stable
rndquu Mar 28, 2025
471a215
ci: fix docs generation
rndquu Mar 28, 2025
109cec7
Merge pull request #991 from rndquu/ci/fix-docs
rndquu Mar 28, 2025
440d5d7
docs: auto generate NATSPEC docs
github-actions[bot] Mar 28, 2025
962109f
Merge branch 'development' into feat/985
rndquu Mar 28, 2025
be36d12
refactor: remove old staking
rndquu Mar 28, 2025
7610db6
feat: add LibStaking
rndquu Apr 1, 2025
bea4218
feat: add StakingFacet
rndquu Apr 2, 2025
61b39c5
test: add staking setup
rndquu Apr 2, 2025
b7fb2c6
test: add more tests
rndquu Apr 2, 2025
ef87cf3
test: add staking tests for public methods
rndquu Apr 3, 2025
7be6e92
refactor: remove MasterChef
rndquu Apr 3, 2025
f8f081a
test: add staking tests for restricted methods
rndquu Apr 3, 2025
ab2a312
test: add tests for staking view methods
rndquu Apr 3, 2025
66ef894
chore: add development migration
rndquu Apr 7, 2025
ba3979f
chore: use latest diamond address in dev migration
rndquu Apr 8, 2025
e110534
chore: add production staking migration
rndquu Apr 8, 2025
0ab4dc6
chore: add QA deploy helper
rndquu Apr 8, 2025
ac51774
ci: fix cspell
rndquu Apr 8, 2025
5a76dc0
chore: set staking reward to 0.2 per block
rndquu Apr 12, 2025
b149670
feat(staking): add validation for restricted methods
rndquu Apr 30, 2025
05fe2f7
test: disable aave pool supply cap
rndquu May 1, 2025
2329f35
test(staking): add fuzzing test
rndquu May 1, 2025
2d760e3
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 3, 2025
6dd90b0
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 12, 2025
75acba4
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 13, 2025
0c34b8c
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 13, 2025
72f871c
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 13, 2025
c482f5e
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 13, 2025
a5660c4
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 13, 2025
cb250bc
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 16, 2025
5860583
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 16, 2025
5478c81
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jun 16, 2025
615d4d3
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jul 4, 2025
a30c6bf
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jul 18, 2025
26934f1
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jul 24, 2025
0384e23
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jul 31, 2025
69c45c0
chore: [skip ci] update labels configuration
ubiquity-os[bot] Jul 31, 2025
1e6b295
test(staking): add multiple users staking test
rndquu Aug 5, 2025
1422df9
feat(staking): emit events
rndquu Aug 6, 2025
c57b8f0
refactor(staking): mass update individual pools
rndquu Aug 6, 2025
9c7fef6
test(staking): add more fuzzing tests
rndquu Aug 6, 2025
75d334c
Merge pull request #987 from rndquu/feat/985
0x4007 Aug 7, 2025
0d8f615
docs: auto generate NATSPEC docs
github-actions[bot] Aug 7, 2025
a6edff7
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 8, 2025
2d5ef0e
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 8, 2025
32827ad
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 8, 2025
8fbfbe9
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 8, 2025
44f6011
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 12, 2025
e6b809e
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 14, 2025
a839528
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 14, 2025
26ae90d
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 14, 2025
35bc96a
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 14, 2025
d151f21
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 24, 2025
654794a
ci: fix aave fork test
ryzhak Aug 26, 2025
f710920
refactor: remove unused imports
ryzhak Aug 26, 2025
4c8617d
feat(staking): add whenNotPaused modifier
ryzhak Aug 26, 2025
0dcf7af
feat(staking): add min amount for governance reward
ryzhak Aug 26, 2025
e7fd49d
feat(staking): add ability to disable treasury rewards
ryzhak Aug 26, 2025
1223434
docs(staking): add notes regarding weird ERC20 tokens
ryzhak Aug 26, 2025
ccdba3e
feat(staking): add nonReentrant modifier
ryzhak Aug 26, 2025
5cf0de5
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 27, 2025
9eba189
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 27, 2025
4900c26
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 27, 2025
b94c53b
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 27, 2025
a38e0a5
refactor(staking): force mass pool updates
ryzhak Aug 27, 2025
09c9cab
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 27, 2025
68083a3
feat(staking): assert stake/reward tokens not used as collateral
ryzhak Aug 27, 2025
2871d27
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 27, 2025
f272965
chore: [skip ci] update labels configuration
ubiquity-os[bot] Aug 27, 2025
7eb880f
Merge pull request #999 from ryzhak/fix/audit-staking
0x4007 Sep 2, 2025
ac3230f
docs: auto generate NATSPEC docs
github-actions[bot] Sep 2, 2025
c1b1aec
feat(staking): disallow staking in disabled pools
ryzhak Sep 12, 2025
f2e14e6
feat(staking): update pools on changing staking params
ryzhak Sep 12, 2025
8f87fbf
feat(staking): allow only future blocks for startBlock param
ryzhak Sep 12, 2025
3bc7c3d
chore: [skip ci] update labels configuration
ubiquity-os[bot] Sep 14, 2025
43637de
chore: [skip ci] update labels configuration
ubiquity-os[bot] Sep 14, 2025
4097072
chore: [skip ci] update labels configuration
ubiquity-os[bot] Sep 14, 2025
d224f73
fix: staking migration
ryzhak Sep 15, 2025
498cddb
refactor: save gas in setStakingStartBlock()
ryzhak Sep 16, 2025
3f4bd49
ci: add certora workflow
ryzhak Sep 17, 2025
c09cf21
fix: fix staking development migration
ryzhak Sep 17, 2025
f43ae3d
Merge pull request #1004 from ryzhak/fix/1001
0x4007 Sep 17, 2025
4c13028
Merge pull request #1003 from ryzhak/fix/audit-nevi
0x4007 Sep 17, 2025
336ad4e
docs: auto generate NATSPEC docs
github-actions[bot] Sep 17, 2025
b3082cd
Merge pull request #1005 from ryzhak/ci/formal-verification
0x4007 Oct 13, 2025
a5f4e05
docs: auto generate NATSPEC docs
github-actions[bot] Oct 13, 2025
64de64c
chore: [skip ci] update labels configuration
ubiquity-os[bot] Oct 29, 2025
8e4f00c
chore: [skip ci] update labels configuration
ubiquity-os[bot] Oct 29, 2025
5f847e6
chore: [skip ci] update labels configuration
ubiquity-os[bot] Oct 29, 2025
ff4b556
chore: [skip ci] update labels configuration
ubiquity-os[bot] Nov 15, 2025
c29259e
chore: [skip ci] update labels configuration
ubiquity-os[bot] Nov 15, 2025
003dcb1
chore: [skip ci] update labels configuration
ubiquity-os[bot] Nov 15, 2025
bb5f44e
chore: [skip ci] update labels configuration
ubiquity-os[bot] Dec 22, 2025
be9e35e
chore: [skip ci] update labels configuration
ubiquity-os[bot] Feb 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# infura key created at infura.io
INFURA_ID=XXXXXX
NEXT_PUBLIC_JSON_RPC_URL=XXXXXX
NEXT_PUBLIC_WALLET_CONNECT_ID=XXXXXX
NEXT_PUBLIC_DEBUG=
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/
.next/
dist/_next/
!.solhint.json
7 changes: 6 additions & 1 deletion .eslintrc → .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"prettier/prettier": "warn"
"prettier/prettier": [
"warn",
{
"endOfLine": "auto"
}
]
},
"env": {
"browser": true,
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @rndquu
23 changes: 23 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing
- We welcome everybody to participate in improving the codebase.
- We offer financial incentives for solved issues.
- Please learn how to contribute via the DevPool [here](https://dao.ubq.fi/devpool).

### Coding Styleguide

- We use camelCase for identifiers (variable, function, method names) do not use snake_case
- `NFT` should be `Nft` in identifers e.g. `creditNft`
- Do not refer to token symbols directly in identifiers, instead write the intent of the token. We have the ability to update the names of the tokens (as we already have done on Ethereum mainnet) which leads to confusion.
- `uAD` ⮕ `dollar`
- `uCR` ⮕ `credit`
- `uCR-NFT` ⮕ `creditNft`
- `UBQ` ⮕ `governance`

- We generally should not use "Ubiquity" in identifers and filenames. This is the Ubiquity Dollar repository so Ubiquity is implied.
- The exception is when we are working in third party contexts, for example the Curve (3pool) metapool related code, it is good to write ubiquityDollar because the other assets in the pool are USDC, USDT and DAI (other types of dollars!)

#### Contract Renames

- We rebranded "Bonding" to "Staking" to disambiguate our bonds (e.g. Chicken Bonds) branding.
- We rebranded "Debts" to "Credits" because it has a positive connotation for the users.
- We rebranded "Ubiquity Algorithmic Dollar" to "Ubiquity Dollar" because the term "algorithmic" is contentious in this context after Luna.
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Resolves #

<!--
- You must link the issue number e.g. "Resolves #1234"
- Please do not replace the keyword "Resolves" https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->
5 changes: 5 additions & 0 deletions .github/ubiquibot-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
payments:
evmNetworkId: 100
basePriceMultiplier: 3
issueCreatorMultiplier: 3
maxPermitPrice: 1000
49 changes: 49 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build & Test

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.10.0"

- name: Install dependencies
run: sudo apt -y update && sudo apt -y install libusb-1.0-0-dev libudev-dev

- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Yarn Install
run: yarn install --mode=skip-build && yarn allow-scripts

- name: Setup Forge
run: yarn workspace @ubiquity/contracts forge:install

- name: Build All
env:
FOUNDRY_DENY_WARNINGS: true
run: yarn build

- name: Test All
run: yarn test:all

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: static
path: packages/dapp/dist
35 changes: 35 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CodeQL Analysis

on:
pull_request:
push:
branches:
- development

jobs:
code-ql-analysis:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["javascript", "typescript"]
# CodeQL currently supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Modified to support codebase. Currently no support for Solidity Language

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Init CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
14 changes: 14 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Conventional Commits

on:
pull_request:
push:
branches: [development]

jobs:
conventional-commits:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ubiquity/action-conventional-commits@master
67 changes: 67 additions & 0 deletions .github/workflows/core-contracts-storage-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Check For Core Contracts Storage Changes

on:
push:
branches:
- development
pull_request:

jobs:
provide_contracts:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Narrow down test matrix scope to changed contracts to limit API requests
id: changed-contracts
uses: tj-actions/changed-files@v42
with:
files_yaml: |
contracts:
- packages/contracts/src/dollar/core/*.sol

- name: Set contracts matrix
id: set-matrix
working-directory: packages/contracts
if: steps.changed-contracts.outputs.contracts_any_changed == 'true'
env:
CHANGED_CONTRACTS: ${{ steps.changed-contracts.outputs.contracts_all_changed_files }}
run: |
for CONTRACT in "$CHANGED_CONTRACTS"; do
echo ${CONTRACT} | xargs basename -a | cut -d'.' -f1 | xargs -I{} echo src/dollar/core/{}.sol:{} >> contracts.txt
done
echo "matrix=$(cat contracts.txt | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

check_storage_layout:
needs: provide_contracts
runs-on: ubuntu-latest
if: ${{ needs.provide_contracts.outputs.matrix != '[]' && needs.provide_contracts.outputs.matrix != '' }}

strategy:
matrix:
contract: ${{ fromJSON(needs.provide_contracts.outputs.matrix) }}

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Check For Core Contracts Storage Changes
uses: Rubilmax/foundry-storage-check@main
with:
workingDirectory: packages/contracts
contract: ${{ matrix.contract }}
failOnRemoval: true

117 changes: 117 additions & 0 deletions .github/workflows/coverage-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Compare Test Coverage
# This compares test coverage and throws an error if test coverage is lower than the previous run.

on:
push:
branches: [development]
pull_request:
branches: [development]

jobs:
test-coverage:
name: Compare Test Coverage
runs-on: ubuntu-22.04
permissions:
contents: read

steps:
- name: Checkout development branch
uses: actions/checkout@v3
with:
ref: development
path: development

- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install dependencies
run: sudo apt-get install lcov

- name: Get development branch coverage
id: coverage-development
working-directory: development/packages/contracts
run: |
# generates lcov.info
forge build && forge coverage --report lcov

# Merge lcov files
lcov \
--rc lcov_branch_coverage=1 \
--add-tracefile lcov.info \
--output-file merged-lcov.info

# Filter out node_modules, test, and mock files
lcov \
--rc lcov_branch_coverage=1 \
--remove merged-lcov.info \
--output-file filtered-lcov.info \
"*node_modules*" \
"*test*" \
"*mock*" \
"*scripts*" \
"src/dollar/mocks/*" \
"src/dollar/utils/*" \
"src/deprecated/*" \
"test/*" \

# Generate summary
COVERAGE_DEVELOPMENT_OUTPUT=$(lcov \
--rc lcov_branch_coverage=1 \
--list filtered-lcov.info)

echo COVERAGE=$(echo "${COVERAGE_DEVELOPMENT_OUTPUT}" | tail -n 1 | cut -d % -f 1 | cut -d \| -f 2) >> $GITHUB_OUTPUT

- name: Delete development branch folder
run: rm -rf development

- name: Checkout code in PR branch
uses: actions/checkout@v3

- name: Get PR branch coverage
id: coverage-pr
working-directory: packages/contracts
run: |
# generates lcov.info
forge build && forge coverage --report lcov

# Merge lcov files
lcov \
--rc lcov_branch_coverage=1 \
--add-tracefile lcov.info \
--output-file merged-lcov.info

# Filter out node_modules, test, and mock files
lcov \
--rc lcov_branch_coverage=1 \
--remove merged-lcov.info \
--output-file filtered-lcov.info \
"*node_modules*" \
"*test*" \
"*mock*" \
"*scripts*" \
"src/dollar/mocks/*" \
"src/dollar/utils/*" \
"src/deprecated/*" \
"test/*" \

# Generate summary
COVERAGE_DEVELOPMENT_OUTPUT=$(lcov \
--rc lcov_branch_coverage=1 \
--list filtered-lcov.info)
echo COVERAGE=$(echo "${COVERAGE_DEVELOPMENT_OUTPUT}" | tail -n 1 | cut -d % -f 1 | cut -d \| -f 2) >> $GITHUB_OUTPUT

- name: Print coverages
run: |
echo Development branch coverage: ${{ steps.coverage-development.outputs.COVERAGE }}
echo PR branch coverage: ${{ steps.coverage-pr.outputs.COVERAGE }}

- name: Compare coverages
if: ${{ steps.coverage-development.outputs.COVERAGE > steps.coverage-pr.outputs.COVERAGE }}
run: |
echo "Error: test coverage decreased"
exit 1

- name: Upload test coverage report to coveralls.io
uses: coverallsapp/github-action@v2
with:
file: packages/contracts/filtered-lcov.info
27 changes: 27 additions & 0 deletions .github/workflows/create-diagram.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Create Diagram
on:
workflow_dispatch: {}
push:
branches:
- main
jobs:
create-diagram:
name: Create Diagram
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Update Diagram (Contracts)
uses: githubocto/repo-visualizer@main
with:
excluded_paths: "ignore,.github"
output_file: "utils/diagram-contracts.svg"
root_path: "packages/contracts/"
commit_message: "docs(diagram): contracts"
- name: Update Diagram (User Interface)
uses: githubocto/repo-visualizer@main
with:
excluded_paths: "ignore,.github"
output_file: "utils/diagram-ui.svg"
root_path: "packages/dapp/"
commit_message: "docs(diagram): ui"
Loading
Loading