Skip to content

Commit

Permalink
Merge pull request #6 from icon-community/add-emergency-fund
Browse files Browse the repository at this point in the history
Add emergency fund
  • Loading branch information
usr-icon-foundation authored May 21, 2024
2 parents 434d961 + 8026bad commit e29b662
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
53 changes: 53 additions & 0 deletions components/emergency-fund.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"use client"

import React, { useState, useEffect } from 'react';
import { Callout } from "nextra/components";

const EmergencyFundComponent = () => {
const [emergencyFund, setEmergencyFund] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);

useEffect(() => {
const fetchEmergencyFund = async () => {
try {
const response = await fetch('https://tracker.icon.community/api/v1/addresses?address=cx2c7ceac38a597abae0ce3b2ceac497e126725174');
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
setEmergencyFund(data);
} catch (err) {
setError(err.message);
} finally {
setLoading(false);
}
};

fetchEmergencyFund();
}, []);

if (loading) {
return <div>Loading...</div>;
}

if (error) {
return <div>Error: {error}</div>;
}

return (
<div className=''>
<div className="flex flex-col space-y-3">
{emergencyFund && emergencyFund.length > 0 ? (
<Callout type="info" emoji="💡">
The ICON Emergency Fund currently holds <span className='px-2 py-1 font-bold border rounded-full border-blue-950/60 dark:border-blue-400'>{parseInt(emergencyFund[0].balance, 10).toLocaleString()} ICX</span>
</Callout>
) : (
<p>No data available</p>
)}
</div>
</div>
);
};

export default EmergencyFundComponent;
5 changes: 5 additions & 0 deletions pages/advanced-topics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ Find information for system administrators, contributors, and developers during
description="Learn articles for advanced users"
href="/advanced-topics/learn"
/>
<Tile
title="Emergency Fund"
description="ICON's emergency fund and how it works."
href="/advanced-topics/emergency-fund"
/>
<Tile
title="Security"
description="Best practices and strategies to secure your ICON network operations."
Expand Down
7 changes: 7 additions & 0 deletions pages/advanced-topics/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,12 @@
"layout": "default",
"breadcrumb": false
}
},
"emergency-fund": {
"title": "Emergency Fund",
"theme": {
"layout": "default",
"breadcrumb": false
}
}
}
36 changes: 36 additions & 0 deletions pages/advanced-topics/emergency-fund.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import EmergencyFundComponent from '../../components/emergency-fund'

# Emergency Fund

The ICON Emergency Fund is a dedicated reserve established to enhance the security and stability of the ICON network. This fund is designed to protect user assets in the event of unforeseen incidents such as hacks, exploits, or other vulnerabilities that may compromise the integrity of the network. By maintaining a robust emergency fund, ICON aims to foster user trust and ensure the long-term sustainability of its ecosystem.
<EmergencyFundComponent />

### Fund Allocation and Management

The ICON Emergency Fund is composed of ICX tokens, which are securely stored and managed by the ICON Validators. The fund's primary purpose is to provide financial compensation to affected parties in the event of security breaches or other incidents that result in asset loss. The allocation and release of funds are governed by a structured decision-making process, ensuring that any disbursement is conducted transparently and with the consensus of the network's validators.

### Usage and Activation

In the event of a security incident:

1. **Incident Identification**: When an exploit, hack, or any other security breach is identified, the ICON Foundation will conduct a thorough investigation to assess the impact and scope of the incident.

2. **Validator Consensus**: Based on the findings of the investigation, a proposal to utilize the Emergency Fund will be put forth to the ICON Validators. This proposal will include detailed information about the incident, the estimated financial impact, and the proposed compensation plan.

3. **Fund Disbursement**: If the proposal receives the required consensus from the validators, the allocated ICX from the Emergency Fund will be disbursed to the affected parties. This process ensures that the decision to use the Emergency Fund is made collectively and with due diligence.

### Transparency and Reporting

To maintain transparency and accountability, the ICON Emergency Fund balance and its usage history will be regularly reported and made available to the community. This report will include:

- **Current Fund Balance**: The total amount of ICX held in the Emergency Fund.
- **Transaction History**: A detailed log of any disbursements made from the fund, including the reasons for the disbursement and the recipients.
- **Fund Replenishment**: Information on any efforts or proposals to replenish the fund, ensuring its continued availability for future emergencies.

### Strategic Importance

The establishment and maintenance of the ICON Emergency Fund reflect ICON's commitment to building a resilient and secure blockchain ecosystem. By proactively addressing potential risks and providing a safety net for users, ICON aims to build confidence and encourage wider adoption of its technology.

### Contract Address

cx2c7ceac38a597abae0ce3b2ceac497e126725174

0 comments on commit e29b662

Please sign in to comment.