Mark Spanbroek
129e82f707
marketplace: repair reward is paid out at the end
...
It is no longer a discount on the collateral, to
simplify reasoning about collateral in the sales
module of the codex node
2025-03-12 10:52:11 +01:00
Mark Spanbroek
095e90fc0f
certora: update state changes spec now that we have vault
2025-03-06 15:24:03 +01:00
Mark Spanbroek
8e6ff63dc3
certora: remove check on ERC20 token
...
No need to test the token itself
2025-03-06 15:24:03 +01:00
Mark Spanbroek
fbc34c97e9
certora: update marketplace spec now that we have vault
...
- changes to marketplace constructor
- we no longer have _marketplaceTotals
- timestamps have their own type now
- freeSlot no longer takes payout addresses
- slot state 'Paid' no longer exists
- freeSlot can be invoked more than once now
- a failed request no longer ends immediately
2025-03-06 15:24:03 +01:00
Mark Spanbroek
6992757f3f
proofs: use Timestamp instead of uint64
2025-03-06 15:23:24 +01:00
Mark Spanbroek
a0b92b74c8
marketplace: remove 'Paid' state
...
This state is no longer necessary, vault ensures
that payouts happen only once. Hosts could bypass
this state anyway by withdrawing from the vault
directly.
2025-03-04 09:36:10 +01:00
Mark Spanbroek
4e97ebf89b
marketplace: cleanup
2025-03-04 09:36:10 +01:00
Mark Spanbroek
9d563b011f
marketplace: remove accounting that is now done by vault
2025-03-04 09:36:10 +01:00
Mark Spanbroek
d492e6e352
marketplace: formatting
2025-03-04 09:36:10 +01:00
Mark Spanbroek
257ef55953
marketplace: designate validator rewards
...
so that they can no longer be transfered
within the vault
2025-03-04 09:36:10 +01:00
Mark Spanbroek
ab5dad67af
marketplace: transfer repair reward in vault
2025-03-04 09:36:10 +01:00
Mark Spanbroek
09a3cbcb09
marketplace: optimize storage reads and writes
2025-03-04 09:36:10 +01:00
Mark Spanbroek
65890338d7
marketplace: remove accounting that is now done by vault
2025-03-04 09:36:10 +01:00
Mark Spanbroek
bddbd02f02
marketplace: burn tokens in vault when slashing
...
- move all collateral calculatons to separate library
2025-03-04 09:36:10 +01:00
Mark Spanbroek
639466662d
marketplace: simplify withdrawing by client
...
- removes RequestCancelled event, which was not great anyway
because it is not emitted at the moment that the request is
cancelled
2025-03-04 09:36:10 +01:00
Mark Spanbroek
1e74be6243
marketplace: remove accounting that is now done by vault
2025-03-04 09:36:10 +01:00
Mark Spanbroek
d95863bce8
marketplace: remove fuzzing
...
replaced by formal verification with certora
2025-03-04 09:36:10 +01:00
Mark Spanbroek
13b4038d35
marketplace: collateral is uint128
...
Vault stores balances as uint128
2025-03-04 09:36:10 +01:00
Mark Spanbroek
83a59d8227
marketplace: use Timestamp, Duration and TokensPerSecond types
2025-03-04 09:36:10 +01:00
Mark Spanbroek
284b54e575
vault: move Timestamp and TokensPerSecond libraries one level up
2025-03-04 09:36:10 +01:00
Mark Spanbroek
8df557801c
marketplace: use vault in marketplace
2025-03-04 09:36:10 +01:00
Mark Spanbroek
8b40f63693
marketplace: remove support for changing payout addresses
2025-03-04 09:36:10 +01:00
Mark Spanbroek
d5ab2ecf8d
marketplace: deploy vault and set it in the marketplace
2025-03-04 09:36:10 +01:00
Mark Spanbroek
994e328b05
marketplace: use SafeERC20 for transfers
2025-03-04 09:36:10 +01:00
Mark Spanbroek
9b42a4627f
vault: clarification
...
Co-Authored-by: Adam Uhlíř <adam@uhlir.dev>
2025-03-04 09:36:00 +01:00
Mark Spanbroek
edee270eca
vault: rename Lock -> Fund
2025-03-04 09:36:00 +01:00
Mark Spanbroek
96b4fc0eff
vault: rename lock states
...
- NoLock -> Inactive
- Unlocked -> Withdrawing
2025-03-04 09:36:00 +01:00
Mark Spanbroek
2900bed8fd
vault: rename Fund -> FundId
2025-03-04 09:36:00 +01:00
Mark Spanbroek
62aea75295
vault: freezeFund() instead of burnFund()
2025-03-04 09:36:00 +01:00
Mark Spanbroek
6db1a5fb3a
vault: only allow account holder to withdraw for itself
2025-03-04 09:36:00 +01:00
Mark Spanbroek
95a698c574
vault: allow for multiple accounts for one account holder
2025-03-04 09:36:00 +01:00
Mark Spanbroek
b64c64aff8
vault: rename account->holder in tests
2025-03-04 09:36:00 +01:00
Mark Spanbroek
4c46f2d1a0
vault: pausing and unpausing
2025-03-04 09:36:00 +01:00
Mark Spanbroek
15e7ae855d
vault: cleanup tests
2025-03-04 09:36:00 +01:00
Mark Spanbroek
7de8b8ccb6
vault: format all solidity files
2025-03-04 09:36:00 +01:00
Mark Spanbroek
79c127b80e
update openzeppelin contracts to 5.2.0
2025-03-04 09:36:00 +01:00
Mark Spanbroek
81032965f4
vault: update documentation
2025-03-04 09:36:00 +01:00
Mark Spanbroek
473a5fec19
vault: fix accounting of locked value when burning designated tokens
2025-03-04 09:36:00 +01:00
Mark Spanbroek
43cd44330b
vault: add documentation
2025-03-04 09:36:00 +01:00
Mark Spanbroek
439d3772db
vault: remove dead code
2025-03-04 09:36:00 +01:00
Mark Spanbroek
b7b1e8c25b
vault: cleanup
2025-03-04 09:36:00 +01:00
Mark Spanbroek
dc3084836f
vault: prefix errors with 'Vault'
2025-03-04 09:36:00 +01:00
Mark Spanbroek
0a539fb017
vault: burn designated/fund allowed when flowing
2025-03-04 09:36:00 +01:00
Mark Spanbroek
ad6df66768
vault: burn part of designated tokens
2025-03-04 09:36:00 +01:00
Mark Spanbroek
3ff331b883
vault: rename burn -> burnAccount, burnAll -> burnFund
2025-03-04 09:36:00 +01:00
Mark Spanbroek
62eb07e640
vault: clean up errors
2025-03-04 09:36:00 +01:00
Mark Spanbroek
1259c2fe71
vault: test lock state transitions
2025-03-04 09:36:00 +01:00
Mark Spanbroek
e3291ed82e
vault: formatting
2025-03-04 09:36:00 +01:00
Mark Spanbroek
13d590d67b
vault: do not expose Lock internals on public api
2025-03-04 09:36:00 +01:00
Mark Spanbroek
6877078f4c
vault: transfer tokens to 0xdead when fund is burned
2025-03-04 09:36:00 +01:00