Developers Forum for XinFin XDC Network

Discussion on: [Informative] Upgrade Plan for XDCValidator Contract

Collapse
0xbeny profile image
Beny

how do the all above mentioned scenarios manage the current XDC tokens that are held by XDCValidator smart contract?

The amount is around 3,330,826,898 XDC ~ $134,565,406
Which acts as the native(solo) staking on the xDPOS protocol.

explorer.xinfin.network/address/xd...

Collapse
galaxyscitech profile image
Galaxy Author

Option 1 The assets will remain in both the old contract and the new contract. As a dapp project, you need to withdraw the assets from the old contract first, then change the validator address to the new contract, and call the new contract later

Option 2 The asset remains in the contract, As a dapp project, no need to do anything

Collapse
0xbeny profile image
Beny

I feel option 2 is a better solution. we should have a safe migration plan for new updates, Security-first approach might help in this case as XDCValidator contract is one of most important SCs on XDC Network.

Many projects may depend on XDCValidator SC as a source to verify MasterNodes and pull some data, the upgrade should be backward-compatible regarding storage slots and its SC address.