Comments (6)
@d10r please post the "secession fork testing" related work here.
After that, the owner of token that wish to secede should create an issue in this repo to request such governance action.
Technical challenges:
- "flag changes"
- "nullifcation" process
- etc.
from protocol-monorepo.
Technical challenge with a seceding token:
There's no explicit role assigned to the upgrade privilege, the way it is in e.g. Ownable. Instead, the role is implicitly defined by the implementation contract through the logic of updateCode
.
In case of the canonical SuperToken contract, the restriction is that only the host can trigger the update. The host contract can trigger this through updateSuperTokenLogic which can be called by gov only.
So through this indirections, SF gov has exclusive permission to update SuperTokens, but that's not something which can trivially be queried. The best way to check this may be to verify if the logic a SuperToken points to is the canonical one (as defined by SuperTokenFactory.getSuperTokenLogic()
) - caveat being that one would have to keep track of all previous versions of canonical logics, or rely on the assumption that all tokens are always updated to the latest one.
In order to facilitate that, we could add a mapping(address => bool) canonicalSuperTokenLogicContracts
which returns true
for all contracts which ever were (or currently are) the canonical SuperToken implementation.
Alternatively we could rely on off-chain reconstruction, e.g. based on the event SuperTokenFactory.SuperTokenLogicCreated
.
An alternative approach for distinguishing SuperTokens using the canonical logic could be to use UUPSProxiable.proxiableUUID
- assuming only the canonical deployments return keccak256("org.superfluid-finance.contracts.SuperToken.implementation")
.
This assumption is however already invalidated by existing non-canonical deployments, e.g. by G$.
from protocol-monorepo.
In case of the canonical SuperToken contract, the restriction is that only the host can trigger the update. The host contract can trigger this through updateSuperTokenLogic which can be called by gov only.
Indeed.
But at the same time, ISuperfluid immutable internal _host;
does not imply it has to be our host. A custom super token logic may simply set it to a different when during its construction. Would this work?
from protocol-monorepo.
Yeah, but that would create all kinds of additional implications, imo coming down to requiring a redundant deployment of the protocol. Much simpler to decouple the update privilege from the host in that custom logic.
from protocol-monorepo.
We can do a SuperToken revision around this rule.
from protocol-monorepo.
Added a deployment script.
Waiting for the FRACTION deployer to deploy (important contract params are hardcoded in the logic, so we can't deploy a generic version as is) and request an update.
We can exclude such SuperTokens with custom logic by modifying the upgrade script to compare SuperToken logic addresses against a list of all canonical implementations there existed, can be done by querying the protocol subgraph for
superTokenLogicCreatedEvents {
tokenLogic
}
from protocol-monorepo.
Related Issues (20)
- [SUBGRAPH] Investigate issues with `Approval` event mapping HOT 2
- [ETHEREUM-CONTRACTS] CFA buffer semantics in conjunction with minimum deposit
- [OPS-SCRIPTS] tooling for creating gov actions for batch-setting min deposit
- [SUBGRAPH][BUG] PoolMember not getting updated when the member units change HOT 3
- [ETHEREUM-CONTRACTS] flow nft hooks can fail with outofgas HOT 1
- [ETHEREUM-CONTRACTS] deposit accounting bug when combining app credit and min deposit
- [ETHEREUM-CONTRACTS] MacroForwarder postCheck hook HOT 1
- [SUBGRAPH] Fix Correctness of GDA Entities HOT 1
- [SPIKE] ERC-4626 & Super Tokens HOT 1
- [ETHEREUM-CONTRACTS] Complete the Superfluid batch operation set HOT 1
- [ETHEREUM-CONTRACTS] PoolNFTs: remove try/catch
- [ETHEREUM-CONTRACTS] Investigate 64/64 rule failure with try/catch
- [TOOLING] [BUG] lerna complains, can't parse yarn.lock HOT 1
- [OPS] Deploy contracts v1.9.1 HOT 15
- [ETHEREUM-CONTRACTS] Get rid of compiler warnings
- [Deployer Whitelisting Request] HOT 4
- [PROTOCOL-OPS] scroll-sepolia cannot be upgraded
- [SUBGRAPH][FEATURE] Inconsistency: AccountTokenSnapshot has `updatedAt(Timestamp/BlockNumber)` but not the equivalent for "created at"
- [SUBGRAPH] superTokenLogicCreatedEvents missing recent events
- [BUG] Ask about the scope of bug bounty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protocol-monorepo.